Results 1 to 2 of 2
  1. #1
    XtremeCoder's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    [C++] how to save ECX Register Addresses in one Array

    Hello
    this's from fleep Mid Hooking Tutorial , the program work
    but i want to get all ECX register addresses since it shared instruction ,i want every ECX address be add automatically to my array , and save them in array so i can modified them in foreach (i want every player jump with me)

    i use the hooking to get the register address
     
    __asm
    {
    FLD DWORD PTR[ECX + 0x14]
    MOV [YaxisRegister], ECX
    FSTP DWORD PTR[EAX + 0x74]
    jmp [FlyingJmpBack]
    }


    this's how to write to jump address
    *(float *)YAxisPtr += 8.0;

    this's how i did it in lua that in cheat engine

     
    arrayofbytes = "xx xx xx xx xx"
    theresults = AOBScan(arrayofbytes ,"*W*X-C")
    jumpaddress=getAddress(stringlist_getString(theres ults,0))
    debug_setBreakpoint(jumpaddress)
    AlljumpAddresses = {}

    function debugger_onBreakpoint()
    AlljumpAddresses [ECX] = true
    return 1
    end

    foreach part :
    for i in pairs(AlljumpAddresses ) do
    writeFloat(i + 0x14, 2)
    end

  2. #2
    __readgsqword's Avatar
    Join Date
    Mar 2016
    Gender
    female
    Posts
    39
    Reputation
    10
    Thanks
    13
    ECX is just a register any function can alter depending on the calling convention. I assume you're referring to __thiscall? Where the instance pointer is stored in ECX? Regardless, if you want every address that goes into ecx, then you'd need to patch every section you feel ECX has a relevant value and move it into your array. It won't just magically go into your variables. Assuming you've patched every section, now all that's left is the array. Well you can do it by storing an index at some address then using that as the offset.
    Code:
    push eax
    mov eax,[indexpointer]
    mov dword ptr[DEADBEEF+eax],ecx
    inc eax
    mov [indexpointer],eax
    pop eax
    Something simple like that.

Similar Threads

  1. [Tutorial] How to change your MAC Address! *With Pics!*
    By FatEmoLLaMa in forum Combat Arms Hacks & Cheats
    Replies: 7
    Last Post: 08-13-2008, 09:20 AM
  2. How to find Unlimited Ammo addresses warrock
    By farbod in forum WarRock - International Hacks
    Replies: 0
    Last Post: 06-02-2008, 11:39 PM
  3. How can i freeze an address in C++
    By HeXel in forum C++/C Programming
    Replies: 3
    Last Post: 02-08-2008, 07:14 AM
  4. tell me how 2 save trainer on vb6 portable
    By lilbear40212 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 10-21-2007, 11:42 PM
  5. How to find U.Ammo addresses
    By TheRedEye in forum WarRock - International Hacks
    Replies: 20
    Last Post: 06-11-2007, 04:15 PM