Function at 0x46e980
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x3c]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
je 0x46ec72
mov eax, dword [edi]
test al, 1
je 0x46ead7
mov ebp, dword [esp + 0x38]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
push edi
push ebp
call fcn.0046ec80
mov esi, dword [esp + 0x58]
mov ecx, dword [esp + 0x24]
mov al, byte [edi]
add esp, 0x10
add esi, ecx
test al, 2
jne 0x46e9e6
push ebx
push edi
push ebp
call fcn.00470140
add esp, 0xc
mov ax, word [edi + 4]
mov edi, dword [esp + 0x40]
mov ebp, dword [esp + 0x30]
cmp ax, bx
je 0x46ea8e
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x54]
and edx, 0xffff
and ecx, 0xff
push edx
mov edx, dword [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x5c]
and ecx, 0xff
and eax, 0xffff
movsx ebx, si
push ecx
and edx, 0xffff
push eax
push edx
lea eax, [esp + 0x34]
push ebx
push eax
push edi
push ebp
call fcn.0046f9a0
mov eax, dword [esp + 0x8c]
lea ecx, [esp + 0x4c]
push 1
push ecx
movsx ecx, byte [esp + 0x90]
lea edx, [esp + 0x50]
push edx
mov edx, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x78]
push ecx
push edx
movsx ecx, word [esp + 0x5c]
mov edx, dword [esp + 0x78]
push edi
push eax
push ebx
push ecx
push edx
push ebp
call fcn.0046f020
add esp, 0x5c
xor ebx, ebx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x60]
add esi, ecx
cmp eax, ebx
je 0x46ec61
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
cmp ax, cx
je 0x46ec61
movsx edx, si
and ecx, 0xffff
push edx
push ecx
and eax, 0xffff
push edx
push eax
mov eax, dword [esp + 0x44]
push edi
push eax
push ebp
call sub.XLIB.dll_Ordinal_98
add esp, 0x1c
jmp 0x46ec61
shr eax, 1
xor esi, esi
test eax, 0x7fff
mov dword [esp + 0x28], esi
jle 0x46ec72
mov edi, dword [esp + 0x40]
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x48]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 4]
lea eax, [edx + esi*8]
mov dword [0x564710], eax
cmp word [eax], 0
je 0x46eb4a
test esi, esi
push eax
jne 0x46eb1c
mov eax, dword [esp + 0x3c]
push eax
call fcn.0046ed90
jmp 0x46eb26
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0046eeb0
mov edx, dword [0x564710]
add esp, 8
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x38]
push edx
push eax
call fcn.0046ef50
mov dword [esp + 0x18], eax
mov eax, dword [0x564710]
add esp, 8
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
push eax
push ecx
add ebx, edx
call fcn.0046eff0
add esp, 8
test ax, ax
je 0x46ec00
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x54]
and edx, 0xffff
and ecx, 0xff
push edx
mov edx, dword [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x5c]
and ecx, 0xff
and eax, 0xffff
movsx esi, bx
push ecx
and edx, 0xffff
push eax
push edx
lea eax, [esp + 0x34]
push esi
push eax
push edi
push ebp
call fcn.0046f9a0
mov eax, dword [esp + 0x8c]
lea ecx, [esp + 0x4c]
push 0
push ecx
movsx ecx, byte [esp + 0x90]
lea edx, [esp + 0x50]
push edx
mov edx, dword [esp + 0x70]
push eax
mov eax, dword [0x564710]
push ecx
push edx
movsx ecx, word [esp + 0x5c]
mov edx, dword [esp + 0x78]
push edi
push eax
push esi
push ecx
push edx
push ebp
call fcn.0046f020
mov esi, dword [esp + 0x84]
add esp, 0x5c
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x60]
add ebx, ecx
test eax, eax
je 0x46ec44
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
cmp ax, cx
je 0x46ec44
movsx edx, bx
and ecx, 0xffff
push edx
push ecx
and eax, 0xffff
push edx
push eax
mov eax, dword [esp + 0x44]
push edi
push eax
push ebp
mov dword [esp + 0x7c], 0
call sub.XLIB.dll_Ordinal_98
add esp, 0x1c
mov ecx, dword [esp + 0x3c]
inc esi
mov dword [esp + 0x28], esi
mov edx, dword [ecx]
shr edx, 1
and edx, 0x7fff
cmp esi, edx
jl 0x46eaf6
xor ebx, ebx
cmp dword [esp + 0x24], ebx
je 0x46ec72
push ebx
push edi
push ebp
call sub.XLIB.dll_Ordinal_201
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret