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

Disassembly:
sub esp, 0x38
push ebx
push ebp
mov ebx, ecx
mov eax, dword [ebx]
mov edx, dword [eax + 0x18]
push esi
push edi
mov dword [esp + 0x14], ebx
call edx
xor edx, edx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x50], edx
je 0x4085a1
cmp dword [ebx + 0x1c], edx
je 0x4085a1
mov eax, 2
mov ebp, eax
xor edi, edi
mov esi, 0xcc00cc
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], esi
jmp 0x4085b2
mov esi, dword [esp + 0x5c]
mov ebp, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
mov eax, 2
mov ecx, dword [0x4ceab0]
cmp ecx, edx
je 0x40870f
cmp dword [esp + 0x10], 0x3e9
jne 0x40863c
dec ecx
xor eax, eax
cmp ecx, 5
ja case.default.0x4085d2
jmp dword [ecx*4 + 0x4088d8]
xor eax, eax
jmp case.default.0x4085d2
mov eax, 5
jmp case.default.0x4085d2
mov eax, 4
jmp case.default.0x4085d2
mov eax, 1
jmp case.default.0x4085d2
mov eax, 2
jmp case.default.0x4085d2
mov eax, 3
push eax
mov ecx, ebx
call fcn.00408210
cmp eax, edx
je 0x4088ce
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x58]
push esi
push edi
push ebp
push edx
mov edx, dword [esp + 0x6c]
push edx
push ecx
mov ecx, eax
call fcn.00414520
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x20
cmp ecx, 5
jne 0x4086a4
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0x10], 3
lea esp, [esp]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push edx
call fcn.00408210
test eax, eax
je 0x408693
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push esi
push edi
push ebx
push ecx
mov ecx, dword [esp + 0x64]
push edx
mov edx, dword [esp + 0x64]
push ecx
push 0
push edx
push ebp
mov ecx, eax
call fcn.00414520
sub dword [esp + 0x10], 1
jns 0x408660
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x20
dec ecx
xor eax, eax
cmp ecx, 5
ja case.0x4086ac.5
jmp dword [ecx*4 + 0x4088f0]
xor eax, eax
jmp case.0x4086ac.5
mov eax, 2
jmp case.0x4086ac.5
mov eax, 3
jmp case.0x4086ac.5
mov eax, 1
jmp case.0x4086ac.5
mov eax, 4
push eax
mov ecx, ebx
call fcn.00408210
cmp eax, edx
je 0x4088ce
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, dword [esp + 0x58]
push esi
push edi
push ebp
push edx
mov edx, dword [esp + 0x6c]
push edx
push ecx
mov ecx, eax
call fcn.00414520
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x20
mov ecx, dword [0x4ceae8]
mov edi, 4
cmp ecx, 0x209
jne 0x408754
mov ecx, 1
mov dword [esp + 0x38], eax
or eax, 0xffffffff
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
jmp 0x4087c7
cmp ecx, 0x21d
jne 0x408791
or ecx, 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x1c], 3
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
jmp 0x4087cb
mov esi, 3
mov ecx, 1
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 5
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], eax
mov eax, dword [ebx + 0x78]
dec eax
cmp dword [esp + 0x10], 0x3e9
jne 0x408861
cmp eax, 5
mov dword [esp + 0x10], 5
jg 0x4087ee
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], edx
mov dword [esp + 0x18], edx
jl 0x4088ce
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
mov ebp, dword [esp + 0x4c]
lea esp, [esp]
mov eax, dword [esp + edx*4 + 0x30]
cmp eax, 0xffffffff
je 0x40884c
mov ecx, dword [esp + 0x14]
push eax
call fcn.00408210
test eax, eax
je 0x40884c
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push esi
push edi
push ebx
push edx
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x64]
push edx
push 0
push ecx
push ebp
mov ecx, eax
call fcn.00414520
mov edx, dword [esp + 0x18]
inc edx
cmp edx, dword [esp + 0x10]
mov dword [esp + 0x18], edx
jle 0x408810
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x20
cmp eax, edi
mov dword [esp + 0x10], edi
jg 0x40886d
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], edx
mov dword [esp + 0x18], edx
jl 0x4088ce
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
mov ebp, dword [esp + 0x4c]
mov eax, dword [esp + edx*4 + 0x1c]
cmp eax, 0xffffffff
je 0x4088c3
mov ecx, dword [esp + 0x14]
push eax
call fcn.00408210
test eax, eax
je 0x4088c3
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push esi
push edi
push ebx
push edx
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x64]
push edx
push 0
push ecx
push ebp
mov ecx, eax
call fcn.00414520
mov edx, dword [esp + 0x18]
inc edx
cmp edx, dword [esp + 0x10]
mov dword [esp + 0x18], edx
jle 0x408887
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x20