Need Help with GetBattlefieldWinner menu

User Tag List

Results 1 to 14 of 14
  1. #1
    0_00_0's Avatar Member
    Reputation
    1
    Join Date
    Jun 2007
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Help with GetBattlefieldWinner

    I've been searching for the static addy for GetBattlefieldWinner but I've had no luck. I've also heard that it may be broken now. I'm going to keep searching, but I only found the 3.1.2 address. This project doesn't use BlackMagic so please don't point me in that direction. Alternativly, I can find another method to determine if the BG is finished. If anyone has any ideas that would be great!
    Last edited by 0_00_0; 07-23-2009 at 01:56 PM.

    Need Help with GetBattlefieldWinner
  2. #2
    ramey's Avatar Member
    Reputation
    45
    Join Date
    Jan 2008
    Posts
    320
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hook lua_Register, and find it yourself.

    Pattern the 3.1.2 address, and apply that to the new WoW.exe.

    Lua functions are _easy_ to get.

  3. #3
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    0x726C70

    What does BlackMagic have to do with using vfuncs?

  4. #4
    0_00_0's Avatar Member
    Reputation
    1
    Join Date
    Jun 2007
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by SKU View Post
    0x726C70

    What does BlackMagic have to do with using vfuncs?
    Sorry I haven't worked with BlackMagic yet i assumed that's how it worked.

    So that address doesn't work for me. I tried reading as a bool in C++ and tried monitoring on CE as a 1 byte. Am I supposed to be reading it differently?

  5. #5
    ramey's Avatar Member
    Reputation
    45
    Join Date
    Jan 2008
    Posts
    320
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by 0_00_0 View Post
    Sorry I haven't worked with BlackMagic yet i assumed that's how it worked.

    So that address doesn't work for me. I tried reading as a bool in C++ and tried monitoring on CE as a 1 byte. Am I supposed to be reading it differently?
    Lol. It is a lua function.

  6. #6
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats a really easy function to reverse. Have fun.

    Code:
    .text:00726C70 sub_726C70      proc near               ; DATA XREF: .data:00A42BECo
    .text:00726C70
    .text:00726C70 var_C           = qword ptr -0Ch
    .text:00726C70 arg_0           = dword ptr  8
    .text:00726C70
    .text:00726C70                 push    ebp
    .text:00726C71                 mov     ebp, esp
    .text:00726C73                 push    ecx
    .text:00726C74                 cmp     dword_11DA88C, 0
    .text:00726C7B                 jnz     short loc_726C92
    .text:00726C7D                 mov     eax, [ebp+arg_0]
    .text:00726C80                 push    eax
    .text:00726C81                 call    lua_pushnil
    .text:00726C86                 add     esp, 4
    .text:00726C89                 mov     eax, 1
    .text:00726C8E                 mov     esp, ebp
    .text:00726C90                 pop     ebp
    .text:00726C91                 retn
    .text:00726C92 ; ---------------------------------------------------------------------------
    .text:00726C92
    .text:00726C92 loc_726C92:                             ; CODE XREF: sub_726C70+Bj
    .text:00726C92                 mov     ecx, dword_11DA890
    .text:00726C98                 fild    dword_11DA890
    .text:00726C9E                 test    ecx, ecx
    .text:00726CA0                 jge     short loc_726CA8
    .text:00726CA2                 fadd    ds:dbl_9876D8
    .text:00726CA8
    .text:00726CA8 loc_726CA8:                             ; CODE XREF: sub_726C70+30j
    .text:00726CA8                 mov     edx, [ebp+arg_0]
    .text:00726CAB                 sub     esp, 8
    .text:00726CAE                 fstp    [esp+0Ch+var_C]
    .text:00726CB1                 push    edx             ; int
    .text:00726CB2                 call    lua_pushnumber
    .text:00726CB7                 add     esp, 0Ch
    .text:00726CBA                 mov     eax, 1
    .text:00726CBF                 mov     esp, ebp
    .text:00726CC1                 pop     ebp
    .text:00726CC2                 retn
    .text:00726CC2 sub_726C70      endp
    Second hint:

    Result: Integer - Faction/team that has won the battlefield. Results are: nil if nobody has won, 0 for Horde and 1 for Alliance in a battleground, 0 for Green Team and 1 for Yellow in an arena.
    Last edited by flo8464; 07-23-2009 at 04:19 PM.

  7. #7
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    signed int __cdecl lua_GetBattlefieldWinner(int a1)
    {
      signed int result; // eax@2
    
      if ( dword_11DA88C )
      {
        lua_pushnumber(a1, (long double)(unsigned int)dword_11DA890);
        result = 1;
      }
      else
      {
        sub_91AF60(a1);
        result = 1;
      }
      return result;
    }
    Hexrays really shines in situations like these.
    Last edited by kynox; 07-23-2009 at 06:15 PM.

  8. #8
    flo8464's Avatar Active Member
    Reputation
    30
    Join Date
    Apr 2009
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We are talking about the same function?
    And which version are you using? For me it looks like:

    Code:
    signed int __thiscall sub_726C70(int this, int a2)
    {
      signed int result; // eax@2
      double v3; // ST04_8@5
      int v4; // [sp+8h] [bp-4h]@1
    
      v4 = this;
      if ( dword_11DA88C )
      {
        __asm { fild    dword_11DA890 }
        if ( dword_11DA890 < 0 )
          __asm { fadd    ds:dbl_9876D8 }
        __asm { fstp    [esp+0Ch+var_C] }
        lua_pushnumber(a2, v3);
        result = 1;
      }
      else
      {
        lua_pushnil(a2);
        result = 1;
      }
      return result;
    }

  9. #9
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The latest, with FPU support. That double you see, 9876D8(4.294967296e9) is used for casting an integer into a double if it exceeds 2^32 from my understanding.

  10. #10
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kynox View Post
    The latest, with FPU support. That double you see, 9876D8(4.294967296e9) is used for casting an integer into a double if it exceeds 2^32 from my understanding.
    Inb4 "where do I download it".

    I still get people asking me where I downloaded the latest version of IDA (5.5), and they're shocked when I say "I bought it".

  11. #11
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Inb4 "where do I download it".

    I still get people asking me where I downloaded the latest version of IDA (5.5), and they're shocked when I say "I bought it".

    Well IDA 5.5 isn't that expensive. But Hex-Rays is like $2299 USD, i would buy it.. if i had that much money to spend on a hobby.

  12. #12
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Inb4 "where do I download it".

    I still get people asking me where I downloaded the latest version of IDA (5.5), and they're shocked when I say "I bought it".
    Did you buy HexRays too!?!?!?!!!

  13. #13
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Did you buy HexRays too!?!?!?!!!
    Nah. I intend to eventually though. Currently I don't use it very much, I prefer converting the code from ASM to C myself.

  14. #14
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Nah. I intend to eventually though. Currently I don't use it very much, I prefer converting the code from ASM to C myself.
    One thing i found useful for hex-rays but is when a structure is referenced it will automatically detect (providing it has enough information, form return types ect.) and name it accordingly in the C code.

Similar Threads

  1. Need help with sig
    By sudnrage111 in forum Community Chat
    Replies: 0
    Last Post: 09-24-2006, 02:12 AM
  2. Need help with weapon model edit!
    By Chewbbaca in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 09-20-2006, 07:02 PM
  3. need help with model editing experts please
    By sportstud10124 in forum Community Chat
    Replies: 0
    Last Post: 08-10-2006, 09:30 PM
  4. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  5. Need Help with WoW Glider
    By paypal in forum World of Warcraft General
    Replies: 2
    Last Post: 07-07-2006, 02:08 AM
All times are GMT -5. The time now is 10:57 PM. 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