Results 1 to 3 of 3
  1. #1
    corky12831's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    new york
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Asleep

    Unhappy need some help with CE code

    originalcode:
    fstp dword ptr [edi+eax*8+04]
    pop edi

    now what i want to do with this is have EAX which would be the "stored value"
    The Acculmulator register. It can also be used as storage. <

    now i know pop EDI means is going to take the value that is in edi "transfer the number" to something

    but what i want to do is add the value of iunno 10 or somthing so EAX now reads EAX

    alloc(newmem,2048)
    label(returnhere)
    label(originalcode)
    label(exit)
    label(amount)
    label(type_coins)


    newmem:
    pushad
    mov [amount],(float)10 // the amount i want EAX to be


    push [amount]
    push type_coins
    push 01
    add esp,0c


    popall

    mov eax,-1000 // i am under the impression of it that this is the problem.
    originalcode:
    fstp dword ptr [edi+eax*8+04] // the code i need to edit.
    pop edi


    exit:
    jmp returnhere


    amount:
    db 00 00 00 00
    type_coins:
    db 'coins'
    db 00



    this above is the code i have so far i just wonder how i would make it so i have 10 in EAX any tips or help? forgot to add the fact that right now all it does is freeze the value @ its current state 5 and if i build somthing or sell somthing it remains at one but still spends the coins so im not sure what i did wrong =(

    ---------- Post added 11-07-2012 at 12:21 AM ---------- Previous post was 11-06-2012 at 10:54 PM ----------

    so in a nutshell i want edi+eax*8+04 < to edit this so that it will
    newmem:
    pushad
    mov [amount],(float)10
    accept this.

  2. #2
    corky12831's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    new york
    Posts
    39
    Reputation
    10
    Thanks
    2
    My Mood
    Asleep
    3 days and nothing come on guys

  3. #3
    selfadmirer's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Posts
    20
    Reputation
    10
    Thanks
    3
    My Mood
    Bashful
    Um if you just want to put 10 into eax then why don't you just do that. Like


    push eax
    mov eax, 10
    pop eax

    But that's not really what you are after I think, Because the FTSP is a mov pop, and the value in [] is edi+eax+4*8 I mean you could just break and find edi, eax and mov four to get the value of eax+4 add them and multiply but that's lot of work I would just replace it with your own label like

    alloc(newmem,2048)

    label(turnItOn)
    label(originalCode)
    label(WantedNumber)
    label(DontWantedNumber)

    registersymbol(WantedNumber)
    registersymbol(DontWantedNumber)

    [enable]
    turnItOn:
    fstp dword ptr [WantedNumber]
    pop edi
    jmp DontWantedNumber

    WantedNumber:
    dd (float) 10.0

    DontWantedNumber:
    fstp dword ptr [edi+eax*8+04]
    pop edi

    [disable]
    originalCode:
    fstp dword ptr [edi+eax*8+04]
    pop edi

    unregistersymbol(WantedNumber)
    unregistersymbol(DontWantedNumber)

    dealloc(newmem)

    If its a multiplayer game you might want to add a cmp switch to check the player and make sure you are not also helping them. This is easy to do. Most games store you as the default player one on your console. So just search for a 1 on your turn and 0 on opponents turn if 2 player normally works. Or just 1 on my turn and not 1 on opponent. If this fails then try you as a 0 and not 0 for opponent. If not, get creative. Once you have this find the offset and get a good static address and just add it like this

    AOBSCAN(Player, ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
    label(Player)
    registersymbol(Player)

    cmp [Player], (int)1 // if the player value you found for your turn is = to 1// compare Player to Number 1
    jne DontWantedNumber
    je WantedNumber
    jmp originalCode

    Blah blah. I think I covered your question. Only 7 years later.

    Player:
    dd (int)0

Similar Threads

  1. [Solved] Need Some Help With Coding
    By Arthur542 in forum Counter-Strike 2 Help
    Replies: 4
    Last Post: 05-27-2017, 09:14 AM
  2. [Help Request] Need some help with my Project
    By Vertual~ in forum Call of Duty Modern Warfare 3 Help
    Replies: 2
    Last Post: 01-30-2012, 04:33 PM
  3. [Help] Need Some Help With This Code
    By Gbstar in forum Visual Basic Programming
    Replies: 1
    Last Post: 01-23-2012, 11:32 PM
  4. [Help Request] Need some help with my server premisions
    By pero122 in forum Minecraft Help
    Replies: 5
    Last Post: 11-07-2011, 10:55 PM
  5. [Help Request] I need some help with binding eps7
    By v1zhaixingv1 in forum Vindictus Help
    Replies: 3
    Last Post: 05-18-2011, 09:25 PM