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

Disassembly:
sub esp, 0x84
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
push esi
mov eax, dword [ebx + 0xc24]
mov ecx, dword [ebx]
mov edx, dword [ebx + 0xc20]
mov dword [esp + 0x8c], eax
xor eax, eax
mov dword [esp + 0x44], ecx
mov al, byte [ebx + 0xc2c]
mov dword [esp + 0x2c], edx
shl eax, 4
add edx, 0x7f
push edi
mov ecx, dword [eax + 0x537dd0]
mov eax, dword [ebx + 0xc28]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xa4]
shr edx, 7
cmp eax, 3
mov dword [esp + 0x58], ecx
ja case.default.0x40bef3
jmp dword [eax*4 + 0x40c1fc]
mov ecx, dword [0x57c728]
shr ecx, 3
and cl, 1
mov byte [esp + 0x13], cl
je case.default.0x40bef3
mov eax, dword [esp + 0x9c]
mov esi, dword [eax + 8]
mov edi, dword [eax]
mov ebp, dword [eax + 0xc]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0xa0]
sub esi, edi
mov dword [esp + 0x4c], esi
sub ebp, ecx
mov edi, dword [eax]
mov eax, dword [eax + 4]
mov ecx, edi
mov dword [esp + 0x14], eax
lea esi, [edi + esi + 0x7f]
mov dword [esp + 0x40], ebp
shr ecx, 7
shr esi, 7
sub esi, ecx
shr eax, 7
mov dword [esp + 0x1c], esi
mov esi, eax
imul eax, edx
shl esi, 7
mov edi, esi
mov esi, dword [esp + 0x14]
sub edi, esi
mov esi, dword [ebx + 0xc1c]
add eax, ecx
mov dword [esp + 0x18], edi
lea esi, [esi + eax*4]
mov eax, dword [esp + 0x14]
lea ebp, [eax + ebp + 0x7f]
mov eax, dword [ebx + 0xc1c]
shr ebp, 7
imul ebp, edx
lea eax, [eax + ebp*4]
cmp eax, esi
mov dword [esp + 0x3c], eax
jbe case.default.0x40bef3
mov ebp, dword [esp + 0x1c]
shl ecx, 7
sub edx, ebp
mov dword [esp + 0x38], ecx
shl edx, 2
lea ecx, [edi + 0x80]
mov dword [esp + 0x44], edx
mov dword [esp + 0x2c], ecx
xor edx, edx
mov dword [esp + 0x24], ecx
test edi, edi
setl dl
dec edx
and edx, edi
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x40]
cmp ecx, edx
jl 0x40bfd1
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xa0]
mov ebp, dword [esp + 0x38]
sub ebp, dword [edx]
mov edx, dword [esp + 0x1c]
lea edx, [esi + edx*4]
cmp edx, esi
mov dword [esp + 0x34], edx
jbe 0x40c1cc
mov eax, dword [esp + 0x28]
sub eax, edi
mov dword [esp + 0x54], eax
lea eax, [ebp + 0x80]
mov dword [esp + 0x14], eax
jmp 0x40c00b
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov dword [esp + 0x20], eax
test ebp, ebp
setl cl
dec ecx
and ecx, ebp
mov edi, ecx
mov ecx, dword [esp + 0x4c]
cmp eax, ecx
jl 0x40c027
mov dword [esp + 0x20], ecx
mov eax, dword [esi]
mov byte [esp + 0x13], 0
test eax, eax
jne 0x40c069
mov ecx, 0x57c728
mov byte [esp + 0x13], 1
call fcn.0040c580
mov dword [esi], eax
lea edx, [eax + eax*2]
mov eax, dword [0x57c72c]
lea ebx, [eax + edx*8 - 0x18]
push ebx
call fcn.0040c210
mov dword [ebx + 0x10], 0x180
mov dword [ebx + 0xc], esi
mov ebx, dword [esp + 0x9c]
add esp, 4
mov eax, dword [esi]
test eax, eax
je 0x40c0a1
mov ecx, dword [0x57c744]
mov edx, dword [0x57c72c]
mov ebx, ecx
shl ebx, 4
add ebx, ecx
lea ecx, [eax + eax*2]
lea edx, [edx + ecx*8 - 0x18]
mov ecx, 0x57c728
push edx
call dword [ebx*4 + 0x538444]
mov ebx, dword [esp + 0x98]
test al, al
jne 0x40c0ad
mov al, byte [esp + 0x13]
test al, al
je 0x40c138
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x18]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
add ecx, edx
mov edx, dword [esp + 0x30]
add eax, ebp
mov dword [esp + 0x60], ecx
sub edx, eax
mov dword [esp + 0x5c], eax
cmp edx, 0x80
jb 0x40c0dc
mov edx, 0x80
mov eax, dword [esp + 0x90]
sub eax, ecx
cmp eax, 0x80
jb 0x40c0f1
mov eax, 0x80
mov dword [esp + 0x88], eax
lea eax, [ebx + 0x41c]
xor ecx, ecx
push eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x54]
lea eax, [esp + 0x60]
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x4c]
push ebx
push eax
push ecx
mov ecx, dword [esi]
lea eax, [esp + 0x8c]
push edx
push eax
push ecx
call dword [esp + 0x74]
add esp, 0x1c
mov ecx, dword [esp + 0x9c]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
lea edx, [eax + edi]
sub edi, ebp
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x28]
add edx, ecx
mov dword [esp + 0x64], edi
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x20]
add eax, edx
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x24]
add ecx, eax
lea eax, [ebx + 0x41c]
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esi]
push eax
mov dword [esp + 0x70], ecx
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x74]
push eax
push ecx
push edx
mov ecx, 0x57c728
call fcn.0040c230
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
add esi, 4
add ebp, 0x80
add ecx, 0x80
cmp esi, eax
mov dword [esp + 0x14], ecx
jb 0x40c007
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x44]
add edi, 0x80
add esi, ebp
add ecx, 0x80
cmp eax, esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x2c], ecx
ja 0x40bfb3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret