Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Hooked use
Results 1 to 5 of 5

Thread: Hooked use

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    8

    Hooked use

    Hello,
    I have problem with hooked Tibia 7.72 use.
    I hooked it like this:
    typedef void _UseContainerItem(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
    static _UseContainerItem *UseContainerItem = (_UseContainerItem*)0x438FA6;
    When Tibia calls this function it looks like this:

    But when i call this function:
    UseContainerItem(0, 2, 0xE0F, 2, 0x40, 0xFFFF);
    it looks like this:

    Could anyone tell me what is wrong?

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    the 0x40 argument is carried via EDI, not the stack.

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    8
    So how should i modify this?

  4. #4
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    Not sure if this will work, could you show us some more of what is done in asm before the function is called?

    Code:
    DWORD arg5 = 0xFFFF;
    DWORD arg4 = 2;
    DWORD arg3 = 0xE0F;
    DWORD arg2 = 2;
    DWORD arg1 = 0;
    DWORD EDIarg = 0x40;
    
    DWORD function = 0x438FA6;
    
    __asm{
    	PUSH arg1
    	PUSH arg2
    	PUSH arg3
    	PUSH arg4
    	PUSH arg5
    	MOV EDI, EDIarg
    	CALL function
    }

  5. #5
    Junior Member
    Join Date
    Jan 2011
    Posts
    8
    Same thing :|


    @edit
    ok, i figured it out.
    Just wrong address. I should enter the function first.
    Last edited by Peter12; 02-24-2015 at 10:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •