Raised This Month: $32 Target: $400
 8% 

Solved [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 04-01-2021 , 05:45   [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #1

I'm trying to add Windows support for the Boomer Horde Equalizer plugin from the L4D2 Competitive Rework repo but I don't know how to find its offset.
PHP Code:
"Games"
{
    
"left4dead2"
    
{
        
"Addresses"
        
{
            
"signature" "NextBotManager::OnCharacterVomitedUpon"
        
}
        
        
"Offsets"
        
{
            
"WanderersCondition"
            
{
                
"windows"    "153"
                "linux"     "475"
            
}
        }
        
        
"Signatures"
        
{
            
"library"    "server"
            "linux"        "@_ZN14NextBotManager22OnCharacterVomitedUponEP20CBaseCombatCharacter"
            "windows"    "\x55\x8B\xEC\x8B\x45\x08\x83\xEC\x0C\x56\x57"
            
/* 55 8B EC 8B 45 08 83 EC 0C 56 57 */
            /* Look for unique string: "(MOB) %d wanderers grabbed for an IT mob of desired size %d.\n" */
        
}
    }

Thanks BHaType!

Last edited by cravenge; 04-01-2021 at 14:16. Reason: Clarity
cravenge is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 04-01-2021 , 08:01   Re: [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #2

The signature is still the same

153 - offset for "WanderersCondition"
3B FE 7D 0E - original bytes
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-01-2021 , 08:06   Re: [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #3

nvm

Last edited by Bacardi; 04-01-2021 at 08:07.
Bacardi is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 04-01-2021 , 10:23   Re: [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #4

Quote:
Originally Posted by BHaType View Post
The signature is still the same

153 - offset for "WanderersCondition"
3B FE 7D 0E - original bytes
Oh, I found the signature already. I was only looking for the offset and the bytes to patch the function.

Edit: I'm kinda curious how you got that offset.

Last edited by cravenge; 04-01-2021 at 10:34.
cravenge is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 04-01-2021 , 19:02   Re: [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #5

If you look at the source code, you can see that 4 bytes are patched at the address OnCharacterVomitedUpon + 475, now you can calculate the address and see in the IDA why they noped 4 bytes


IDA

Looking at this address in the IDA you can see that these 4 bytes are responsible for checking and if the first operand is larger than the other then the SpawnITMob function will not be called

Next, you need to find about the same thing on Windows (In your case you can simply use a unique string)

IDA

To get an offset just subtract two addresses

0x99 = 153 = 0x49B899 - 0x49B800
__________________
cry

Last edited by BHaType; 04-02-2021 at 01:43. Reason: 0x93 -> 0x99 - fixed hex offset
BHaType is offline
Send a message via AIM to BHaType
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 04-01-2021 , 23:13   Re: [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #6

Quote:
Originally Posted by BHaType View Post
If you look at the source code, you can see that 4 bytes are patched at the address OnCharacterVomitedUpon + 475, now you can calculate the address and see in the IDA why they noped 4 bytes


IDA

Looking at this address in the IDA you can see that these 4 bytes are responsible for checking and if the first operand is larger than the other then the SpawnITMob function will not be called

Next, you need to find about the same thing on Windows (In your case you can simply use a unique string)

IDA

To get an offset just subtract two addresses

0x93 = 153 = 0x49B899 - 0x49B800
Ah, I see. Thanks for the informative guide, it helps me a lot!
cravenge is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 04-02-2021 , 00:34   Re: [L4D2] Need help finding offset for NextBotManager::OnCharacterVomitedUpon
Reply With Quote #7

Hi,
I'm looking forward to this plugin,

Because I'm understanding how does the infected spawning works,
More specifically about how does, what is the formula and why he grabs the infected from wanderers,

BW,
jeremyvillanueva is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode