Raised This Month: $ Target: $400
 0% 

Calculating a virtual function offset from a signature


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 09-29-2010 , 20:28   Calculating a virtual function offset from a signature
Reply With Quote #1

I have come up with this rather simple solution for calculating a virtual offset of a function given it's signature. My only annoyance with this solution is that it requires an object with the respective virtual table in order to calculate the offset.

I would quite like a solution which does not require an object in order to calculate the offset mainly so all the calculations can be done when the plugin loads rather than when the first instance of an object appears. Other than reading op-codes from the class constructor (which would require another signature), is there another method of locating the address of a virtual table, using RTTI perhaps?

Here is what I have currently: http://hg.paulclothier.com/OBV_CHax/...nsion.cpp#l150 and yes I know, there's some terri-bad coding in there but I am only interested in the concepts at the moment.
Wazz is offline
 



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 07:10.


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