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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x7aca10]
xor eax, esp
mov dword [esp + 0x78], eax
mov al, byte [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov byte [esp + 0x14], al
xor eax, eax
push esi
push edi
mov edi, ecx
mov dword [ebx + 0x14], 7
mov dword [ebx + 0x10], 0
mov word [ebx], ax
mov eax, 0x2aaaaaab
mov dword [esp + 0x20], edi
mov ecx, dword [edi + 4]
sub ecx, dword [edi]
imul ecx
mov byte [esp + 0x13], 1
sar edx, 2
mov eax, edx
mov dword [esp + 0x14], 1
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x409dca
mov ecx, 0x18
mov dword [esp + 0x18], ecx
mov eax, dword [edi]
mov esi, 2
add eax, ecx
mov dword [esp + 0x38], 7
xor ecx, ecx
mov dword [esp + 0x34], 0
push 0xffffffffffffffff
push ecx
mov word [esp + 0x2c], cx
lea ecx, [esp + 0x2c]
push eax
call fcn.00405600
mov edi, dword [esp + 0x34]
lea ecx, [esp + 0x24]
xor eax, eax
mov dword [esp + 0x80], 7
cmp dword [esp + 0x38], 8
mov dword [esp + 0x7c], 0
cmovae ecx, dword [esp + 0x24]
cmp edi, esi
mov word [esp + 0x6c], ax
cmovb esi, edi
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], eax
mov word [esp + 0x3c], ax
test esi, esi
je 0x409a7a
mov edx, 0x4fc340
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x409a8a
add ecx, 2
add edx, 2
sub esi, 1
jne 0x409a67
xor eax, eax
test eax, eax
jne 0x409aa5
cmp edi, 2
jae 0x409a98
or eax, 0xffffffff
jmp 0x409aa3
movzx eax, word [ecx]
cmp ax, word [edx]
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x409a7c
mov eax, 2
cmp eax, edi
sbb eax, eax
neg eax
test eax, eax
mov esi, dword [esp + 0x14]
setne al
and byte [esp + 0x13], al
cmp esi, 1
jbe 0x409b04
push 1
xor eax, eax
mov dword [esp + 0x6c], 7
push 0x4fc314
lea ecx, [esp + 0x5c]
mov dword [esp + 0x6c], 0
mov word [esp + 0x5c], ax
call fcn.00405500
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x5c]
mov ecx, ebx
push eax
call fcn.00406b70
mov eax, dword [esp + 0x68]
cmp eax, 8
jb 0x409b04
inc eax
lea ecx, [esp + 0x54]
push eax
push dword [esp + 0x58]
call fcn.00406d90
cmp byte [esp + 0x13], 0
je 0x409bf7
lea eax, [esp + 0x3c]
push eax
lea edx, [esp + 0x70]
lea ecx, [esp + 0x28]
call fcn.00408350
add esp, 4
test al, al
je 0x409bf7
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x74]
mov ecx, ebx
push eax
call fcn.00406b70
cmp dword [esp + 0x4c], 0
je 0x409c7a
push dword [esp + 0x1c]
lea edx, [esp + 0x40]
lea ecx, [esp + 0x58]
call fcn.004088b0
mov esi, eax
add esp, 4
lea eax, [esp + 0x3c]
cmp eax, esi
je 0x409b9e
mov eax, dword [esp + 0x50]
cmp eax, 8
jb 0x409b7d
inc eax
lea ecx, [esp + 0x3c]
push eax
push dword [esp + 0x40]
call fcn.00406d90
xor eax, eax
mov dword [esp + 0x50], 7
push esi
lea ecx, [esp + 0x40]
mov dword [esp + 0x50], 0
mov word [esp + 0x40], ax
call fcn.00405720
mov eax, dword [esp + 0x68]
cmp eax, 8
jb 0x409bb6
inc eax
lea ecx, [esp + 0x54]
push eax
push dword [esp + 0x58]
call fcn.00406d90
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x58]
push 0x4fc354
push eax
call fcn.0040aba0
add esp, 0xc
mov ecx, ebx
push 0xffffffffffffffff
push 0
push eax
call fcn.00406b70
mov eax, dword [esp + 0x68]
cmp eax, 8
jb 0x409c76
inc eax
lea ecx, [esp + 0x54]
push eax
push dword [esp + 0x58]
call fcn.00406d90
jmp 0x409c76
push dword [esp + 0x1c]
lea edx, [esp + 0x28]
lea ecx, [esp + 0x58]
call fcn.004088b0
mov esi, eax
add esp, 4
lea eax, [esp + 0x24]
cmp eax, esi
je 0x409c4e
mov eax, dword [esp + 0x38]
cmp eax, 8
jb 0x409c2d
inc eax
lea ecx, [esp + 0x24]
push eax
push dword [esp + 0x28]
call fcn.00406d90
xor eax, eax
mov dword [esp + 0x38], 7
push esi
lea ecx, [esp + 0x28]
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
call fcn.00405720
mov eax, dword [esp + 0x68]
cmp eax, 8
jb 0x409c66
inc eax
lea ecx, [esp + 0x54]
push eax
push dword [esp + 0x58]
call fcn.00406d90
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x2c]
mov ecx, ebx
push eax
call fcn.00406b70
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
cmp eax, 8
jb 0x409ccf
mov ecx, dword [esp + 0x3c]
inc eax
cmp eax, 0x7fffffff
ja 0x409de3
add eax, eax
cmp eax, 0x1000
jb 0x409cc6
test cl, 0x1f
jne 0x409de3
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x409de3
sub ecx, eax
cmp ecx, 4
jb 0x409de3
cmp ecx, 0x23
ja 0x409de3
mov ecx, eax
push ecx
call fcn.004a780d
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
mov word [esp + 0x3c], ax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x4c], 0
cmp eax, 8
jb 0x409d3e
mov ecx, dword [esp + 0x6c]
inc eax
cmp eax, 0x7fffffff
ja 0x409de3
add eax, eax
cmp eax, 0x1000
jb 0x409d35
test cl, 0x1f
jne 0x409de3
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x409de3
sub ecx, eax
cmp ecx, 4
jb 0x409de3
cmp ecx, 0x23
ja 0x409de3
mov ecx, eax
push ecx
call fcn.004a780d
add esp, 4
xor eax, eax
mov dword [esp + 0x80], 7
mov word [esp + 0x6c], ax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x7c], 0
cmp eax, 8
jb 0x409d99
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, 0x7fffffff
ja 0x409de3
add eax, eax
cmp eax, 0x1000
jb 0x409d90
test cl, 0x1f
jne 0x409de3
mov eax, dword [ecx - 4]
cmp eax, ecx
jae 0x409de3
sub ecx, eax
cmp ecx, 4
jb 0x409de3
cmp ecx, 0x23
ja 0x409de3
mov ecx, eax
push ecx
call fcn.004a780d
add esp, 4
mov edi, dword [esp + 0x20]
mov eax, 0x2aaaaaab
add dword [esp + 0x18], 0x18
inc esi
mov dword [esp + 0x14], esi
mov ecx, dword [edi + 4]
sub ecx, dword [edi]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jae 0x409dca
mov ecx, dword [esp + 0x18]
jmp 0x4099ef
mov ecx, dword [esp + 0x84]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004a7ad5
mov esp, ebp
pop ebp
ret 8
call fcn.004adf2c
int3