Function at 0x40f556
Capabilities:
Read file on windows

Disassembly:
push 0x4c
mov eax, 0x4632b3
call fcn.0044b830
mov esi, ecx
xor edi, edi
mov dword [ebp - 4], edi
call fcn.0040f1b4
call fcn.0042953a
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401522
push 4
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call fcn.0040b08a
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.004056b8
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
mov byte [ebp - 4], 1
call fcn.004010b0
mov ebx, dword [ebp - 0x1c]
push 0x46c710
push ebx
call fcn.0044e6bb
test eax, eax
pop ecx
pop ecx
jne 0x40f7a0
push edi
push edi
push 3
push edi
push 1
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x40f7a0
push 4
lea eax, [ebp - 0x14]
push edi
push eax
mov dword [ebp - 0x20], edi
call fcn.0044b3e0
fldz
add esp, 0xc
fstp qword [ebp - 0x30]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
mov ecx, esi
mov dword [ebp - 0x18], edi
call fcn.0040e09d
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40f684
cmp dword [esi + 0x60], 1
jae 0x40f62c
lea eax, [esi + 0x38]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, esi
call fcn.0040dc75
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, esi
call fcn.0040dc75
mov eax, dword [ebp - 0x4c]
cmp eax, edi
jle 0x40f645
add dword [ebp - 0x18], eax
cmp dword [ebp - 0x48], edi
je 0x40f688
cmp eax, edi
je 0x40f660
fild dword [ebp - 0x34]
fmul qword [0x46c6d8]
fidiv dword [ebp - 0x4c]
fadd qword [ebp - 0x30]
fstp qword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
push 1
push edi
add eax, 0xfffffffc
push eax
push dword [ebp - 0x10]
call ebx
inc dword [esi + 0x60]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
mov ecx, esi
call fcn.0040e09d
test eax, eax
jne 0x40f617
cmp dword [esi + 0x60], edi
jbe 0x40f700
push 2
push edi
push edi
push dword [ebp - 0x10]
call ebx
fld qword [ebp - 0x30]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
xor edx, edx
div dword [esi + 0x60]
mov dword [ebp - 0x20], eax
call fcn.0044bc16
fild dword [ebp - 0x24]
mov ecx, eax
mov eax, dword [ebp - 0x24]
test eax, eax
jge 0x40f6be
fadd qword [0x46c6b8]
fmul qword [0x46c718]
mov eax, ecx
shr eax, 3
imul eax, dword [ebp - 0x20]
test eax, eax
mov dword [ebp - 0x24], eax
fild dword [ebp - 0x24]
jge 0x40f6dd
fadd qword [0x46c6b8]
fcompp
fnstsw ax
test ah, 5
jp 0x40f700
mov eax, dword [ebp - 0x20]
fild dword [ebp - 0x20]
or dword [esi + 0x10], 2
test eax, eax
jge 0x40f6fa
fadd qword [0x46c6b8]
fstp qword [esi + 0x70]
mov dword [esi + 0x68], ecx
push 2
push edi
push 0xffffffffffffff80
push dword [ebp - 0x10]
call ebx
cmp eax, 0xffffffff
je 0x40f770
push edi
lea eax, [ebp - 0x28]
push eax
mov edi, 0x80
push edi
lea ebx, [esi + 0x80]
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f770
cmp dword [ebp - 0x28], edi
jne 0x40f770
push 3
push 0x46c6e8
push ebx
call fcn.0044cd51
add esp, 0xc
test eax, eax
jne 0x40f770
lea eax, [esi + 0x30]
push eax
lea eax, [esi + 0x2c]
push eax
lea eax, [esi + 0x24]
push eax
lea eax, [esi + 0x28]
push eax
lea eax, [esi + 0x20]
push eax
lea eax, [esi + 0x18]
push eax
lea eax, [esi + 0x1c]
push eax
push ebx
call fcn.0040f02e
add esp, 0x20
or dword [esi + 0x10], 1
lea eax, [ebp + 8]
push eax
lea ecx, [esi + 0xc]
call fcn.004056b8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004010b0
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004010b0
xor eax, eax
inc eax
jmp 0x40f7b5
lea ecx, [ebx - 0x10]
call fcn.004010b0
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004010b0
xor eax, eax
call fcn.0044b908
ret 4