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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x68]
or ebx, 0xffffffff
mov esi, ecx
push edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x14], 1
call fcn.00405270
mov ecx, dword [esi + 0x81c]
sub ecx, 0
je 0x4056e6
dec ecx
je 0x4056de
dec ecx
jne 0x4056e6
mov ebp, dword [esp + 0x60]
cdq
sub eax, edx
sar eax, 1
neg eax
add ebp, eax
jmp 0x4056ea
mov ebp, dword [esp + 0x60]
sub ebp, eax
jmp 0x4056ea
mov ebp, dword [esp + 0x60]
mov eax, dword [esi + 0x408]
test eax, eax
mov al, byte [edi]
je 0x405b74
test al, al
je 0x405acd
mov eax, dword [esi + 0x820]
mov edx, 1
cmp eax, edx
jne 0x40574e
cmp byte [edi], 0x5e
jne 0x40574e
mov al, byte [edi + 1]
inc edi
test al, al
je 0x405ac4
mov ecx, dword [esi + 0xc2c]
test ecx, ecx
jne 0x405ac3
and eax, 0xff
mov ecx, esi
mov dword [esi + 0xc24], eax
mov al, byte [esi + 0xc24]
push eax
call fcn.00405040
jmp 0x405ac3
mov al, byte [edi]
mov ecx, eax
and ecx, 0xff
mov ecx, dword [esi + ecx*4]
test ecx, ecx
je 0x405aaf
cmp dword [esp + 0x10], edx
jne 0x4057b3
call fcn.0041eca0
xor edx, edx
mov ebx, eax
mov dl, byte [edi]
add ebx, ebp
mov dword [esp + 0x28], ebx
mov ecx, dword [esi + edx*4]
call fcn.0041ecb0
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x10], 0
add eax, ecx
xor ecx, ecx
mov cl, byte [edi]
mov dword [esp + 0x2c], eax
mov ecx, dword [esi + ecx*4]
mov edx, dword [ecx + 4]
lea edx, [edx + ebx - 1]
mov dword [esp + 0x30], edx
mov edx, dword [ecx + 8]
lea eax, [edx + eax - 1]
mov dword [esp + 0x34], eax
jmp 0x40580d
call fcn.0041eca0
mov ecx, dword [esp + 0x28]
add eax, ebp
cmp ecx, eax
jl 0x4057c6
mov dword [esp + 0x28], eax
xor ecx, ecx
mov cl, byte [edi]
mov ecx, dword [esi + ecx*4]
mov edx, dword [ecx + 4]
lea eax, [eax + edx - 1]
cmp ebx, eax
jg 0x4057dc
mov dword [esp + 0x30], eax
call fcn.0041ecb0
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x2c]
add eax, edx
cmp ecx, eax
jl 0x4057f3
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov cl, byte [edi]
mov ecx, dword [esi + ecx*4]
mov edx, dword [ecx + 8]
lea eax, [eax + edx - 1]
mov edx, dword [esp + 0x34]
cmp edx, eax
jg 0x40580d
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0xc44]
push eax
call fcn.0041ed30
xor ecx, ecx
mov cl, byte [edi]
mov ecx, dword [esi + ecx*4]
cmp dword [ecx + 0x7c], 1
jne 0x405a6e
mov eax, dword [esi + 0xc48]
cmp dword [eax], 8
jbe 0x405a6e
mov edx, dword [esp + 0x6c]
test edx, edx
jne 0x4059f7
mov edx, dword [esi + 0xe4c]
test edx, edx
jne 0x405877
mov edx, dword [esi + 0xc30]
lea ebx, [esi + 0x40c]
push edx
mov edx, dword [esp + 0x68]
push edx
mov edx, dword [esi + 0xc34]
push ebp
push ebx
push eax
mov eax, dword [esi + 0xc38]
push eax
push edx
jmp 0x405a3f
call fcn.0041eca0
add eax, ebp
mov dword [esp + 0x38], eax
xor eax, eax
mov al, byte [edi]
mov ecx, dword [esi + eax*4]
call fcn.0041ecb0
mov edx, dword [esp + 0x64]
xor ecx, ecx
mov cl, byte [edi]
add eax, edx
mov dword [esp + 0x3c], eax
mov edx, dword [esi + ecx*4]
lea ecx, [esi + ecx*4]
mov ebx, dword [edx + 4]
mov edx, dword [esp + 0x38]
lea ebx, [ebx + edx - 1]
mov dword [esp + 0x40], ebx
mov ecx, dword [ecx]
lea ebx, [esi + 0x40c]
mov ecx, dword [ecx + 8]
lea ecx, [ecx + eax - 1]
mov dword [esp + 0x44], ecx
mov ecx, dword [esi + 0x418]
push ecx
mov ecx, dword [esi + 0x414]
push ecx
mov ecx, dword [esi + 0x410]
push ecx
mov ecx, dword [ebx]
push ecx
mov ecx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x54]
push ecx
push eax
push edx
call fcn.00433980
add esp, 0x20
test eax, eax
je 0x405a44
sub esp, 0x10
mov edx, ebx
mov eax, esp
sub esp, 0x10
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x58]
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x5c]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x60]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x64]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
lea eax, [esp + 0x68]
push eax
call fcn.00433f30
mov ecx, dword [eax]
add esp, 0x24
mov dword [esp + 0x38], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x3c], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x40], ecx
mov ecx, dword [esi + 0xe50]
mov edx, dword [eax + 0xc]
mov eax, dword [esi + 0xe54]
mov dword [esp + 0x44], edx
xor edx, edx
mov dl, byte [edi]
neg eax
push eax
mov eax, dword [esi + edx*4]
neg ecx
push ecx
mov ecx, dword [eax + 0x80]
push ecx
mov ecx, dword [esi + 0xe4c]
call fcn.0041ecc0
mov edx, dword [esi + 0xc44]
mov ecx, dword [esi + 0xe4c]
push edx
call fcn.0041ed30
mov eax, dword [esi + 0xc30]
xor ecx, ecx
mov cl, byte [edi]
push eax
mov ecx, dword [esi + ecx*4]
call fcn.0041ecb0
mov edx, dword [esp + 0x68]
mov ecx, dword [esi + 0xe54]
sub edx, ecx
add eax, edx
push eax
xor eax, eax
mov al, byte [edi]
mov ecx, dword [esi + eax*4]
call fcn.0041eca0
mov edx, dword [esi + 0xe50]
mov ecx, ebp
sub ecx, edx
lea edx, [esp + 0x40]
add eax, ecx
mov ecx, dword [esi + 0xc38]
push eax
mov eax, dword [esi + 0xc48]
push edx
mov edx, dword [esi + 0xc34]
push eax
push ecx
mov ecx, dword [esi + 0xe4c]
push edx
jmp 0x405a3f
mov eax, dword [esi + 0xc44]
mov ecx, dword [ecx + 0x80]
push eax
call fcn.0041ed30
mov ecx, dword [esi + 0xc30]
mov edx, dword [esp + 0x64]
mov eax, dword [esi + 0xc48]
push ecx
mov ecx, dword [esi + 0xc38]
lea ebx, [esi + 0x40c]
push edx
push ebp
push ebx
mov edx, dword [esi + 0xc34]
push eax
xor eax, eax
mov al, byte [edi]
push ecx
push edx
mov ecx, dword [esi + eax*4]
mov ecx, dword [ecx + 0x80]
call fcn.004206b0
mov eax, dword [esi + 0xe58]
test eax, eax
je 0x405a95
mov edx, dword [esp + 0x64]
lea ecx, [eax + 0x3c]
push edx
mov edx, dword [eax + 0x1c]
mov eax, dword [eax]
push ebp
push ebx
push ecx
xor ecx, ecx
push edx
mov cl, byte [edi]
push eax
mov ecx, dword [esi + ecx*4]
call fcn.00420b40
jmp 0x405a95
mov edx, dword [esp + 0x64]
lea eax, [esi + 0x40c]
push edx
mov edx, dword [esi + 0xc48]
push ebp
push eax
mov eax, dword [esi + 0xc38]
push edx
mov edx, dword [esi + 0xc34]
push eax
push edx
call fcn.0041fa80
xor eax, eax
mov ebx, dword [esp + 0x30]
mov al, byte [edi]
mov ecx, dword [esi + eax*4]
mov edx, dword [ecx + 0x20]
mov ecx, dword [esi + 0x404]
add edx, ecx
add ebp, edx
jmp 0x405ac3
cmp al, 0x20
jne 0x405ac3
mov eax, dword [esi + 0x400]
mov edx, dword [esi + 0x404]
add eax, edx
add ebp, eax
inc edi
cmp byte [edi], 0
jne 0x405702
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x78]
push edx
push eax
mov eax, dword [esp + 0x4c]
sub eax, ecx
add esi, 0x40c
inc eax
push eax
mov eax, dword [esp + 0x44]
sub ebx, eax
mov edx, dword [esi]
inc ebx
push ebx
push ecx
push eax
mov eax, dword [esi + 4]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esi + 8]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.00433dd0
add esp, 0x38
cmp eax, 1
jne 0x405b5c
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], eax
lea eax, [edx + eax - 1]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
lea eax, [edx + ecx - 1]
mov dword [esp + 0x34], eax
jmp 0x405e92
or eax, 0xffffffff
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
jmp 0x405e92
test al, al
je 0x405e92
mov eax, dword [esi + 0x820]
mov edx, 1
cmp eax, edx
jne 0x405bc8
cmp byte [edi], 0x5e
jne 0x405bc8
mov al, byte [edi + 1]
inc edi
test al, al
je 0x405e89
mov ecx, dword [esi + 0xc2c]
test ecx, ecx
jne 0x405e88
and eax, 0xff
mov dword [esi + 0xc24], eax
mov cl, byte [esi + 0xc24]
push ecx
mov ecx, esi
call fcn.00405040
jmp 0x405e88
mov al, byte [edi]
mov ecx, eax
and ecx, 0xff
mov ecx, dword [esi + ecx*4]
test ecx, ecx
je 0x405e74
cmp dword [esp + 0x10], edx
jne 0x405c2d
call fcn.0041eca0
xor edx, edx
mov ebx, eax
mov dl, byte [edi]
add ebx, ebp
mov dword [esp + 0x28], ebx
mov ecx, dword [esi + edx*4]
call fcn.0041ecb0
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x10], 0
add eax, ecx
xor ecx, ecx
mov cl, byte [edi]
mov dword [esp + 0x2c], eax
mov ecx, dword [esi + ecx*4]
mov edx, dword [ecx + 4]
lea edx, [edx + ebx - 1]
mov dword [esp + 0x30], edx
mov edx, dword [ecx + 8]
lea eax, [edx + eax - 1]
mov dword [esp + 0x34], eax
jmp 0x405c87
call fcn.0041eca0
mov ecx, dword [esp + 0x28]
add eax, ebp
cmp ecx, eax
jl 0x405c40
mov dword [esp + 0x28], eax
xor ecx, ecx
mov cl, byte [edi]
mov ecx, dword [esi + ecx*4]
mov edx, dword [ecx + 4]
lea eax, [eax + edx - 1]
cmp ebx, eax
jg 0x405c56
mov dword [esp + 0x30], eax
call fcn.0041ecb0
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x2c]
add eax, edx
cmp ecx, eax
jl 0x405c6d
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov cl, byte [edi]
mov ecx, dword [esi + ecx*4]
mov edx, dword [ecx + 8]
lea eax, [eax + edx - 1]
mov edx, dword [esp + 0x34]
cmp edx, eax
jg 0x405c87
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0xc44]
push eax
call fcn.0041ed30
xor ecx, ecx
mov cl, byte [edi]
mov ecx, dword [esi + ecx*4]
cmp dword [ecx + 0x7c], 1
jne 0x405e3a
mov eax, dword [esi + 0xc48]
cmp dword [eax], 8
jbe 0x405e3a
mov edx, dword [esp + 0x6c]
test edx, edx
jne 0x405dcb
mov edx, dword [esi + 0xe4c]
test edx, edx
jne 0x405cea
mov edx, dword [esi + 0xc30]
push edx
mov edx, dword [esp + 0x68]
push edx
mov edx, dword [esi + 0xc34]
push ebp
push eax
mov eax, dword [esi + 0xc38]
push eax
push edx
jmp 0x405e0c
call fcn.0041eca0
add eax, ebp
mov dword [esp + 0x38], eax
xor eax, eax
mov al, byte [edi]
mov ecx, dword [esi + eax*4]
call fcn.0041ecb0
mov ecx, dword [esp + 0x64]
mov ebx, dword [esp + 0x38]
add eax, ecx
xor ecx, ecx
mov cl, byte [edi]
mov dword [esp + 0x3c], eax
mov edx, dword [esi + ecx*4]
lea ecx, [esi + ecx*4]
mov edx, dword [edx + 4]
lea edx, [edx + ebx - 1]
mov dword [esp + 0x40], edx
mov edx, dword [ecx]
mov edx, dword [edx + 8]
lea eax, [edx + eax - 1]
mov edx, dword [esi + 0xe54]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0xe50]
mov ecx, dword [ecx]
neg edx
push edx
mov edx, dword [ecx + 0x80]
mov ecx, dword [esi + 0xe4c]
neg eax
push eax
push edx
call fcn.0041ecc0
mov eax, dword [esi + 0xc44]
mov ecx, dword [esi + 0xe4c]
push eax
call fcn.0041ed30
mov ecx, dword [esi + 0xc30]
xor edx, edx
mov dl, byte [edi]
push ecx
mov ecx, dword [esi + edx*4]
call fcn.0041ecb0
mov ecx, dword [esp + 0x68]
mov ebx, dword [esi + 0xe54]
xor edx, edx
sub ecx, ebx
mov dl, byte [edi]
add eax, ecx
push eax
mov ecx, dword [esi + edx*4]
call fcn.0041eca0
mov ebx, dword [esi + 0xe50]
mov ecx, ebp
sub ecx, ebx
lea edx, [esp + 0x40]
add eax, ecx
mov ecx, dword [esi + 0xc38]
push eax
mov eax, dword [esi + 0xc48]
push edx
mov edx, dword [esi + 0xc34]
push eax
push ecx
mov ecx, dword [esi + 0xe4c]
push edx
call fcn.004206b0
jmp 0x405e11
mov eax, dword [esi + 0xc44]
mov ecx, dword [ecx + 0x80]
push eax
call fcn.0041ed30
mov ecx, dword [esi + 0xc30]
mov edx, dword [esp + 0x64]
mov eax, dword [esi + 0xc48]
push ecx
mov ecx, dword [esi + 0xc38]
push edx
push ebp
mov edx, dword [esi + 0xc34]
push eax
xor eax, eax
mov al, byte [edi]
push ecx
push edx
mov ecx, dword [esi + eax*4]
mov ecx, dword [ecx + 0x80]
call fcn.00420540
mov eax, dword [esi + 0xe58]
test eax, eax
je 0x405e5a
mov edx, dword [esp + 0x64]
lea ecx, [eax + 0x3c]
push edx
mov edx, dword [eax + 0x1c]
mov eax, dword [eax]
push ebp
push ecx
xor ecx, ecx
mov cl, byte [edi]
push edx
push eax
mov ecx, dword [esi + ecx*4]
call fcn.00420ad0
jmp 0x405e5a
mov edx, dword [esp + 0x64]
mov eax, dword [esi + 0xc48]
push edx
mov edx, dword [esi + 0xc38]
push ebp
push eax
mov eax, dword [esi + 0xc34]
push edx
push eax
call fcn.0041f8a0
xor ecx, ecx
mov ebx, dword [esp + 0x30]
mov cl, byte [edi]
mov edx, dword [esi + ecx*4]
mov eax, dword [edx + 0x20]
mov edx, dword [esi + 0x404]
add eax, edx
add ebp, eax
jmp 0x405e88
cmp al, 0x20
jne 0x405e88
mov ecx, dword [esi + 0x400]
mov edx, dword [esi + 0x404]
add ecx, edx
add ebp, ecx
inc edi
cmp byte [edi], 0
jne 0x405b7c
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x28]
mov edx, eax
pop edi
pop esi
pop ebp
mov dword [edx], ecx
mov ecx, dword [esp + 0x20]
pop ebx
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x20]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x24]
mov dword [edx + 0xc], ecx
add esp, 0x48
ret 0x14