codecave - Calculate 64bit jmp for code cave in c# -


i cannot solve problem. appreciated. want create jmp allocated memory. if check calculation cheat engine allocated memory fine. cause cheat engine allocates memory in higher region. allocated memory e.g: 0x870000 , adress want create jmp at: 7ffde65f5184.

console.writeline("towrite: {0:x}", towrite.toint64()); /*towrite: 7ffde65f5184*/ intptr allocation = virtualallocex(openproc, intptr.zero , 0x1024, allocationtype.commit | allocationtype.reserve, memoryprotection.executereadwrite);  console.writeline("allocation: {0:x}", allocation.toint64()); /* allocation: 870000*/  intptr jmp = new intptr((towrite.toint64() - (allocation.toint64() + 5)));  byte[] bytes1 = bitconverter.getbytes(jmp.toint64());   byte[] bytes2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, }; bytes2[0] = 233; bytes2[1] = bytes1[0]; bytes2[2] = bytes1[1]; bytes2[3] = bytes1[2]; bytes2[4] = bytes1[3]; /*nops*/ bytes2[5] = 144; bytes2[6] = 144; bytes2[7] = 144; bytes2[8] = 144; uintptr written = new uintptr(); writeprocessmemory(openproc, towrite, bytes2, 9, out written); 

50% of result correct. can help?

this result:

7ffde65f5184 - e9 77ae271a           - jmp 7ffe00870000 

why there 7ffe00 in front of needed jmp adress ? if choose value intptr.zero in virtualallocex return value 0 - dont know why! know not coded, first of want understand problem , how can solve issue.

thanks guys!

wow guys! ve inspired me , got solution ... mem_top_down did job! much!


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -