i trying perform pe base relocation , whole concept, data structures, method , why doing not problem that. days have been trying code work whatever keep getting undefined/wrong relocation types in variable called relocationtype(obviously) , have feeling might getting wrong offsets aswell allthought when checked debugger few bytes off, regardless cause crash. i should inform of relocation types correct, , either image_rel_absolute or image_rel_based_highlow 1 expect, after few loops finds wrong values. not have clue happening, suspect pbaserelocation might few bytes of reason after while. here relocation function: int fixrelocs(dword imagebase, pimage_nt_headers ntheaders, image_base_relocation *reloc, unsigned int size) { pimage_base_relocation pbaserelocation; image_data_directory datadir; pword list; dword delta; dword count; dword *patchaddr; unsigned char* dest; unsigned char* base = (unsigned char*)imagebase; bool ndelta = false; datadir = (image_data_directory)ntheader...
Comments
Post a Comment