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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x40f4bf
mov eax, dword [eax + 0x14]
push 0x200
mov dword [ebp - 0xc], eax
call fcn.004065a0
mov esi, eax
add esp, 4
test esi, esi
je 0x40f4a4
push 0x200
push ebx
push esi
call fcn.004eb2d0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov dword [esi], ecx
mov dword [ebp - 4], esi
test esi, esi
jne 0x40f4b5
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x14]
mov eax, edx
jmp 0x40f4c2
mov ecx, dword [edi + 0x1c]
mov dword [edi + 0x18], ecx
mov cl, byte [edi + 0xb]
mov byte [edi + 0x12], cl
test eax, eax
jne 0x40f4e3
cmp dword [edi + 0xac], ebx
je 0x40f4e3
call fcn.0040f270
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 0x48]
mov eax, dword [edi + 0x4c]
lea esi, [edi + 0x48]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
test ecx, ecx
je 0x40f561
cmp dword [edi + 0xac], ebx
jne 0x40f561
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0xc]
or eax, edx
je 0x40f519
mov eax, dword [ecx + 8]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
jmp 0x40f525
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov edx, dword [ecx]
mov dword [esi], edx
mov eax, dword [ecx + 4]
mov dword [esi + 4], eax
nop
mov edx, dword [esi + 4]
cmp edx, dword [ebp - 0x14]
jg 0x40f568
jl 0x40f541
mov eax, dword [esi]
cmp eax, dword [ebp - 0x18]
jae 0x40f568
mov ecx, dword [ebp - 4]
push 1
push 1
push ecx
push esi
push edi
call fcn.0040e780
mov ecx, dword [ebp + 8]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x40f530
jmp 0x40f648
mov dword [esi], ebx
mov dword [esi + 4], ebx
jmp 0x40f575
test ebx, ebx
jne 0x40f648
jmp 0x40f575
mov ecx, dword [ebp + 8]
mov edx, dword [esi + 4]
cmp edx, dword [ebp - 0x1c]
jg 0x40f648
jl 0x40f58e
mov eax, dword [esi]
cmp eax, dword [ebp - 0x20]
jae 0x40f648
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 8]
push ecx
push edx
push eax
push 0
lea ecx, [ebp - 0x14]
mov edx, edi
mov dword [ebp - 8], 0
call fcn.0040de20
add esp, 0x10
cmp dword [ebp - 8], 0
mov ebx, eax
mov dword [ebp - 0xc], ebx
jne 0x40f5fa
mov eax, dword [edi + 0x78]
mov ecx, dword [esi]
xor edx, edx
add eax, dword [edi + 0x50]
adc edx, dword [edi + 0x54]
cmp eax, ecx
jne 0x40f5fa
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], eax
cmp edx, eax
jne 0x40f5fa
mov eax, dword [edi + 0x84]
mov esi, dword [ebp - 0x20]
add eax, 8
cdq
sub esi, ecx
mov ecx, dword [ebp - 0x1c]
sbb ecx, dword [ebp - 0x24]
push edx
push eax
push ecx
push esi
call fcn.00502d00
mov esi, dword [ebp - 0x10]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0
test ebx, ebx
jne 0x40f645
mov edx, dword [ebp - 8]
cmp dword [ebp - 0xc], edx
jae 0x40f572
mov eax, dword [esi + 4]
cmp eax, dword [ebp - 0x1c]
jg 0x40f572
jl 0x40f62a
mov ecx, dword [esi]
cmp ecx, dword [ebp - 0x20]
jae 0x40f572
mov edx, dword [ebp - 4]
push 1
push 1
push edx
push esi
push edi
call fcn.0040e780
inc dword [ebp - 0xc]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x40f605
mov ecx, dword [ebp + 8]
xor edx, edx
cmp ecx, edx
je 0x40f6d1
mov eax, dword [edi + 0x84]
add eax, 4
imul eax, dword [ecx + 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0xac]
mov dword [ebp - 0x14], edx
cmp eax, edx
je 0x40f6a1
mov ebx, dword [ecx + 0x28]
cmp ebx, dword [eax + 0x54]
je 0x40f680
mov dword [ecx + 0x1c], edx
mov edx, dword [eax + 0x54]
mov dword [ecx + 0x28], edx
mov edx, dword [ecx + 0x1c]
cmp edx, dword [eax + 0x30]
jae 0x40f69f
mov dword [eax + 0x30], edx
mov edx, dword [ecx + 0x20]
mov dword [eax + 0x38], edx
mov ecx, dword [ecx + 0x24]
mov dword [eax + 0x3c], ecx
call fcn.00412000
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov edx, dword [ecx + 0x18]
mov dword [ebp + 8], edx
test ebx, ebx
jne 0x40f6d1
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x30]
jae 0x40f6d1
mov ecx, dword [ebp - 4]
push 1
push 0
push ecx
lea edx, [ebp - 0x18]
push edx
push edi
call fcn.0040e780
inc dword [ebp + 8]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x40f6ab
mov edi, dword [ebp - 4]
test edi, edi
je 0x40f708
cmp dword [edi + 8], 0
je 0x40f6ff
add edi, 0xc
mov dword [ebp + 8], 0x7d
mov eax, dword [edi]
push eax
call fcn.0040bed0
add esp, 4
add edi, 4
sub dword [ebp + 8], 1
jne 0x40f6e8
mov edi, dword [ebp - 4]
push edi
call fcn.00406880
add esp, 4
test ebx, ebx
jne 0x40f717
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret