Need help in asm menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    N1ghtmaree's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help in asm

    Trying to call ClntObjMgrGetActivePlayer
    Asm code is:
    Code:
    "call " + ((uint)Globals.WoW.MainModule.BaseAddress + Offsets.ObjectManager.ClntObjMgrGetActivePlayer)
    "retn"
    Then i have to get returned value. Here is the trouble... How int64 is returned? I googled and found its returned in edx + eax pair. But that looks a bit strange in Olly.

    So can someone help me with this?

    Need help in asm
  2. #2
    serock1's Avatar Member
    Reputation
    2
    Join Date
    Feb 2009
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As you know result of function is in edx + eax pair, why not store it somewhere before "ret"?

    I never used memory injecting library and C#, so I cannot show you the code. But I guess it is like mostly:

    Code:
    code_piece = mem_lib.new();
    code_piece.allocate_variable("guid", "uint64");
    string _ar_asm[] =
    {
        "call " + ((uint)Globals.WoW.MainModule.BaseAddress + Offsets.ObjectManager.ClntObjMgrGetActivePlayer),
        "mov " + code_piece.variable_address("guid") + ", eax",
        "mov " + (code_piece.variable_address("guid") + 4) + ", edx",
        "retn",
    };
    code_piece.add_code(_ar_asm);
    Sorry for just pseudo code.
    Last edited by serock1; 03-23-2011 at 10:57 PM.

  3. #3
    N1ghtmaree's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, sure the way is to store it somewhere (thats how i hook another functions). I just wasnt sure that ret value is in edx + eax.[COLOR="Silver"]
    Last edited by N1ghtmaree; 03-24-2011 at 06:49 AM.

  4. #4
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oy, you people and your "I'm out-of-process!" (just, injecting ASM via string compilation and then running it locally...) code.

    If you were running in-process, you just define a function pointer that returns an __int64 and -- bam -- you're done. But y'all gotta stick with your faux-security...
    Don't believe everything you think.

  5. #5
    N1ghtmaree's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ofc, but im too lazy to host CLR to inejct C# dll (C++ is too hard for me atm. (.NET is coolyeah)). Im not so stupid to think that writing asm code to memory makes any difference from injected dll. Also its nice purpose to learn how everyting works.

  6. #6
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can inject the CLR in about 50 lines of code, and it's all copy-pasteable right here from MMOwned. I think Apoc & co posted some really nice code samples a while back.

    site:mmowned.com inject CLR - Google Search

    Once you've done that, just write your bot in C#, which has nice native support for 64 bit ints through p/invoke.

    I don't mean to be rude, but I will NEVER understand why people use that hacky "build the ASM via a string" method. There's simply NO good reason, if you're doing that, not to inject into the process.
    Don't believe everything you think.

  7. #7
    N1ghtmaree's Avatar Member
    Reputation
    1
    Join Date
    Jul 2010
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've injected CLR some time ago already. Had problems with exporing my C++ dll function to call it properly (had to use offsets). But calling exported function is the most correct way to pass base directiory of loader to DLL i think.

Similar Threads

  1. Debugging wow - ASM [intro] need help
    By abuckau907 in forum WoW Memory Editing
    Replies: 13
    Last Post: 06-20-2009, 11:24 AM
  2. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  3. I need help
    By ff9pro in forum World of Warcraft General
    Replies: 4
    Last Post: 07-05-2006, 08:43 PM
  4. Need help
    By zamp in forum World of Warcraft General
    Replies: 1
    Last Post: 06-24-2006, 10:54 PM
  5. Need Help
    By Slumlorde in forum World of Warcraft General
    Replies: 4
    Last Post: 06-23-2006, 08:20 AM
All times are GMT -5. The time now is 06:57 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