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

Disassembly:
sub esp, 0x10
push ebx
push ebp
xor ebp, ebp
mov ebx, ebp
push esi
push edi
test ecx, ecx
jne 0x40b9dc
push 0xffffffffffffff9a
pop eax
jmp 0x40bbe9
mov esi, dword [ecx + 0xd8]
test esi, esi
je 0x40b9d4
cmp dword [esi], ebp
jne 0x40b9ee
push 0xffffffffffffff9c
jmp 0x40b9d6
mov dword [esi + 0x10], edx
mov edx, 0x40000
mov dword [esi + 0x14], edx
cmp dword [esi + 0x78], ebp
ja 0x40ba13
jb 0x40ba05
cmp dword [esi + 0x74], edx
jae 0x40ba13
cmp dword [esi + 0xb8], ebp
jne 0x40ba13
mov eax, dword [esi + 0x74]
mov dword [esi + 0x14], eax
mov ecx, dword [esi + 8]
xor eax, eax
add ecx, dword [esi + 0x6c]
adc eax, dword [esi + 0x70]
cmp eax, ebp
ja 0x40bbde
jb 0x40ba30
cmp ecx, edx
jae 0x40bbde
cmp dword [esi + 0xb8], ebp
je 0x40bbde
mov eax, dword [esi + 0x6c]
add eax, dword [esi + 8]
mov dword [esi + 0x14], eax
jmp 0x40bbde
cmp dword [esi + 8], ebp
jne 0x40bad6
mov eax, dword [esi + 0x70]
cmp eax, ebp
ja 0x40ba5f
cmp dword [esi + 0x6c], ebp
jbe 0x40bad6
mov edi, 0x4000
cmp eax, ebp
ja 0x40ba7a
jb 0x40ba6f
cmp dword [esi + 0x6c], edi
jae 0x40ba7a
mov edi, dword [esi + 0x6c]
test edi, edi
je 0x40bbf3
mov ecx, dword [esi + 0xb0]
add ecx, dword [esi + 0x3c]
mov eax, dword [esi + 0xb4]
adc eax, dword [esi + 0x40]
mov edx, dword [esi + 0xa8]
push ebp
push eax
push ecx
lea ecx, [esi + 0x7c]
call fcn.004059da
test eax, eax
jne 0x40bbf7
push edi
push dword [esi]
push dword [esi + 0xa8]
push dword [esi + 0x98]
call dword [esi + 0x80]
cmp eax, edi
jne 0x40bbf7
add dword [esi + 0x3c], edi
mov eax, dword [esi]
adc dword [esi + 0x40], ebp
sub dword [esi + 0x6c], edi
mov dword [esi + 4], eax
sbb dword [esi + 0x70], ebp
mov dword [esi + 8], edi
mov eax, dword [esi + 0xac]
test eax, eax
je 0x40bb75
cmp dword [esi + 0xb8], ebp
jne 0x40bb75
cmp eax, 0xc
je 0x40bbde
mov eax, dword [esi + 0x18]
lea ecx, [esi + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
call fcn.0040408b
mov edi, eax
test edi, edi
js 0x40bb1e
cmp dword [esi + 0x1c], ebp
push 0xfffffffffffffffd
pop eax
cmovne edi, eax
mov ebp, dword [esi + 0x18]
mov eax, ebp
sub eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push 0
pop ecx
sbb ecx, ecx
mov dword [esp + 0x18], eax
add dword [esi + 0x5c], eax
mov dword [esp + 0x1c], ecx
adc dword [esi + 0x60], ecx
test edx, edx
jne 0x40bb46
xor ecx, ecx
jmp 0x40bb55
mov ecx, dword [esi + 0x64]
push eax
call fcn.004027be
mov ecx, eax
mov eax, dword [esp + 0x18]
sub dword [esi + 0x74], eax
mov eax, dword [esp + 0x1c]
sbb dword [esi + 0x78], eax
sub ebp, dword [esp + 0x10]
add ebx, ebp
mov dword [esi + 0x64], ecx
cmp edi, 1
je 0x40bbe7
test edi, edi
je 0x40bbdc
mov eax, edi
jmp 0x40bbe9
mov edi, dword [esi + 8]
test edi, edi
jne 0x40bb84
mov eax, dword [esi + 0x6c]
or eax, dword [esi + 0x70]
je 0x40bbe7
cmp dword [esi + 0x14], edi
mov edx, ebp
cmovb edi, dword [esi + 0x14]
test edi, edi
je 0x40bba2
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, edi
jb 0x40bb91
add dword [esi + 0x5c], edi
adc dword [esi + 0x60], ebp
mov ebp, dword [esi + 0x10]
test ebp, ebp
jne 0x40bbb3
xor eax, eax
jmp 0x40bbbe
mov ecx, dword [esi + 0x64]
mov edx, ebp
push edi
call fcn.004027be
sub dword [esi + 0x74], edi
mov dword [esi + 0x64], eax
lea eax, [edi + ebp]
sbb dword [esi + 0x78], 0
sub dword [esi + 8], edi
sub dword [esi + 0x14], edi
add dword [esi + 4], edi
add dword [esi + 0x18], edi
add ebx, edi
mov dword [esi + 0x10], eax
xor ebp, ebp
cmp dword [esi + 0x14], ebp
ja 0x40ba4a
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4
xor eax, eax
jmp 0x40bbe9
or eax, 0xffffffff
jmp 0x40bbe9