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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d763
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x88
push esi
push edi
mov eax, dword [0x441018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
lea eax, [ebp - 0x1c]
push eax
call fcn.0040ee10
push eax
mov dword [ebp - 4], 0
call fcn.004091a0
mov edi, eax
add esp, 4
mov ecx, dword [edi]
push 0x20
mov esi, dword [ecx + 0x30]
mov ecx, esi
call dword [0x42f1a4]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x18]
movzx ecx, ax
mov dword [ebp - 0x20], ecx
test edi, edi
je 0x40f68f
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x42f1a4]
mov ecx, edi
call esi
mov edi, eax
test edi, edi
je 0x40f68c
mov ecx, dword [edi]
push 1
mov esi, dword [ecx]
mov ecx, esi
call dword [0x42f1a4]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x14]
mov eax, dword [esi + 4]
sub eax, dword [esi]
sar eax, 3
imul eax, eax, 0xeeeeeeef
test eax, eax
jne 0x40f6d2
push ecx
lea ecx, [ebp - 0x98]
call fcn.0040f820
push eax
push dword [ebx + 8]
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.0040f930
lea ecx, [ebp - 0x98]
call fcn.00405820
jmp 0x40f7e8
mov edi, dword [ebx + 8]
cmp edi, eax
jbe 0x40f700
push ecx
lea ecx, [ebp - 0x98]
call fcn.0040f820
push eax
push edi
mov ecx, esi
mov dword [ebp - 4], 2
call fcn.0040f8a0
lea ecx, [ebp - 0x98]
call fcn.00405820
mov ecx, dword [esi + 0x18]
lea edx, [esi + 0xc]
test ecx, ecx
je 0x40f758
mov eax, dword [edx]
mov dword [ebp - 0x18], eax
jns 0x40f735
mov eax, ecx
neg eax
je 0x40f735
mov esi, dword [edx]
mov eax, ecx
not eax
mov dword [ebp - 0x18], esi
mov esi, dword [ebp - 0x14]
shr eax, 5
lea eax, [eax*4 + 4]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
jmp 0x40f743
mov edx, dword [ebp - 0x18]
mov eax, ecx
shr eax, 5
lea eax, [edx + eax*4]
lea edx, [esi + 0xc]
and ecx, 0x1f
push ecx
push eax
mov eax, dword [edx]
mov ecx, edx
push 0
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040fbb0
test edi, edi
je 0x40f7e8
xor edx, edx
mov eax, dword [esi]
add eax, edx
mov dword [eax], 0xffffffff
lea esi, [eax + 4]
mov dword [eax + 0x68], 0xffffffff
mov dword [eax + 0x6c], 0x7fffffff
mov dword [eax + 0x70], 0
cmp dword [eax + 0x18], 8
jb 0x40f78d
mov esi, dword [eax + 4]
xor ecx, ecx
mov dword [eax + 0x14], 0
mov word [esi], cx
lea esi, [eax + 0x1c]
cmp dword [eax + 0x30], 8
jb 0x40f7a5
mov esi, dword [eax + 0x1c]
mov dword [eax + 0x2c], ecx
add edx, 0x78
xor ecx, ecx
mov word [esi], cx
mov esi, dword [ebp - 0x14]
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], ecx
mov dword [eax + 0x44], ecx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x40], 6
mov word [eax + 0x48], cx
mov dword [eax + 0x4c], 0x201
mov dword [eax + 0x54], 0
mov dword [eax + 0x50], 0
sub edi, 1
jne 0x40f762
cmp dword [esi + 0x40], 8
lea eax, [esi + 0x2c]
jb 0x40f7f4
mov eax, dword [esi + 0x2c]
xor ecx, ecx
mov dword [esi + 0x3c], 0
mov word [eax], cx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4