Skip to content

Instantly share code, notes, and snippets.

@eur0pa
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eur0pa/a0beda7d5032939ed1e9 to your computer and use it in GitHub Desktop.
Save eur0pa/a0beda7d5032939ed1e9 to your computer and use it in GitHub Desktop.
Randomize Eden in place of The Lost in The Binding of Isaac: Rebirth
{ Game : isaac-ng.exe
Version:
Date : 2015-04-14
Author : europa
This randomizes Eden in place of The Lost
}
[ENABLE]
aobscanmodule(TheLost,isaac-ng.exe,38 91 9E 00 00 00 74 ?? C7 44 B5 ?? 0A 00 00 00 03 F0 03 F8) // should be unique
alloc(newmem,$64)
label(code)
label(return)
label(NoTokens)
newmem:
code:
cmp [ecx+150], 1 // at least 1 eden token
jb NoTokens
cmp [ecx+9D], dl // eden in rotation?
je return+2
mov [ebp+esi*4-34], 09 // not in rotation, add him
jmp return
NoTokens:
cmp [ecx+9E], dl
je return+2
mov [ebp+esi*4-34], 0A // no tokens, go back to the lost
jmp return
TheLost:
jmp code
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
return:
registersymbol(TheLost)
[DISABLE]
TheLost:
db 38 91 9E 00 00 00 74 0A C7 44 B5 CC 0A 00 00 00
unregistersymbol(TheLost)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "isaac-ng.exe"+12B15D
"isaac-ng.exe"+12B132: C7 44 B5 CC 07 00 00 00 - mov [ebp+esi*4-34],00000007
"isaac-ng.exe"+12B13A: EB 31 - jmp isaac-ng.exe+12B16D
"isaac-ng.exe"+12B13C: 38 91 9C 00 00 00 - cmp [ecx+0000009C],dl
"isaac-ng.exe"+12B142: 74 2B - je isaac-ng.exe+12B16F
"isaac-ng.exe"+12B144: C7 44 B5 CC 08 00 00 00 - mov [ebp+esi*4-34],00000008
"isaac-ng.exe"+12B14C: EB 1F - jmp isaac-ng.exe+12B16D
"isaac-ng.exe"+12B14E: 38 51 6C - cmp [ecx+6C],dl
"isaac-ng.exe"+12B151: 74 1C - je isaac-ng.exe+12B16F
"isaac-ng.exe"+12B153: C7 44 B5 CC 04 00 00 00 - mov [ebp+esi*4-34],00000004
"isaac-ng.exe"+12B15B: EB 10 - jmp isaac-ng.exe+12B16D
// ---------- INJECTING HERE ----------
"isaac-ng.exe"+12B15D: 38 91 9E 00 00 00 - cmp [ecx+0000009E],dl
// ---------- DONE INJECTING ----------
"isaac-ng.exe"+12B163: 74 0A - je isaac-ng.exe+12B16F
"isaac-ng.exe"+12B165: C7 44 B5 CC 0A 00 00 00 - mov [ebp+esi*4-34],0000000A
"isaac-ng.exe"+12B16D: 03 F0 - add esi,eax
"isaac-ng.exe"+12B16F: 03 F8 - add edi,eax
"isaac-ng.exe"+12B171: 83 FF 0B - cmp edi,0B
"isaac-ng.exe"+12B174: 0F 8C 46 FF FF FF - jl isaac-ng.exe+12B0C0
"isaac-ng.exe"+12B17A: 3B F2 - cmp esi,edx
"isaac-ng.exe"+12B17C: 74 09 - je isaac-ng.exe+12B187
"isaac-ng.exe"+12B17E: E8 BD F7 F7 FF - call isaac-ng.exe+AA940
"isaac-ng.exe"+12B183: 33 D2 - xor edx,edx
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment