Skip to content

Instantly share code, notes, and snippets.

View angavrilov's full-sized avatar

Alexander Gavrilov angavrilov

View GitHub Profile
@angavrilov
angavrilov / gist:972531
Created May 14, 2011 19:21
function names
08117480 flagarrayst::has_flag{flag}
080e49d0 world::?getMapBlock{x,y,z}
089d53b0 world::?getMaterial{subidx,index}
088c9d00 ??computeClothingInsulation
088c9830 ??computeClothingInsulation2
0813a840 ??computeClothingInsulation3
08a3fe70 world::?handleFlows
080801f0 world::?handleBlockTemps
0895d540 ??computeCreatureTemp
08946b70 ??computeBodyPartTemp
@angavrilov
angavrilov / gist:961587
Created May 8, 2011 18:44
895d540: compute creature temperature
args: eax, edx, ecx, stack
args: creature, arg_temp, arg2#1, arg3/*10*/
/* offsets:
creature:
0x308 vector* body_part_info_vec
0x654 vector body_part_temp_vec
inventory item:
@angavrilov
angavrilov / gist:926972
Created April 19, 2011 07:45
mmap injection on linux (emulation of VirtualAllocEx)
/* Support for executing system calls in the context of the game process. */
static const int injection_size = 4;
static const char nop_code_bytes[injection_size] = {
/* This is the byte pattern used to pad function
addresses to multiples of 16 bytes. It consists
of RET and a sequence of NOPs. The NOPs are not
supposed to be used, so they can be overwritten. */
0xC3, 0x90, 0x90, 0x90