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

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x6c]
mov eax, edi
dec eax
je 0x40595d
sub eax, 0xa
je 0x40593a
mov esi, dword [esp + 0x68]
mov ebp, dword [esp + 0x70]
xor ebx, ebx
push ebp
mov eax, dword [esi + 0x74]
mov dword [esi + 0x64], ebx
push edi
mov dword [eax + 0x18], 1
mov dword [ebp + 0x2c], ebx
mov ecx, dword [esi + 8]
push ecx
call fcn.00402bfb
cmp edi, 9
jne 0x405c89
cmp dword [ebp + 0x2c], ebx
jne 0x405c89
mov edx, dword [esi]
push ebp
push edx
call fcn.00403ba0
jmp 0x405c89
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x68]
add eax, 0x18
push 0
push eax
push ecx
call fcn.004057c0
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
mov esi, dword [esp + 0x68]
xor edi, edi
mov ebx, 1
lea eax, [esp + 0x68]
mov edx, dword [esi + 0x74]
mov dword [esi + 0x64], edi
push eax
push edi
mov dword [edx + 0x18], ebx
mov ecx, dword [esi + 0x54]
push 5
push ecx
call fcn.00408890
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x68]
mov edx, dword [ebp + 0x14]
cmp edx, eax
jl 0x405c23
mov eax, dword [esi]
push 5
push eax
call fcn.00403980
mov edx, dword [esi + 0x54]
lea ecx, [esp + 0x18]
push ecx
push edi
push 4
push edx
mov ebx, eax
call fcn.00408890
mov eax, dword [esp + 0x18]
dec eax
cmp eax, 0x27
ja case.0x4059c8.8
xor ecx, ecx
mov cl, byte [eax + 0x405db8]
jmp dword [ecx*4 + 0x405d98]
mov edx, dword [ebp + 0x14]
mov eax, dword [esi + 4]
push edx
push eax
call fcn.00406cb0
cmp dword [esi + 0x64], edi
jne 0x405c89
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
push ebx
call fcn.00402faa
cmp eax, 0xa
jne 0x405c09
mov eax, dword [esi + 4]
lea ecx, [esp + 0x14]
push edi
lea edx, [esp + 0x14]
push ecx
push edx
push eax
call fcn.00406d30
test eax, eax
je 0x405d87
mov ecx, dword [esi + 0x74]
push edi
mov dword [ecx + 0x28], 2
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 4]
push edx
push eax
call fcn.00407060
mov ecx, dword [esi + 4]
push ecx
call fcn.00406f30
mov ebp, eax
push edi
push 0x11
push ebp
call fcn.00405300
lea edi, [eax - 0x3e8]
mov eax, dword [esp + 0x14]
cmp eax, edi
jb 0x405a5c
mov eax, edi
push eax
push ebx
call fcn.0040309b
mov eax, dword [esp + 0x14]
cmp eax, edi
jb 0x405a6d
mov eax, edi
push 0
push eax
push 0xc
push ebp
call fcn.00405190
mov eax, dword [esp + 0x14]
cmp eax, edi
jae 0x405a82
mov edi, eax
push 0
push edi
push 0x10
push ebp
call fcn.00405190
push ebp
call fcn.00405460
mov edx, dword [esi + 0x74]
mov eax, 1
mov dword [edx + 0x28], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
push ebx
call fcn.00402faa
cmp eax, 0xa
jne 0x405af9
push edi
push esi
call fcn.00438ef0
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
push ebx
call fcn.00402faa
cmp eax, 0xa
jne 0x405af9
mov edx, dword [esi + 0x74]
push edi
push 1
mov dword [edx + 0x28], edi
mov eax, dword [esi + 4]
push eax
call fcn.00407060
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
mov ecx, dword [esp + 0x68]
push ecx
push ebx
call fcn.0040309b
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
push ebx
call fcn.00402faa
cmp eax, 0xa
jne 0x405c09
mov edx, dword [esi + 0x74]
lea eax, [esi + 0x18]
push eax
mov dword [edx + 0x28], edi
mov ecx, dword [esi + 4]
push ecx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], edi
call fcn.00407350
mov edx, dword [esi + 4]
push edi
push eax
push edx
mov dword [esp + 0x74], eax
call fcn.00407060
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
mov ecx, dword [esi + 0x74]
lea edx, [esp + 0x68]
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], edi
lea eax, [esp + 0x3c]
mov dword [ecx + 0x28], edi
mov ecx, dword [esi + 0x54]
push edx
push eax
push 0x28
push ecx
call fcn.00408890
mov eax, dword [esi + 4]
lea edx, [esp + 0x3c]
push edx
push eax
call fcn.00407350
mov ecx, dword [esi + 4]
push edi
push eax
push ecx
mov dword [esp + 0x74], eax
call fcn.00407060
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
push 2
push esi
call fcn.004061a0
push edi
push ebx
call fcn.0040309b
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
push ebx
call fcn.00402faa
cmp eax, 0xa
jne 0x405c09
mov edx, dword [esi + 0x74]
lea eax, [esi + 0x18]
push eax
mov dword [edx + 0x28], edi
mov ecx, dword [esi + 4]
push ecx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], edi
call fcn.00407350
mov edx, dword [esi + 4]
add eax, 2
push edi
push eax
push edx
mov dword [esp + 0x74], eax
call fcn.00407060
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
mov eax, dword [esp + 0x68]
push eax
push ebx
call fcn.0040309b
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
mov ecx, dword [esi + 4]
push ecx
call fcn.00406f30
cmp esi, eax
je 0x405c3c
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0xc
mov edx, dword [esi + 0x14]
mov dword [esi + 0x10], edx
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x14], eax
mov dword [ebp + 0x2c], edi
mov ecx, dword [esi + 0x68]
xor eax, eax
cmp ecx, edi
mov dword [esp + 0x10], eax
jle 0x405c7c
mov ecx, dword [esi + 0x78]
push ebp
push ebx
mov edx, dword [ecx + eax*4]
push edx
call fcn.0040a1b0
mov eax, dword [esi + 0x74]
mov dword [eax + 0x18], ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x68]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x405c58
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 4]
push ecx
push edx
call fcn.00406cb0
mov eax, dword [esi + 4]
push eax
call fcn.00406f30
cmp esi, eax
jne 0x405d87
mov eax, dword [esi + 0x64]
xor ebx, ebx
cmp eax, ebx
jle 0x405d74
mov ecx, dword [esi + 0x74]
mov dword [ecx + 0x18], ebx
mov edx, dword [esi + 0x74]
cmp dword [edx + 0x10], 1
jne 0x405ccb
mov edi, dword [esi + 0x64]
push esi
call fcn.00406630
mov eax, dword [esi + 0x74]
mov dword [esi + 0x64], edi
add esp, 4
mov dword [eax + 0x18], ebx
mov ecx, dword [esi + 0x14]
push esi
mov dword [ebp + 0x14], ecx
mov dword [ebp], 1
mov dword [ebp + 0x2c], ebx
call fcn.00406200
mov ecx, dword [esi + 0x68]
xor eax, eax
cmp ecx, ebx
mov dword [esp + 0x10], eax
jle 0x405d59
mov ecx, dword [esi + 0x78]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [ecx + eax*4]
push edx
call fcn.0040a190
mov eax, dword [esi + 0x64]
xor edi, edi
test eax, eax
jle 0x405d49
mov ebx, 0x30
lea eax, [esp + 0x1c]
mov ecx, ebx
push eax
mov eax, dword [esi + 0x74]
add ecx, eax
lea edx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
jne 0x405d36
mov eax, dword [esi + 0x64]
inc edi
add ebx, 0x10
cmp edi, eax
jl 0x405d0d
jmp 0x405d49
mov eax, dword [esi + 0x78]
mov ecx, dword [esp + 0x10]
push ebp
push 1
mov edx, dword [eax + ecx*4]
push edx
call fcn.0040a1b0
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x68]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x405cee
mov eax, dword [esi]
push 3
push eax
call fcn.00403980
mov edx, dword [esi + 0x74]
mov ecx, dword [esi + 0x64]
add edx, 0x30
push ecx
push edx
push eax
call fcn.004372b0
cmp dword [esp + 0x6c], 2
jne 0x405d87
mov eax, dword [ebp + 4]
mov dword [esi + 0x40], eax
mov ecx, dword [ebp + 8]
mov dword [esi + 0x44], ecx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x54
ret 0xc