I thought I knew my calling conventions... I know my __cdecl from my __stdcall, I know how __thiscall works. I even know the rarely-used __fastcall. But what the hell is this??
Code:
; Attributes: bp-based frame
sub_6A9290 proc near
var_2D0= qword ptr -2D0h
var_2BC= byte ptr -2BCh
var_2B4= dword ptr -2B4h
var_9C= dword ptr -9Ch
var_90= dword ptr -90h
var_8C= dword ptr -8Ch
var_18= dword ptr -18h
var_14= dword ptr -14h
var_10= dword ptr -10h
var_9= byte ptr -9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr 8
push ebp
mov ebp, esp
sub esp, 2BCh
push ebx
push esi
push edi
push 0BE0h
mov edi, eax
mov eax, [edi+4]
Note that eax is passed in and used as-is. This doesn't conform to any of the cconvs I'm aware of, yet I've seen it a couple of times in the WoW code and it's throwing me for a loop.
Anyone? I can certainly account for eax here, but it makes me curious. Has WoW invented a new calling convention, or is there more here than meets the eye?
EDIT: reading x86 calling conventions - Wikipedia, the free encyclopedia, it appears that there are a LOT of calling conventions that I wasn't aware of (who knew?). But come on... is WoW really written in Delphi?