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

Disassembly:
sub esp, 0x88
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
cmp dword [ebp + 0x3f8], ebx
jne 0x40c3d9
mov ecx, ebp
call fcn.0040d440
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x40c3d9
mov eax, dword [ebp + 0x4d0]
mov ecx, dword [eax + 8]
cmp ecx, 0xd
je 0x40c3b5
cmp ecx, ebx
je 0x40c29d
cmp ecx, 1
je 0x40c29d
cmp ecx, 9
je 0x40bfbf
cmp ecx, 0xa
je 0x40bfbf
cmp ecx, 0xb
jne 0x40bf7b
test byte [eax + 0x40], 0x10
lea ecx, [eax + 0x18]
push ecx
je 0x40bf56
mov edx, dword [esp + 0xa0]
add eax, 0x80
push eax
mov eax, dword [ebp + 0x140]
push edx
push eax
mov ecx, ebp
call fcn.0040b560
mov dword [esp + 0x10], eax
jmp 0x40c388
mov edx, dword [esp + 0xa0]
add eax, 0x80
push eax
mov eax, dword [ebp + 0x140]
push edx
push eax
mov ecx, ebp
call fcn.0040b730
mov dword [esp + 0x10], eax
jmp 0x40c388
cmp ecx, 0xc
je 0x40c3b5
cmp ecx, 2
jl 0x40bf92
cmp ecx, 7
jle 0x40c388
mov cx, word [eax + 8]
lea edx, [esp + 0x20]
add cx, 0x30
push ebx
mov word [esp + 0x24], cx
push edx
push 0x4048dc
mov ecx, ebp
mov dword [esp + 0x1c], ebx
mov word [esp + 0x2e], bx
call fcn.0040da40
jmp 0x40c388
xor edx, edx
cmp ecx, 9
mov ecx, dword [eax + 0x40]
sete dl
test ch, 4
mov dword [esp + 0x24], edx
je 0x40bfe9
mov ecx, dword [ebp + 0xec]
test ch, 0x40
jne 0x40bfe9
mov ebx, 1
mov dword [esp + 0x1c], ebx
jmp 0x40bfed
mov dword [esp + 0x1c], ebx
mov ecx, dword [eax + 0x10]
lea esi, [eax + 0x18]
mov dword [esp + 0x14], ecx
mov ecx, 0x1a
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x4c]
test ecx, ecx
jne 0x40c041
mov esi, dword [esp + 0x9c]
add eax, 0x80
push eax
mov eax, dword [0x41b3f0]
imul eax, esi
mov edi, dword [ebp + 0x140]
mov edx, dword [0x41b42c]
add eax, edi
push edx
push eax
call dword [fcn.0041b408]
mov edi, eax
add esp, 0xc
add edi, esi
mov dword [esp + 0x18], edi
jmp 0x40c070
mov esi, dword [esp + 0x9c]
add eax, 0x80
push eax
push ecx
mov ecx, dword [0x41b3f0]
mov edi, dword [ebp + 0x140]
imul ecx, esi
add ecx, edi
push ecx
mov ecx, ebp
call fcn.004099a0
add eax, esi
mov dword [esp + 0x18], eax
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40c104
mov edx, dword [ebp + 0x1fc]
lea ebx, [ebp + 0x1f4]
mov esi, eax
add edx, esi
mov dword [ebx + 8], edx
mov edx, dword [ebx + 4]
sub edx, dword [ebx + 8]
cmp edx, 0x10000
jge 0x40c0b1
push 0x10000
mov ecx, ebx
call fcn.00419e50
test eax, eax
je 0x40c39a
mov edi, dword [ebp + 0x1fc]
mov edx, dword [ebx]
mov eax, dword [ebp + 0x4d0]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, dword [eax + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x1fc]
mov ecx, dword [ebx]
mov edx, dword [esp + 0x80]
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x74], eax
add eax, ecx
add edx, eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x84], edx
mov esi, dword [esp + 0x24]
test esi, esi
je 0x40c1b7
test ebx, ebx
jne 0x40c164
test byte [ebp + 0xec], 0x20
je 0x40c164
mov eax, dword [ebp + 0x1e8]
mov edx, dword [ebp + 0x1ec]
lea esi, [ebp + 0x1e4]
sub eax, edx
cmp eax, 4
jae 0x40c14a
push 0x2000
mov ecx, esi
call fcn.00419e50
test eax, eax
je 0x40c3a5
mov ecx, dword [ebp + 0x1ec]
mov edx, dword [esi]
mov dword [ecx + edx], edi
mov eax, dword [esi + 8]
add eax, 4
mov dword [esi + 8], eax
mov esi, dword [esp + 0x24]
jmp 0x40c1b7
test dword [ebp + 0xec], 0x10000000
je 0x40c191
mov eax, dword [ebp + 0x154]
mov edx, dword [ebp + 0x140]
imul eax, dword [0x41b3f0]
add eax, edx
push 2
push eax
mov ecx, ebp
call fcn.00408b30
jmp 0x40c1b1
mov eax, dword [ebp + 0x1ec]
test eax, eax
je 0x40c1a2
mov ecx, ebp
call fcn.0040c3f0
mov ecx, dword [ebp + 0x140]
push 0
push ecx
call dword [0x41b478]
inc dword [ebp + 0x390]
mov eax, dword [0x41b3f0]
mov ecx, dword [ebp + 0x140]
imul eax, edi
mov edx, dword [0x41b438]
add eax, ecx
push edx
push eax
call dword [fcn.0041b3d0]
add esp, 8
test ebx, ebx
jne 0x40c1f9
lea ecx, [edi + 1]
push ecx
mov ecx, ebp
call fcn.0040bec0
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x3f8]
test eax, eax
jne 0x40c3b5
mov ecx, dword [0x41b4bc]
mov eax, dword [ebp + 0x140]
test ecx, ecx
je 0x40c21a
mov edx, dword [0x41b3f0]
imul edx, edi
mov word [edx + eax], 0
jmp 0x40c227
mov ecx, dword [0x41b3f0]
imul ecx, edi
mov byte [ecx + eax], 0
mov eax, dword [ebp + 0xec]
test eax, 0x10000000
jne 0x40c273
test esi, esi
je 0x40c24a
test al, 0x20
je 0x40c24a
mov eax, dword [ebp + 0x1ec]
test eax, eax
je 0x40c24a
test ebx, ebx
je 0x40c273
lea edx, [esp + 0x28]
mov ecx, ebp
push edx
call fcn.0040c4f0
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40c273
test ebx, ebx
je 0x40c273
test esi, esi
je 0x40c273
mov eax, dword [ebp + 0x140]
push eax
call dword [0x41b488]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40c281
sub dword [ebp + 0x1fc], eax
mov eax, dword [ebp + 0x1ec]
test eax, eax
je 0x40c388
add eax, 0xfffffffc
mov dword [ebp + 0x1ec], eax
jmp 0x40c388
mov ecx, dword [eax + 0x4c]
cmp ecx, ebx
jne 0x40c2d5
mov edx, dword [0x41b3f0]
mov edi, dword [esp + 0x9c]
imul edx, edi
mov ecx, dword [0x41b42c]
add eax, 0x80
push eax
mov eax, dword [ebp + 0x140]
add edx, eax
push ecx
push edx
call dword [fcn.0041b408]
add esp, 0xc
jmp 0x40c2fb
mov edi, dword [esp + 0x9c]
add eax, 0x80
push eax
mov eax, dword [0x41b3f0]
imul eax, edi
mov edx, dword [ebp + 0x140]
push ecx
add eax, edx
mov ecx, ebp
push eax
call fcn.004099a0
mov esi, eax
mov eax, dword [ebp + 0x1ec]
add esi, edi
cmp eax, ebx
je 0x40c310
mov ecx, ebp
call fcn.0040c3f0
test dword [ebp + 0xec], 0x10000000
je 0x40c372
mov ecx, dword [ebp + 0x154]
mov ebx, dword [ebp + 0x140]
imul ecx, dword [0x41b3f0]
add ecx, ebx
push 1
push ecx
mov ecx, ebp
call fcn.00408b30
mov esi, dword [ebp + 0x394]
mov edx, dword [ebp + 0x4d0]
inc esi
mov dword [ebp + 0x394], esi
mov eax, dword [edx + 0x38]
mov ecx, dword [edx + 0x3c]
mov edx, dword [ebp + 0x3a0]
add edx, eax
mov dword [ebp + 0x3a0], edx
mov eax, dword [ebp + 0x3a4]
adc eax, ecx
mov dword [ebp + 0x3a4], eax
jmp 0x40c388
push esi
mov ecx, ebp
call fcn.0040c700
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x3f8]
cmp eax, ebx
jne 0x40c3b5
mov eax, dword [ebp + 0x3f8]
xor ebx, ebx
cmp eax, ebx
je 0x40beda
jmp 0x40c3b5
push 0
push 0
push 0x4048c0
jmp 0x40c3ae
push 0
push 0
push 0x4048a4
mov ecx, ebp
call fcn.0040da40
mov eax, dword [esp + 0x10]
xor ebx, ebx
cmp eax, ebx
je 0x40c3d9
cmp dword [ebp + 0x3f8], ebx
jne 0x40c3d9
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x88
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x88
ret 4