void GameplayPatches(void){ //originally supposed to be 100 /decimal/ but oops Unit8 kPickpocketChance[] = { 0xB8, 0x00, 0x01, 0x00, 0x00, // mov eax, 0x0100 0xC3 // retn }; ApplyPatch(0x00598DB0, kPickpocketChance, sizeof(kPickpocketChance)); SafeWrite8(0x008F0850, 0xC3); // disable achievements}
Questions:
1) I'm assuming 0x00598DB0 is the offset of skyrim.esm that's being written to. My hex editor, unsurprisingly, displays a bunch of gibberish there. How did the author know that's where the pickpocket chance was?
2) so B8 is mov, C3 is retn...wait, how did he designate the eax register?
3) Why did he need 3 elements to get 0x0100?
4) Regardless of if these are standard opcodes or skyrim specific, how do I find out what the opcodes are?
IDK, my only assembly experience has been purposely breaking some commands in Final Fantasy Tactics...and the PS1 is a MIPS system, I assume things are different for x86 systems.
Its also possible I have no idea what I'm talking about.
Edit: Found an x86 opcode reference.