Unity Engine : Universal Background Unlocker
Posted: Thu Dec 05, 2019 10:48 pm
Hey,
it bothered me a lot that unity games are always pause the complete process if the game is not focused.
maybe some table makers here can relate that, almost every unity game stops when you tab out to cheat engine or doing something else while the game loads...
i have created 2 scripts that should work as "universal background unlocker"
activate mono - execute the x64 or x86 script -> focus the game for a sec -> deactivate script and game should run in background.
if you want to reverse it:
push 0 for x86
mov ecx,0 for x64
X86:
X64:
thats it, maybe someone can need it
i tested it on 10+ unity games and it always worked
Edit:
i also did a script for IL2CPP Unity games
tested on 3 IL2CPP games now, and it worked perfectly.
note : script needs to stay activated
IL2CPP x64:
Il2CPP X86:
Note : you can probably use the Il2CPP scripts also for newer Mono Games(Unity Version 2019 and higher), coz the inject point is in the native UnityPlayer.dll
it bothered me a lot that unity games are always pause the complete process if the game is not focused.
maybe some table makers here can relate that, almost every unity game stops when you tab out to cheat engine or doing something else while the game loads...
i have created 2 scripts that should work as "universal background unlocker"
activate mono - execute the x64 or x86 script -> focus the game for a sec -> deactivate script and game should run in background.
if you want to reverse it:
push 0 for x86
mov ecx,0 for x64
X86:
Code: Select all
[ENABLE]
aobscanregion(activate,UnityEngine:Application:set_runInBackground,UnityEngine:Application:set_runInBackground+5,55)
aobscanregion(aobMono86,UnityEngine:Camera:get_clearFlags,UnityEngine:Camera:get_clearFlags+100,E8 ** ** ** ** **) // should be unique
alloc(newmem,$1000,aobMono86)
label(code)
label(return)
alloc(orig,5)
registersymbol(orig)
orig:
readmem(aobMono86,5)
newmem:
code:
reassemble(aobMono86)
mov eax,"UnityEngine:Application:set_runInBackground"
push 1
call eax
pop eax
jmp return
aobMono86:
jmp newmem
return:
registersymbol(aobMono86)
[DISABLE]
aobMono86:
readmem(orig,5)
unregistersymbol(aobMono86)
dealloc(newmem)
Code: Select all
[ENABLE]
aobscanregion(activate,UnityEngine:Application:set_runInBackground,UnityEngine:Application:set_runInBackground+5,55)
aobscanregion(aobMono64,UnityEngine:Camera:get_clearFlags,UnityEngine:Camera:get_clearFlags+100,0F 84 ** ** ** ** **) // should be unique
alloc(newmem,$1000,aobMono64)
label(code)
label(return)
alloc(orig64,6)
registersymbol(orig64)
orig64:
readmem(aobMono64,6)
newmem:
code:
reassemble(aobMono64)
mov ecx,1
mov r11,"UnityEngine:Application:set_runInBackground"
call r11
jmp return
aobMono64:
jmp newmem
nop
return:
registersymbol(aobMono64)
[DISABLE]
aobMono64:
readmem(orig64,6)
unregistersymbol(aobMono64)
dealloc(newmem)
i tested it on 10+ unity games and it always worked
Edit:
i also did a script for IL2CPP Unity games
tested on 3 IL2CPP games now, and it worked perfectly.
note : script needs to stay activated
IL2CPP x64:
Code: Select all
[ENABLE]
aobscanmodule(aobILBackg,UnityPlayer.dll,E8 ** ** ** ** 48 85 C0 75 05 48 83 C4 28 C3 E8 ** ** ** ** 48 85 C0)
aobILBackg+08:
db 90 90
registersymbol(aobILBackg)
[DISABLE]
aobILBackg+08:
db 75 05
unregistersymbol(aobILBackg)
Code: Select all
[ENABLE]
// universal run in background for mono + ilcpp x86
aobscanmodule(aobShouldRunInBackground,UnityPlayer.dll,E8 ** ** ** ** 85 C0 75 03 32 C0 C3 E8 ** ** *** 85 C0)
alloc(origShould,3)
registersymbol(origShould)
origShould:
readmem(aobShouldRunInBackground,3)
aobShouldRunInBackground:
db B0 01 C3
registersymbol(aobShouldRunInBackground)
[DISABLE]
aobShouldRunInBackground:
readmem(origShould,3)
unregistersymbol(aobShouldRunInBackground)