[General] Assembler calling function menu

User Tag List

Results 1 to 1 of 1
  1. #1
    streppel's Avatar Active Member
    Reputation
    77
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [General] Assembler calling function

    Hey all,

    this is more like a general question about calling a function in another process via asm injection.
    the Function looks like
    Code:
    int _stdcall Function(float,float)
    so from what i know in an stdcall i simply push the values on the stack(from left to right) and call the function
    my code looks like this:
    Code:
                AO.Asm.Clear();
                AO.SuspendThread();
                uint codeCave = AO.AllocateMemory(0x1000);
                AO.Asm.AddLine("mov eax," + 0.0f);//first parameter (right one)
                AO.Asm.AddLine("push eax");
                AO.Asm.AddLine("mov eax," + 0.0f);//2nd parameter(the left one)
                AO.Asm.AddLine("push eax");
                AO.Asm.AddLine("mov eax," + (ModuleBase+0x1AE91));//this is the correct adresse where the function is i want to call
                AO.Asm.AddLine("call eax");
                AO.Asm.AddLine("retn");
                AO.Asm.InjectAndExecute(codeCave);
                AO.FreeMemory(codeCave);
                AO.ResumeThread();
    shouldn't it work this way? cause when i try to run this code, the application crashes(giving a custom gamespecific "game crashed" messagebox even tho in the background the game remains intact as long as you don't click anything in the massagebox

    thanks for your help
    streppel

    PS: i can post the code of the function itself too, but wanted to know if my approach this way would be right

    [General] Assembler calling function

Similar Threads

  1. [C#]How to call function
    By RD49 in forum Diablo 3 Memory Editing
    Replies: 2
    Last Post: 10-25-2012, 04:40 AM
  2. [C#] Call functions without having to declare delegates
    By bigtimt in forum WoW Memory Editing
    Replies: 12
    Last Post: 05-26-2010, 01:44 AM
  3. [Out of Process] Calling functions in the VTable.
    By cenron in forum WoW Memory Editing
    Replies: 12
    Last Post: 01-31-2009, 08:39 PM
All times are GMT -5. The time now is 03:18 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search