flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > [bug] Using win32axp.inc breaks computed calls

Thread Post new topic Reply to topic
When all else fails, read the source

Joined: 24 Aug 2004
Posts: 19069
Location: In your JS exploiting you and your system
revolution 20 Sep 2014, 01:07
include 'win32axp.inc'

        dd      function1
        dd      function2

        stdcall [ebx*4+call_table],eax,edx,ecx  ;<--- error: invalid expression.


.end begin    
        stdcall [ebx*4+call_table],eax,edx,ecx      ;<--- error: invalid expression.
C:\<path>\fasm\include/win32axp.inc [58] stdcall [5]:
             if defined proc \# % & count@stdcall <> proc \# %
error: invalid expression.    
The expression evaluates to:
if defined [ebx*4+call_table]% & count@stdcall <> [ebx*4+call_table]%    
And the workaround of loading the address first into a register is not possible when there are no spare registers:
        mov     reg,[ebx*4+call_table]
        stdcall reg,eax,edx,ecx ;<--- Okay only if we have a spare register    
Post 20 Sep 2014, 01:07
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.