[Help] Program freeze on injection menu

User Tag List

Results 1 to 3 of 3
  1. #1
    =manzarek='s Avatar Member
    Reputation
    3
    Join Date
    Feb 2010
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] Program freeze on injection

    Hi,
    I use ihook for my injections, but it freeze when executing:

    bool ManagedFasm::Inject(DWORD dwAddress)
    {
    return this->Inject(m_hProcess, dwAddress);
    }

    From fasmdll_managed

    My Code:
    Code:
     string command = "DoEmote(\"Dance\")";
                uint Frame_Execute_Offset = (uint)Offsets.EndScene.FrameScript_ExecuteBuffer + (uint)wowBase; // Lua_DoString
                Memory.OpenProcess(MyPid);
                //uint ret = Memory.VirtualAllocEx(Memory.ProcessHandle, 0, 1024, Memory.MemoryAllocType.MEM_COMMIT | Memory.MemoryAllocType.MEM_RESERVE, Memory.MemoryProtectType.PAGE_EXECUTE_READWRITE);
                uint ret = Memory.AllocateMemory(Encoding.UTF8.GetBytes(command).Length + 1);
                Memory.WriteBytes(ret, Encoding.UTF8.GetBytes(command));
                String[] asm = new String[] 
                {
                    "mov eax, " + ret,
                    "push 0",
                    "push eax",
                    "push eax",
                    "mov eax, " + Frame_Execute_Offset,
                    "call eax",
                    "add esp, 0xC",
                    "retn",    
                };
                Hook.InjectAndExecute(asm);
                Hook.Restore();
    Local variables on BP:
    [Help] Program freeze on injection-7bc332ad73e8ab45b05359168544ea78-png
    Before calling InjectAndExecute:
    [Help] Program freeze on injection-2994ab39ab9bcef43e975b0f81fe9e1f-png

    VS i running with administrator right fasm is compiled with .net 4.0.

    What did i make wrong?

    +Bonus noob question: is IHook detected by Warden.

    Thank you
    Attached Thumbnails Attached Thumbnails [Help] Program freeze on injection-ff000909b82c89483b123aa61d3bb4b7-png  

    [Help] Program freeze on injection
  2. #2
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Use the internal Lua library functions rather than these FrameScript functions. Being completely documented, they're much easier to understand how you should call them.

    Use these functions instead:
    luaL_loadbuffer: Lua: Functions and Types: luaL_loadbuffer - 0x0011EBA0 in 5.0.5 (rebased).
    lua_pcall: Lua: Functions and Types: lua_pcall - 0x0011DF50 in 5.0.5 (rebased).
    Last edited by Jadd; 09-13-2012 at 04:19 PM.

  3. #3
    =manzarek='s Avatar Member
    Reputation
    3
    Join Date
    Feb 2010
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the advise i'll take a look.
    I should not ask question after midnight when i'am tired,

    This is working:
    string command = "DoEmote(\"Dance\")";
    uint Frame_Execute_Offset = (uint)Offsets.EndScene.FrameScript_ExecuteBuffer + (uint)wowBase; // Lua_DoString
    Memory.OpenProcess(MyPid);
    //uint ret = Memory.VirtualAllocEx(Memory.ProcessHandle, 0, 1024, Memory.MemoryAllocType.MEM_COMMIT | Memory.MemoryAllocType.MEM_RESERVE, Memory.MemoryProtectType.PAGE_EXECUTE_READWRITE);
    uint ret = Memory.AllocateMemory(Encoding.UTF8.GetBytes(command).Length + 1);
    Memory.WriteBytes(ret, Encoding.UTF8.GetBytes(command));
    String[] asm = new String[]
    {
    "mov eax, " + ret,
    "push 0",
    "push eax",
    "push eax",
    "mov eax, " + Frame_Execute_Offset,
    "call eax",
    "add esp, 0xC",
    "retn",
    };
    uint D3D9_Device;
    D3D9_Device = Memory.Read<uint>((uint)Memory.BaseAddress + (uint)Offsets.EndScene.Direct3D9__Device);
    D3D9_Device = Memory.Read<uint>(D3D9_Device + (uint)Offsets.EndScene.Direct3D9__Device__OffsetA);
    D3D9_Device = Memory.Read<uint>(D3D9_Device);
    D3D9_Device = Memory.Read<uint>(D3D9_Device + (uint)Offsets.EndScene.Direct3D9__Device__OffsetB);
    Hook.Apply(D3D9_Device, (uint)Offsets.EndScene.ClntObjMgrGetActivePlayerObj, (uint)Offsets.EndScene.FrameScript_ExecuteBuffer, (uint)Offsets.EndScene.FrameScript__GetLocalizedText);
    Hook.InjectAndExecute(asm);
    Hook.Restore();
    I forgot to initialize Hook, i go kill myself now.

    Thank you anyway Jadd

Similar Threads

  1. Sleep helping program? Monitor Tinting
    By Parog in forum Community Chat
    Replies: 6
    Last Post: 04-15-2010, 02:10 AM
  2. [Help] Program error
    By Jonthe838 in forum Programming
    Replies: 4
    Last Post: 04-08-2009, 05:02 AM
  3. [Help] Programing help
    By Jonthe838 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 02-21-2009, 08:04 PM
  4. [Help][C++]Freeze doesn't work!
    By Timzorize in forum Programming
    Replies: 6
    Last Post: 02-04-2009, 10:10 PM
  5. [Help] Program Disabler
    By Brandan1337 in forum Programming
    Replies: 6
    Last Post: 11-21-2008, 01:45 PM
All times are GMT -5. The time now is 10:49 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search