Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 20:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



how to get the right address to hook

Discussion on how to get the right address to hook within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2020
Posts: 163
Received Thanks: 15
how to get the right address to hook

Hello guys

i'm new at c++ i check florine dev kit util.cpp
i found this

Code:
 replaceOffset(0x00682AFC, addr_from_this(&CIFItemComparison::AppendAdvancedInfo)); // set
replaceOffset(0x00682D6E, addr_from_this(&CIFItemComparison::AppendAdvancedInfo)); // accs
replaceOffset(0x00682FBE, addr_from_this(&CIFItemComparison::AppendAdvancedInfo)); // wep
replaceOffset(0x0068320E, addr_from_this(&CIFItemComparison::AppendAdvancedInfo)); // shield
i want the same thing for other items like avatars

how to get the address like 0x00682AFC
for avatars

i tried to debug and tried to hook this address 0x006825BB

but game crashing when i hover on avatar thank you
kotsh23 is offline  
Old 09/20/2021, 09:10   #2
 
JellyBitz's Avatar
 
elite*gold: 0
Join Date: Sep 2018
Posts: 419
Received Thanks: 943
I barely knows ASM but I was able to find the cause about it because at my point of view, it was the places where that popup window could be shown, not because item type so there was my curiosity about it.

Then I start tracking up the calls to these functions.
I find out after comparing some registers that everything starts at 0x00686CC7, it is some sort switch/case if you look into the assembly. I end up placing hooks on these root cases and looked like this:

Util.cpp

CIFSlotWithHelp.h

CIFSlotWithHelp.cpp

Having this setup, we're able to filter the item type and add text at start, or at the end from popup window. Or even deeper, overwrite all to our preference.

Here is a quick example to know how to filter item types through the item type ID.
JellyBitz is offline  
Thanks
5 Users
Old 09/20/2021, 10:38   #3

 
elite*gold: 260
Join Date: Aug 2008
Posts: 560
Received Thanks: 3,779
Quote:
Originally Posted by kotsh23 View Post
i want the same thing for other items like avatars

how to get the address like 0x00682AFC
for avatars

i tried to debug and tried to hook this address 0x006825BB

but game crashing when i hover on avatar thank you
Ok, your question in my thread makes sense now. I didn't see you had a thread asking about this.

Are you using this release: ?

I can't find the code you posted in vanilla SRO_DevKit, but maybe I'm on the wrong branch. Anyways, I just checked into this real fast, and it looks like you're close, but just grabbed the wrong address.

First, if you look at the 4 addresses referenced:

Notice how the code looks. When you go to the address you posted, 0x006825BB, it does not look like those, so that's why it crashes (but you already know you have the wrong address).

To find the right address, first, you need to trace up one level to see what calls the 4 existing known functions. You have to scroll up quite a ways to find the start of the function, and then check what code references it. So for example, CTRL + G to 0x00682D6E (accessory). Scroll all the way to the top of the function (00682BA0). Then hit X on that line and choose the call reference that pops up.

In this case, it's pretty simple, it's a switch statement that calls a function based on the slot type.


Highlighted is where we land for the accessory, so if we check the logic (I have a few labels placed), you would then just breakpoint on the switch selector to figure out what value gets passed when you hover over an avatar slot, follow the function (which you did already), and then find the function that "visually" looks like the other 4 (this is the part you missed).

Scroll down more in the function you found to address 0x682735 and look at the code vs the other 4.

See how it visually looks the same? I'd venture a guess that'd be the address of the function you want to hook like the others, so give that a try. If it doesn't work, then you'll have to do some more digging, but just glancing at the code, I think this is the relevant address.
pushedx is offline  
Thanks
3 Users
Old 09/20/2021, 12:42   #4
 
elite*gold: 0
Join Date: Jul 2020
Posts: 163
Received Thanks: 15
Quote:
Originally Posted by JellyBitz View Post
I barely knows ASM but I was able to find the cause about it because at my point of view, it was the places where that popup window could be shown, not because item type so there was my curiosity about it.

Then I start tracking up the calls to these functions.
I find out after comparing some registers that everything starts at 0x00686CC7, it is some sort switch/case if you look into the assembly. I end up placing hooks on these root cases and looked like this:

Util.cpp

CIFSlotWithHelp.h

CIFSlotWithHelp.cpp

Having this setup, we're able to filter the item type and add text at start, or at the end from popup window. Or even deeper, overwrite all to our preference.

Here is a quick example to know how to filter item types through the item type ID.


Thank you boss
i tried with CIFSlotWithHelp but didnt work for me
but i used your code and your address with new class worked fine

thank you again


Quote:
Originally Posted by pushedx View Post
Ok, your question in my thread makes sense now. I didn't see you had a thread asking about this.

Are you using this release: ?

I can't find the code you posted in vanilla SRO_DevKit, but maybe I'm on the wrong branch. Anyways, I just checked into this real fast, and it looks like you're close, but just grabbed the wrong address.

First, if you look at the 4 addresses referenced:

Notice how the code looks. When you go to the address you posted, 0x006825BB, it does not look like those, so that's why it crashes (but you already know you have the wrong address).

To find the right address, first, you need to trace up one level to see what calls the 4 existing known functions. You have to scroll up quite a ways to find the start of the function, and then check what code references it. So for example, CTRL + G to 0x00682D6E (accessory). Scroll all the way to the top of the function (00682BA0). Then hit X on that line and choose the call reference that pops up.

In this case, it's pretty simple, it's a switch statement that calls a function based on the slot type.


Highlighted is where we land for the accessory, so if we check the logic (I have a few labels placed), you would then just breakpoint on the switch selector to figure out what value gets passed when you hover over an avatar slot, follow the function (which you did already), and then find the function that "visually" looks like the other 4 (this is the part you missed).

Scroll down more in the function you found to address 0x682735 and look at the code vs the other 4.

See how it visually looks the same? I'd venture a guess that'd be the address of the function you want to hook like the others, so give that a try. If it doesn't work, then you'll have to do some more digging, but just glancing at the code, I think this is the relevant address.

man you really great thank you none wanted to tell me how to debug all say i have no clue or no idea like mr #Laag
but you really a good person i hope you get nice life and good health
kotsh23 is offline  
Reply


Similar Threads Similar Threads
You can help me GM == Address ? AOE == Address ? RANGE == Address ?
01/12/2016 - Cabal Online - 3 Replies
Dumped Cabal GM == Address ? AOE == Address ? RANGE == Address ? download Dumped Cabal == http://www.elitepvpers.com/forum/attachment.php?at tachmentid=247210&stc=1&d=1452193708
T/B > Wallhack address using CE or trade with AOE address
08/19/2011 - Cabal Online Trading - 0 Replies
As stated above im looking serious trader or someone who can help me since i failed to find wallhack address USING CE. Im trading with aoe address or buy via paypal.
[HELP] Finding Gm address & AoE address on CABAL
10/23/2008 - Cabal Online - 0 Replies
How can i find Gm address and Aoe Address on CABAL ? im using CE please help me. TNX! :bandit:



All times are GMT +1. The time now is 20:26.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.