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

Disassembly:
sub esp, 0xcc
mov eax, dword [0x455170]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
mov ebx, dword [esp + 0xd4]
lea eax, [esp + 0x2c]
push esi
mov esi, dword [esp + 0xdc]
push edi
mov edi, dword [esp + 0xe4]
push eax
push esi
call fcn.0040c480
add esp, 8
test eax, eax
jns 0x4089f6
lea eax, [ebx + 8]
push esi
push eax
call fcn.0040ba00
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0041dea9
add esp, 0xcc
ret
mov ecx, dword [esp + 0x34]
mov eax, ecx
and eax, 0x40
or eax, 0
push ebp
jne 0x408a1b
mov ebp, dword [esp + 0x3c]
or ecx, 0x40
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebp
mov word [esp + 0x6c], ax
jmp 0x408a20
mov ax, word [esp + 0x6c]
mov ebp, dword [esp + 0x54]
mov edx, dword [edi + 0x10]
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x3c]
cmp edx, 0xffffffff
je 0x408a41
cmp edx, 0xfffffffe
jne 0x408a4e
test ax, ax
je 0x408a4e
movzx edx, ax
mov dword [edi + 0x10], edx
jmp 0x408a95
test edx, edx
jne 0x408a88
mov eax, ecx
and eax, 4
or eax, edx
je 0x408a88
mov eax, dword [esp + 0x24]
or ecx, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x5c], eax
jmp 0x408aa5
and ecx, 0xfffffff7
xor ebp, ebp
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ebp
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x1c], eax
mov eax, ecx
and eax, 0x80
or eax, 0
jne 0x408ac4
or ecx, 0x80
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ecx
mov word [esp + 0x6e], ax
mov eax, ecx
mov dword [esp + 0x2c], 0x100
and eax, 4
or eax, 0
jne 0x408af3
or ebp, 0xffffffff
mov dword [esp + 0x2c], 0x500
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
mov ebp, 0x500
jmp 0x408b7a
mov ebp, dword [esp + 0x24]
and ecx, 8
or ecx, 0
mov eax, dword [esp + 0x20]
mov dword [edi + 0x30], ebp
mov dword [edi + 0x34], eax
jne 0x408b5f
cmp edx, 0xffffffff
je 0x408b25
cmp edx, 0xfffffffe
je 0x408b25
movzx eax, dx
mov ecx, eax
test ax, ax
jne 0x408b2a
mov edx, dword [esp + 0x20]
mov eax, ebp
jmp 0x408b4b
mov ecx, 8
movzx eax, cx
push 1
push eax
call fcn.0040c590
add esp, 8
test eax, eax
je 0x408b54
push dword [esp + 0x54]
mov eax, dword [eax]
push dword [esp + 0x54]
call eax
add esp, 8
test edx, edx
jne 0x408b54
cmp eax, 0xffffffff
jbe 0x408b75
mov ebp, 0x500
mov dword [esp + 0x2c], ebp
jmp 0x408b7a
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov dword [edi + 0x28], ecx
mov dword [edi + 0x2c], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
mov ebp, 0x100
push dword [ebx]
call fcn.0040c500
mov ecx, edx
mov dword [esp + 0x80], eax
add esp, 4
mov dword [esp + 0x78], ecx
test ecx, ecx
jg 0x408bae
jl 0x408b9b
test eax, eax
jae 0x408bae
push dword [ebx]
lea eax, [ebx + 8]
push eax
call fcn.0040ba00
add esp, 8
jmp 0x40905d
push ebp
mov ecx, 0xfff7
and word [edi + 0xc], cx
push edi
push ebx
call fcn.0040ed70
add esp, 0xc
mov dword [esp + 0x34], eax
test eax, eax
js 0x40905d
mov edx, dword [edi + 0x10]
cmp edx, 0xffffffff
je 0x408bdd
mov eax, edx
cmp edx, 0xfffffffe
jne 0x408be2
mov eax, 8
mov cx, word [esp + 0x6c]
movzx eax, ax
cmp cx, ax
setne byte [esp + 0x13]
je 0x408bfd
test cx, cx
je 0x408bfd
mov al, 1
jmp 0x408bff
xor al, al
mov byte [esp + 0x1a], al
test cx, cx
je 0x408c11
mov byte [esp + 0x1b], 0
test al, al
je 0x408c16
mov byte [esp + 0x1b], 1
mov al, byte [esp + 0x13]
mov bp, word [esp + 0x6e]
test al, al
je 0x408c45
test edx, edx
je 0x408c45
mov cl, 1
mov byte [esp + 0x12], cl
lea eax, [edi + 0x5a]
mov dl, 1
mov dword [esp + 0x14], eax
test bp, bp
je 0x408c6e
mov byte [esp + 0x19], dl
mov byte [esp + 0x12], cl
jmp 0x408c77
xor cl, cl
mov byte [esp + 0x12], cl
test al, al
jne 0x408c2d
test byte [edi], 0x80
mov byte [esp + 0x12], cl
jne 0x408c2d
lea eax, [edi + 0x5a]
mov byte [esp + 0x12], cl
mov dword [esp + 0x14], eax
cmp word [eax], bp
jne 0x408c2d
xor dl, dl
mov byte [esp + 0x12], cl
mov byte [esp + 0x19], 0
test dl, dl
je 0x408c82
cmp word [eax], 0
mov byte [esp + 0x13], 1
jne 0x408c87
mov byte [esp + 0x13], 0
push esi
call fcn.0040c060
add esp, 4
cmp byte [esp + 0x19], 0
je 0x408ce8
push 0
push dword [esp + 0x72]
call fcn.0040c540
add esp, 8
test eax, eax
jne 0x408cc3
push eax
lea eax, [ebx + 8]
push 0x18
push eax
call fcn.0040ba80
push esi
call fcn.0040bc80
add esp, 0x10
jmp 0x40905d
push dword [ebx + 0x1c]
push 0
push dword [esp + 0x76]
push esi
push ebx
call eax
add esp, 0x14
mov ebp, eax
push esi
call fcn.0040bc80
add esp, 4
test ebp, ebp
je 0x40905d
mov esi, ebp
cmp byte [esp + 0x1a], 0
je 0x408d14
movzx eax, word [esp + 0x6c]
push eax
push esi
push ebx
call fcn.0040ccc0
add esp, 0xc
mov ebp, eax
push esi
call fcn.0040bc80
add esp, 4
test ebp, ebp
je 0x40905d
mov esi, ebp
cmp byte [esp + 0x1b], 0
lea ebp, [ebx + 8]
je 0x408d4c
push ebp
push 0
push esi
call fcn.0040d050
add esp, 0xc
mov dword [esp + 0x1c], eax
push esi
test eax, eax
jne 0x408d40
call fcn.0040bc80
add esp, 4
jmp 0x40905d
call fcn.0040bc80
mov esi, dword [esp + 0x20]
add esp, 4
cmp byte [esp + 0x12], 0
je 0x408d7a
movzx eax, word [edi + 0x58]
push eax
push dword [edi + 0x10]
push esi
push ebx
call fcn.0040cca0
add esp, 0x10
mov dword [esp + 0x1c], eax
push esi
test eax, eax
je 0x408d33
call fcn.0040bc80
mov esi, dword [esp + 0x20]
add esp, 4
cmp byte [esp + 0x13], 0
je 0x408e89
mov eax, dword [edi + 0x5c]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x408d9e
mov eax, dword [ebx + 0x1c]
xor ecx, ecx
test eax, eax
cmovne ecx, eax
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x14]
push 1
movzx eax, word [eax]
push eax
call fcn.0040c540
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
jne 0x408dcf
push eax
push 0x18
push ebp
call fcn.0040ba80
push esi
call fcn.0040bc80
add esp, 0x10
jmp 0x40905d
mov eax, dword [esp + 0x14]
cmp word [eax], 1
jne 0x408e5d
or word [edi + 0xc], 8
test byte [edi], 0x20
je 0x408e5d
lea eax, [esp + 0x80]
push eax
call fcn.00409dd0
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
push ebp
push 0
push 0
push 0
push 0
mov dword [esp + 0xc0], eax
lea eax, [esp + 0x98]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push esi
mov dword [esp + 0xb0], 0x10
mov dword [esp + 0xb4], 0
mov dword [esp + 0xdc], ecx
call fcn.004109b0
add esp, 0x30
mov dword [esp + 0x30], eax
push esi
test eax, eax
je 0x408d33
call fcn.0040bc80
mov esi, dword [esp + 0x34]
add esp, 4
mov eax, dword [esp + 0x14]
push dword [esp + 0x1c]
movzx eax, word [eax]
push 1
push eax
push esi
push ebx
call dword [esp + 0x3c]
add esp, 0x14
mov dword [esp + 0x28], eax
push esi
test eax, eax
je 0x408d33
call fcn.0040bc80
mov esi, dword [esp + 0x2c]
add esp, 4
push dword [ebx]
call fcn.0040c500
mov ecx, edx
mov dword [esp + 0x2c], eax
add esp, 4
mov dword [esp + 0x30], ecx
test ecx, ecx
jg 0x408eb7
jl 0x408ea7
test eax, eax
jae 0x408eb7
push dword [ebx]
push ebp
call fcn.0040ba00
add esp, 8
jmp 0x40905d
push dword [esp + 0x20]
push dword [esp + 0x28]
push esi
push ebx
call fcn.004091b0
mov dword [esp + 0x24], eax
lea eax, [esp + 0x48]
push eax
push esi
call fcn.0040c480
add esp, 0x18
test eax, eax
jns 0x408eee
push esi
push ebp
call fcn.0040ba00
add esp, 8
mov dword [esp + 0x14], 0xffffffff
lea eax, [esp + 0xc0]
push eax
push esi
call fcn.0040bd20
add esp, 8
push esi
test eax, eax
je 0x408f15
push ebp
call fcn.0040ba00
push esi
call fcn.0040bc80
jmp 0x40905a
call fcn.0040bc80
add esp, 4
cmp dword [esp + 0x14], 0
jl 0x40905d
push dword [ebx]
call fcn.0040c500
mov ecx, dword [ebx]
mov esi, eax
mov eax, edx
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
jg 0x408f55
jl 0x408f46
test esi, esi
jae 0x408f55
push ecx
push ebp
call fcn.0040ba00
add esp, 8
jmp 0x40905d
push 0
push dword [esp + 0x7c]
push dword [esp + 0x84]
push ecx
call fcn.0040c3e0
add esp, 0x10
test eax, eax
js 0x408ea7
mov ecx, dword [esp + 0x38]
mov eax, ecx
and eax, 0x64
cmp eax, 0x64
jne 0x409050
test byte [edi], 0x20
jne 0x408fad
and ecx, 0x10
lea edx, [edi + 0x18]
or ecx, 0
je 0x408fa4
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [edx], eax
mov dword [edx + 4], ecx
jmp 0x408fad
push edx
call fcn.00421994
add esp, 4
movzx eax, word [esp + 0x6c]
mov ecx, dword [esp + 0x54]
push dword [esp + 0xec]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x6c]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x54]
mov dword [edi + 0x30], eax
mov eax, dword [esp + 0x18]
mov dword [edi + 0x34], ecx
mov ecx, esi
sub ecx, dword [esp + 0x2c]
mov dword [edi + 0x28], ecx
sbb eax, dword [esp + 0x34]
mov dword [edi + 0x2c], eax
mov eax, dword [esp + 0x30]
shr eax, 0xa
push eax
lea eax, [esp + 0xc8]
push eax
push edi
call fcn.0040df80
push dword [esp + 0x3c]
push edi
push ebx
call fcn.0040ed70
add esp, 0x1c
test eax, eax
js 0x40905d
cmp dword [esp + 0x34], eax
jne 0x409050
push 0
push dword [esp + 0x18]
push esi
push dword [ebx]
call fcn.0040c3e0
add esp, 0x10
test eax, eax
js 0x408ea7
test byte [edi + 0xc], 8
je 0x40904c
push dword [esp + 0x34]
push edi
push ebx
call fcn.00409380
xor ecx, ecx
add esp, 0xc
test eax, eax
setns cl
lea eax, [ecx - 1]
jmp 0x409060
xor eax, eax
jmp 0x409060
push 0
push 0x14
push ebp
call fcn.0040ba80
add esp, 0xc
or eax, 0xffffffff
mov ecx, dword [esp + 0xd8]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041dea9
add esp, 0xcc
ret