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

Disassembly:
mov ecx, dword [0x42daf4]
mov eax, dword [esp + 4]
sub esp, 0x4c
cmp ecx, 4
push ebx
push ebp
push esi
mov esi, dword [eax]
push edi
jae 0x40c1b4
mov dword [0x42daf4], 4
jmp 0x40c1c3
cmp ecx, 9
jbe 0x40c1c3
mov dword [0x42daf4], 9
mov edi, dword [eax + 8]
mov dword [esp + 0x18], edi
call fcn.004137d0
push 4
mov dword [eax], 0
push 0x20
lea eax, [esp + 0x44]
push eax
push edi
call fcn.00415780
add esp, 0x10
test eax, eax
je 0x40c20e
call fcn.004137d0
cmp dword [eax], 0
jne 0x40c65e
call fcn.004137d0
pop edi
pop esi
pop ebp
mov dword [eax], 0x89
mov al, 1
pop ebx
add esp, 0x4c
ret
lea edx, [esp + 0x3c]
mov eax, dword [edx]
mov ecx, 0x42dae8
cmp eax, dword [ecx]
je 0x40c232
call fcn.004137d0
pop edi
pop esi
pop ebp
mov dword [eax], 0x7f
mov al, 1
pop ebx
add esp, 0x4c
ret
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x14c], ecx
mov edx, dword [esp + 0x44]
xor ecx, ecx
mov cx, word [esi + 0xe2]
mov dword [esi + 0x188], edx
mov eax, dword [esp + 0x48]
mov dword [esi + 0x18c], eax
cmp ecx, dword [esp + 0x48]
jae 0x40c26d
mov dx, word [esi + 0x18c]
mov word [esi + 0xe2], dx
mov edx, dword [esp + 0x56]
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
and edx, 0xff
mov dword [esi + 0x150], edx
xor edx, edx
mov dx, word [esi + 0xe8]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x57]
and eax, 0xff
mov ebx, eax
and ebp, 0xffff
mov dword [esp + 0x24], eax
sub ebx, edx
mov edx, dword [esp + 0x64]
test edx, edx
mov dword [esp + 0x14], ebx
je 0x40c2bf
mov dword [esi + 0x16c], eax
mov ax, word [esi + 0x150]
add ax, word [esi + 0x188]
lea edi, [ebp + ebp*2]
shl edi, 2
add ecx, edi
push 0x10
push ecx
mov word [esi + 0xe6], ax
call fcn.00415020
add esp, 8
test eax, eax
mov dword [esi + 0x19c], eax
je 0x40c65e
mov ecx, dword [0x42daf4]
mov edx, 1
shl edx, cl
add edi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], edi
mov ecx, dword [esi + 0x14c]
imul edx, ebp
lea edi, [edx + eax*2]
lea edx, [ecx + edi*2 + 0x407]
push 0x30
push edx
call fcn.00415020
add esp, 8
test eax, eax
mov dword [esi + 0x1a0], eax
jne 0x40c34e
mov eax, dword [esi + 0x19c]
push eax
call fcn.004150b0
add esp, 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x4c
ret
mov ecx, dword [esi + 0x14c]
mov edx, dword [esp + 0x18]
lea edi, [eax + edi*2]
push 4
sub ecx, 0x20
push ecx
mov dword [esp + 0x24], edi
add edi, 0x400
push edi
push edx
call fcn.00415780
add esp, 0x10
test eax, eax
je 0x40c39e
mov eax, dword [esi + 0x19c]
push eax
call fcn.004150b0
mov ecx, dword [esi + 0x1a0]
push ecx
call fcn.004150b0
add esp, 8
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x4c
ret
test ebp, ebp
je 0x40c3a7
lea eax, [ebp - 1]
jmp 0x40c3a9
xor eax, eax
push eax
call fcn.0040dbb0
mov edx, dword [esi + 0x14c]
sub edx, 0x20
push edx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x30]
push edi
push eax
call fcn.0040db00
xor edi, edi
add esp, 0x10
cmp word [esi + 0xf4], di
mov dword [esp + 0x10], edi
jbe 0x40c504
mov edi, edi
mov ecx, dword [esp + 0x2c]
cmp ecx, 4
jb 0x40c3fe
mov eax, dword [esp + 0x28]
sub ecx, 4
shr eax, cl
mov dword [esp + 0x2c], ecx
and eax, dword [0x42db38]
jmp 0x40c40d
lea ecx, [esp + 0x28]
push 4
push ecx
call fcn.0040db20
add esp, 8
mov edx, dword [esi + 0x148]
mov dword [edi + edx + 8], eax
mov ecx, dword [esp + 0x2c]
cmp ecx, 4
jb 0x40c435
mov eax, dword [esp + 0x28]
sub ecx, 4
shr eax, cl
mov dword [esp + 0x2c], ecx
and eax, dword [0x42db38]
jmp 0x40c444
lea eax, [esp + 0x28]
push 4
push eax
call fcn.0040db20
add esp, 8
mov ecx, dword [esi + 0x148]
mov dword [edi + ecx + 0x10], eax
mov ecx, dword [esp + 0x2c]
cmp ecx, 4
jb 0x40c46c
mov eax, dword [esp + 0x28]
sub ecx, 4
shr eax, cl
mov dword [esp + 0x2c], ecx
and eax, dword [0x42db38]
jmp 0x40c47b
lea edx, [esp + 0x28]
push 4
push edx
call fcn.0040db20
add esp, 8
mov ecx, dword [esi + 0x148]
mov dword [edi + ecx + 0xc], eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
cmp ecx, eax
jb 0x40c4a8
mov edx, dword [esp + 0x28]
sub ecx, eax
mov eax, dword [eax*4 + 0x42db28]
shr edx, cl
mov dword [esp + 0x2c], ecx
and eax, edx
jmp 0x40c4b6
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.0040db20
add esp, 8
mov edx, dword [esi + 0x19c]
lea ecx, [eax + eax*2]
lea eax, [edx + ecx*4]
mov ecx, dword [esi + 0x148]
mov dword [edi + ecx + 0x14], eax
mov edx, dword [esi + 0x148]
add edx, edi
push edx
call fcn.0040ccb0
mov ecx, dword [esi + 0x148]
mov dword [edi + ecx + 4], eax
mov eax, dword [esp + 0x14]
xor edx, edx
mov dx, word [esi + 0xf4]
add esp, 4
inc eax
add edi, 0x18
mov dword [esp + 0x10], eax
cmp eax, edx
jb 0x40c3e0
mov edx, dword [esp + 0x2c]
and edx, 0xfffffff8
test ebp, ebp
mov dword [esp + 0x2c], edx
mov eax, dword [esi + 0x1a0]
mov dword [esp + 0x60], eax
jbe 0x40c554
xor edi, edi
mov ebx, ebp
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esi + 0x19c]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x68]
push edx
add eax, edi
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.0040c670
add esp, 0x14
add edi, 0xc
dec ebx
jne 0x40c521
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esi + 0x1a0]
push 0x100
sub eax, ecx
push eax
push ecx
call fcn.00415860
mov dword [esp + 0x6c], eax
mov edx, dword [esi + 0x1a0]
mov ecx, eax
add esp, 0xc
sub ecx, edx
test ebp, ebp
mov dword [esi + 0x1a0], eax
jbe 0x40c59c
xor edx, edx
mov edi, ebp
mov eax, dword [esi + 0x19c]
mov ebp, dword [eax + edx]
add eax, edx
add ebp, ecx
add edx, 0xc
dec edi
mov dword [eax], ebp
jne 0x40c587
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40c61c
xor ebp, ebp
cmp word [esi + 0xec], bp
jbe 0x40c61c
xor edi, edi
xor eax, eax
jmp 0x40c5c0
mov ebx, dword [esp + 0x14]
lea esp, [esp]
mov ecx, dword [esi + 0x144]
add word [eax + ecx + 4], bx
mov edx, dword [esi + 0x144]
add word [eax + edx + 6], bx
lea ecx, [eax + ecx + 4]
lea ecx, [eax + edx + 6]
mov ecx, dword [esi + 0x144]
add word [eax + ecx + 8], bx
mov edx, dword [esi + 0x144]
mov bx, word [esp + 0x24]
lea ecx, [eax + ecx + 8]
xor ecx, ecx
mov cl, byte [eax + edx + 1]
add eax, 0x78
add ecx, edi
lea ecx, [ecx + ecx*2]
mov word [edx + ecx*2 + 0xe], bx
xor edx, edx
mov dx, word [esi + 0xec]
inc ebp
add edi, 0x14
cmp ebp, edx
jb 0x40c5b5
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x40c638
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x34]
jb 0x40c638
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x4c
ret
call fcn.004137d0
mov dword [eax], 0x7f
mov ecx, dword [esi + 0x19c]
push ecx
call fcn.004150b0
mov edx, dword [esi + 0x1a0]
push edx
call fcn.004150b0
add esp, 8
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x4c
ret