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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41aa40
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x423018]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov eax, 0x2000
test dword [ebp + 0xc], eax
je 0x40cb6e
test dword [ebp + 0x1c], eax
je 0x40cb6e
mov edi, dword [ebp + 0x14]
xor ebx, ebx
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ebx
call fcn.00409170
cmp eax, ebx
jge 0x40c86f
push eax
call fcn.00405f30
lea esi, [esp + 0x14]
mov dword [esp + 0x50], ebx
call fcn.00408930
mov edi, dword [ebp + 0x24]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
call fcn.00410d20
cmp eax, ebx
jge 0x40c89a
push eax
call fcn.00405f30
lea esi, [esp + 0x10]
mov byte [esp + 0x50], 1
call fcn.00408930
mov ecx, dword [esp + 0x20]
cmp ecx, eax
jne 0x40cb2e
cmp ecx, ebx
je 0x40cb2e
mov edi, dword [ebp + 8]
cmp dword [edi + 0xc], ebx
jne 0x40c8ca
push edi
call fcn.0040c6e0
mov eax, dword [edi + 0xc]
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x20]
call eax
cmp dword [esp + 0x2c], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ebx
jbe 0x40ca46
lea ecx, [esp + 0x34]
push ecx
call dword [0x41b214]
mov byte [esp + 0x50], 2
mov eax, dword [edi + 0xc]
mov edx, dword [eax]
mov edx, dword [edx + 0x24]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
push eax
call edx
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], ebx
mov ecx, dword [eax]
push 0x41bd3c
push eax
mov eax, dword [ecx]
call eax
cmp eax, ebx
mov dword [esp + 0x18], eax
jl 0x40ca18
mov dword [esp + 0x24], ebx
mov byte [esp + 0x50], 3
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
cmp dword [esp + 0x20], 0
mov dword [esp + 0x18], eax
jbe 0x40c9ff
mov eax, ebx
lea edi, [esp + 0x14]
call fcn.00408980
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x40c97a
xor esi, esi
jmp 0x40c98d
push eax
call dword [0x41b230]
mov ecx, dword [edi]
push eax
push ecx
call dword [0x41b22c]
mov esi, eax
cmp dword [edi], 0
mov dword [esp + 0x30], esi
je 0x40c99e
test esi, esi
je 0x40cb24
push 0
mov byte [esp + 0x54], 4
mov edx, dword [esp + 0x28]
push 0x400
push edx
push esi
call fcn.00418584
cmp eax, 1
je 0x40c9d1
push esi
mov byte [esp + 0x54], 3
call dword [0x41b220]
add ebx, 1
cmp ebx, dword [esp + 0x20]
jb 0x40c963
jmp 0x40c9fc
mov eax, ebx
lea edi, [esp + 0x10]
call fcn.00410c80
movzx eax, word [eax]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x48]
push ecx
call eax
push esi
mov dword [esp + 0x1c], eax
mov byte [esp + 0x54], 3
call dword [0x41b220]
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x24]
push eax
call dword [0x41b220]
xor ebx, ebx
mov esi, dword [0x41b1e8]
lea ecx, [esp + 0x34]
push ecx
call esi
lea edx, [esp + 0x34]
push edx
mov byte [esp + 0x54], 1
call esi
mov eax, dword [esp + 0x28]
add eax, 1
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
jb 0x40c8f0
push 8
call fcn.00418922
add esp, 4
cmp eax, ebx
je 0x40caa7
mov esi, eax
call fcn.00403750
mov esi, eax
cmp esi, ebx
je 0x40caa7
mov dword [esp + 0x28], ebx
mov byte [esp + 0x50], 5
mov eax, dword [edi]
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push eax
mov eax, dword [ecx + 0x78]
call eax
cmp eax, ebx
mov dword [esp + 0x18], eax
jl 0x40ca92
mov edx, dword [esp + 0x28]
mov ecx, dword [edi + 0xc]
push edx
call fcn.004149a0
mov dword [esp + 0x18], eax
call fcn.0040c510
mov byte [esp + 0x50], 1
mov eax, dword [esp + 0x28]
push eax
call dword [0x41b220]
mov eax, dword [edi + 0xc]
cmp eax, ebx
je 0x40cab9
mov dword [edi + 0xc], ebx
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [edi + 0xc]
cmp eax, ebx
je 0x40cacb
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi + 0xc], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov edi, dword [0x41b200]
mov esi, dword [0x41b1fc]
je 0x40caf5
push eax
call esi
test eax, eax
jl 0x40caf5
mov eax, dword [esp + 0x10]
push eax
call edi
test eax, eax
jl 0x40caf5
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40cb0b
push eax
call esi
test eax, eax
jl 0x40cb0b
mov ecx, dword [esp + 0x14]
push ecx
call edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push 0x8007000e
call fcn.00405f30
mov eax, dword [esp + 0x10]
cmp eax, ebx
mov edi, dword [0x41b200]
mov esi, dword [0x41b1fc]
je 0x40cb58
push eax
call esi
test eax, eax
jl 0x40cb58
mov edx, dword [esp + 0x10]
push edx
call edi
test eax, eax
jl 0x40cb58
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40cb6e
push eax
call esi
test eax, eax
jl 0x40cb6e
mov eax, dword [esp + 0x14]
push eax
call edi
mov eax, 0x80070057
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24