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

Disassembly:
push 0xffffffffffffffff
push 0x4865a8
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x4acab8]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4acab8]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x98]
mov edi, dword [esp + 0xa0]
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
call fcn.00406e00
push eax
mov dword [esp + 0x84], 0
call fcn.0040c680
mov ebp, dword [esp + 0x3c]
add esp, 4
mov ebx, eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x80], 0xffffffff
test ebp, ebp
je 0x40cad3
push 0
lea ecx, [esp + 0x20]
call fcn.0046f313
mov eax, dword [ebp + 4]
test eax, eax
jbe 0x40cab1
cmp eax, 0xffffffff
jae 0x40cab1
dec eax
mov dword [ebp + 4], eax
mov esi, dword [ebp + 4]
neg esi
sbb esi, esi
not esi
lea ecx, [esp + 0x1c]
and esi, ebp
call fcn.0046f33b
test esi, esi
je 0x40cad3
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
lea eax, [esp + 0x58]
push eax
mov ecx, ebx
call fcn.0040b0b0
mov edx, dword [ebx]
mov eax, dword [edx + 8]
mov esi, 1
mov ecx, ebx
mov dword [esp + 0x80], esi
call eax
xor ecx, ecx
mov byte [esp + 0x1c], al
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ecx
mov byte [esp + 0x40], cl
mov al, byte [edi]
mov byte [esp + 0x80], 2
cmp al, 0x2b
je 0x40cb20
mov dword [esp + 0x20], ecx
cmp al, 0x2d
jne 0x40cb24
mov dword [esp + 0x20], esi
call fcn.004708fa
mov ecx, dword [eax]
mov ebx, dword [esp + 0xb0]
mov dl, byte [ecx]
push ebx
push 0x65
push edi
mov byte [esp + 0x20], dl
mov byte [esp + 0x21], 0x65
mov byte [esp + 0x22], 0
call fcn.00470920
mov esi, eax
movsx eax, byte [esp + 0x20]
push ebx
push eax
push edi
call fcn.00470920
mov ebp, eax
add esp, 0x18
test ebp, ebp
jne 0x40cb6a
mov dword [esp + 0xac], eax
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x5c]
mov eax, edx
cmp ecx, 0x10
jae 0x40cb7d
lea eax, [esp + 0x5c]
cmp byte [eax], 0x7f
je 0x40cccd
mov eax, edx
cmp ecx, 0x10
jae 0x40cb91
lea eax, [esp + 0x5c]
cmp byte [eax], 0
jle 0x40cccd
push ebx
push edi
lea ecx, [esp + 0x44]
call fcn.0040b440
test esi, esi
jne 0x40cbc5
mov ecx, dword [esp + 0xac]
push 0x30
push ecx
lea ecx, [esp + 0x44]
call fcn.0040af00
mov ebx, dword [esp + 0xa4]
jmp 0x40cbfd
test ebp, ebp
jne 0x40cbe0
mov edx, dword [esp + 0xa4]
push 0x30
push edx
lea ecx, [esp + 0x44]
call fcn.0040af00
xor ebx, ebx
jmp 0x40cbe7
mov ebx, dword [esp + 0xa4]
mov eax, dword [esp + 0xac]
push 0x30
push eax
sub esi, edi
push esi
lea ecx, [esp + 0x48]
call fcn.0040afb0
push 0x30
test ebp, ebp
jne 0x40cc0f
push ebx
lea ecx, [esp + 0x44]
call fcn.0040af00
jmp 0x40cc40
mov ecx, dword [esp + 0xac]
mov esi, ebp
sub esi, edi
push ecx
lea edx, [esi + 1]
push edx
lea ecx, [esp + 0x48]
call fcn.0040afb0
push 0x30
push ebx
push esi
lea ecx, [esp + 0x48]
call fcn.0040afb0
mov dword [esp + 0xa8], 0
mov edi, dword [esp + 0x5c]
mov ebx, 0x10
mov dword [esp + 0xa4], 0
cmp dword [esp + 0x70], ebx
jae 0x40cc5e
lea edi, [esp + 0x5c]
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x54], ebx
jae 0x40cc6c
lea eax, [esp + 0x40]
lea ecx, [esp + 0x14]
push ecx
push eax
call fcn.00470dc0
mov esi, eax
mov al, byte [edi]
add esp, 8
cmp al, 0x7f
je 0x40ccb0
test al, al
jle 0x40ccb0
mov edx, esi
sub edx, dword [esp + 0x20]
movsx eax, al
cmp eax, edx
jae 0x40ccb0
push 0
sub esi, eax
push 1
push esi
lea ecx, [esp + 0x48]
call fcn.0040afb0
cmp byte [edi + 1], 0
jle 0x40ccaa
inc edi
mov al, byte [edi]
cmp al, 0x7f
jne 0x40cc82
mov edi, dword [esp + 0x40]
cmp dword [esp + 0x54], ebx
jae 0x40ccbe
lea edi, [esp + 0x40]
mov ebx, dword [esp + 0x50]
mov dword [esp + 0xac], 0
mov ecx, dword [esp + 0xa8]
mov eax, dword [esp + 0xa4]
mov edx, dword [esp + 0x30]
add eax, ecx
add eax, dword [esp + 0xac]
mov ecx, dword [edx + 0x18]
add eax, ebx
test ecx, ecx
jle 0x40ccfd
cmp ecx, eax
jbe 0x40ccfd
sub ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x40cd05
mov dword [esp + 0x18], 0
mov eax, dword [edx + 0x10]
mov esi, dword [esp + 0x88]
and eax, 0x1c0
cmp eax, 0x40
je 0x40cde4
cmp eax, 0x100
je 0x40cd61
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [esp + 0x94]
push eax
push ecx
push edx
lea eax, [esp + 0x30]
push eax
push esi
call fcn.0040ab70
mov ecx, dword [eax]
mov dword [esp + 0xa8], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0xac], edx
jmp 0x40cdd9
cmp dword [esp + 0x20], 0
jbe 0x40cd9e
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
push 1
push edi
push eax
push ecx
lea edx, [esp + 0x30]
push edx
push esi
call fcn.0040abe0
mov ecx, dword [eax]
mov dword [esp + 0xa8], ecx
mov edx, dword [eax + 4]
add esp, 0x18
inc edi
mov dword [esp + 0x94], edx
dec ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0x94]
push eax
mov eax, dword [esp + 0x94]
push ecx
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
push esi
call fcn.0040ab70
mov edx, dword [eax]
mov dword [esp + 0xa8], edx
mov eax, dword [eax + 4]
mov dword [esp + 0xac], eax
mov dword [esp + 0x30], 0
add esp, 0x18
movsx ecx, byte [esp + 0x14]
push ebx
push ecx
push edi
call fcn.00470920
add esp, 0xc
test eax, eax
je 0x40cee5
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x94]
sub eax, edi
inc eax
push edx
mov edx, dword [esp + 0x94]
mov ebp, eax
lea eax, [ebp - 1]
push eax
push edi
push ecx
push edx
lea eax, [esp + 0x34]
push eax
push esi
call fcn.0040ac50
mov ecx, dword [eax]
mov dword [esp + 0xac], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0xc0]
push ecx
mov dword [esp + 0xb4], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 0x30
push edx
push eax
lea ecx, [esp + 0x4c]
push ecx
push esi
call fcn.0040ab70
mov edx, dword [eax]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0xc4], edx
mov eax, dword [eax + 4]
mov dword [esp + 0xc8], eax
mov edx, dword [ecx]
mov eax, dword [edx + 4]
add esp, 0x34
call eax
mov edx, dword [esp + 0x94]
push 1
mov byte [esp + 0x2c], al
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x94]
push ecx
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
push esi
call fcn.0040ab70
mov edx, dword [eax]
mov dword [esp + 0xa8], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0xc0]
push edx
mov dword [esp + 0xb0], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x50]
push eax
push esi
call fcn.0040ab70
mov ecx, dword [eax]
mov dword [esp + 0xc0], ecx
mov edx, dword [eax + 4]
add esp, 0x30
add edi, ebp
mov dword [esp + 0x94], edx
sub ebx, ebp
push ebx
push 0x65
push edi
call fcn.00470920
add esp, 0xc
test eax, eax
je 0x40cfb6
mov edx, dword [esp + 0x94]
sub eax, edi
inc eax
mov ebp, eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x94]
lea ecx, [ebp - 1]
push ecx
push edi
push edx
push eax
lea ecx, [esp + 0x3c]
push ecx
push esi
call fcn.0040ac50
mov edx, dword [eax]
mov dword [esp + 0xac], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0xc8]
push edx
mov dword [esp + 0xb4], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x54]
push eax
push esi
call fcn.0040ab70
mov ecx, dword [eax]
mov dword [esp + 0xc4], ecx
mov ecx, dword [esp + 0x64]
mov edx, dword [eax + 4]
add esp, 0x34
test byte [ecx + 0x10], 4
mov dword [esp + 0x94], edx
mov dword [esp + 0xac], 0
mov ecx, 0x490a60
jne 0x40cf87
mov ecx, 0x490a5c
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 1
push ecx
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
push esi
call fcn.0040abe0
mov edx, dword [eax]
mov dword [esp + 0xa8], edx
mov eax, dword [eax + 4]
add esp, 0x18
add edi, ebp
mov dword [esp + 0x94], eax
sub ebx, ebp
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x94]
mov eax, dword [esp + 0x90]
push ecx
push ebx
push edi
push edx
push eax
lea ecx, [esp + 0x3c]
push ecx
push esi
call fcn.0040ac50
mov edx, dword [eax]
mov dword [esp + 0xac], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0xc8]
push edx
mov dword [esp + 0xb4], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x54]
push eax
push esi
call fcn.0040ab70
mov ecx, dword [eax]
mov edx, dword [esp + 0x64]
mov edi, dword [esp + 0x68]
mov dword [esp + 0xc4], ecx
mov eax, dword [eax + 4]
xor ebx, ebx
mov dword [edx + 0x18], ebx
mov edx, dword [esp + 0x4c]
push edx
mov edx, dword [esp + 0xd4]
push edx
push eax
push ecx
push edi
push esi
mov dword [esp + 0xe0], eax
call fcn.0040ab70
mov esi, 0x10
add esp, 0x4c
cmp dword [esp + 0x54], esi
jb 0x40d058
mov eax, dword [esp + 0x40]
push eax
call fcn.0046fa18
add esp, 4
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], 0
cmp dword [esp + 0x70], esi
jb 0x40d07c
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.0046fa18
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00470538
add esp, 0x70
ret