Raised This Month: $ Target: $400
 0% 

[EXTENSION] Midhooks


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Scag
AlliedModders Donor
Join Date: May 2017
Location: Crashing Hale
Old 09-20-2023 , 00:51   [EXTENSION] Midhooks
Reply With Quote #1

Hi. I wrote an extension that exposes midfunc/inline hooks for SourceMod.

Sometimes, you have a function you want to hook. And sometimes, the logic you want to fiddle with is way far down under deep in there, and it would be really, really hard to work to get what you want with just a hook. Sometimes, you can recreate the function yourself, but that might not work if it's super big and complicated. Sometimes, you might be able to patch over it, but if you want to execute more logic, then that also might not work. In those some times, you may need to deploy a midfunc hook.

By hand, it isn't very fun, you have to patch in a jump that goes somewhere that contains your own assembly, and then that assembly jump back when you're done. That stinks even more if you need to execute some bonus code.

And thus, that's why I wrote this extension. Here's how it works.

How it works and a test case:
Spoiler


SOURCE
RELEASES
__________________
Over-engineering is underrated.

GitHub
BTC
ETH

Retired

Last edited by Scag; 09-22-2023 at 23:40.
Scag is offline
 


Thread Tools
Display Modes

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 17:17.


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