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

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push edi
mov ebx, dword [ebp + 8]
mov edi, dword [ebx + 0x78]
cmp byte [ebx + 0x11], 2
mov dword [esp + 0x10], edi
mov dword [ebx + 0x78], 0xfffffffd
ja 0x40f104
lea eax, [ebx + 0x18]
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov byte [ebx + 0x11], 3
mov dword [ebx + 0x14], 0
push esi
mov al, byte [ebx + 0x11]
cmp al, 3
je 0x40f114
cmp al, 4
jne 0x40f2c6
mov esi, dword [ebp + 8]
movzx eax, byte [esi + 0x11]
cmp eax, 5
ja case.default.0x40f120
jmp dword [eax*4 + 0x40f2fc]
mov eax, dword [esi + 0x7c]
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
test byte [eax + 4], 3
je 0x40f152
push eax
push esi
call fcn.0040de40
mov eax, dword [esi + 0x7c]
add esp, 8
mov eax, dword [eax + 0x24]
test byte [eax + 4], 3
je 0x40f165
push eax
push esi
call fcn.0040de40
add esp, 8
mov eax, dword [esi + 0xbc]
add eax, 4
cmp eax, 0xfffffff6
jbe 0x40f189
mov eax, dword [esi + 0xb8]
test byte [eax + 4], 3
je 0x40f189
push eax
push esi
call fcn.0040de40
add esp, 8
push esi
call fcn.0040df40
add esp, 4
mov byte [esi + 0x11], 1
jmp case.default.0x40f120
cmp dword [esi + 0x20], 0
je 0x40f1af
push esi
call fcn.0040f470
add esp, 4
jmp case.default.0x40f120
mov byte [esi + 0x11], 2
jmp case.default.0x40f120
cmp dword [esi + 0xf8], 0
jne case.default.0x40f120
push ebp
push esi
call fcn.0040d910
add esp, 8
mov byte [esi + 0x11], 3
mov dword [esi + 0x14], 0
jmp case.default.0x40f120
mov ecx, dword [esi + 0x14]
mov edi, dword [esi + 8]
lea eax, [ecx + 1]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x58]
lea eax, [eax + ecx*4]
push eax
push esi
call fcn.0040e7b0
mov eax, dword [esi + 0x14]
add esp, 8
cmp eax, dword [esi + 0x5c]
jbe 0x40f207
mov byte [esi + 0x11], 4
mov eax, dword [esi + 8]
sub eax, edi
add dword [esi + 0x34], eax
jmp case.default.0x40f120
mov edi, dword [esi + 8]
push 0x28
push dword [esi + 0x1c]
push esi
call fcn.0040e710
mov ecx, dword [esi + 8]
add esp, 0xc
sub ecx, edi
mov dword [esi + 0x1c], eax
add dword [esi + 0x34], ecx
cmp dword [eax], 0
jne case.default.0x40f120
mov ecx, dword [esi + 0x5c]
mov eax, ecx
shr eax, 2
cmp dword [esi + 0x60], eax
ja 0x40f25a
cmp ecx, 0x1ff
jbe 0x40f25a
shr ecx, 1
push ecx
push ebp
call fcn.0040fe50
add esp, 8
cmp dword [esi + 0x2c], 0
je 0x40f2b6
mov word [esi + 0x11], 0x105
jmp case.default.0x40f120
cmp dword [esi + 0x2c], 0
je 0x40f29e
cmp dword [esi + 0xf8], 0
jne case.default.0x40f120
push ebp
call fcn.0040dd50
mov eax, dword [esi + 0x34]
add esp, 4
cmp eax, 0x64
jbe case.default.0x40f120
add eax, 0xffffff9c
mov dword [esi + 0x34], eax
jmp case.default.0x40f120
cmp byte [esi + 0x12], 0
jne 0x40f2b6
mov eax, dword [esi + 0xfc]
push dword [eax + 0x14]
push ebp
call fcn.00410e10
add esp, 8
mov byte [esi + 0x11], 0
mov dword [esi + 0x30], 0
jmp case.default.0x40f120
mov byte [ebx + 0x11], 0
pop esi
nop dword [eax + eax]
push ebp
call fcn.0040e2a0
add esp, 4
cmp byte [ebx + 0x11], 0
jne 0x40f2d0
mov eax, 0x51eb851f
mul dword [ebx + 0x34]
mov eax, dword [esp + 0x10]
shr edx, 5
imul edx, dword [ebx + 0x3c]
pop edi
pop ebp
mov dword [ebx + 0xc], edx
mov dword [ebx + 0x78], eax
pop ebx
ret