Function at 0x40f28c
Capabilities:
Get number of processors
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
mov edi, eax
mov byte [ebp - 1], 0
mov eax, 0x200
call fcn.00403ca4
mov dword [ebp - 0x14], eax
mov eax, 1
call fcn.00403ca4
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
xor ecx, ecx
xor edx, edx
call fcn.00404404
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
xor eax, eax
push ebp
push 0x40f50a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [edi + 0x30]
mov edx, dword [edi + 0x34]
cmp edx, dword [ebp + 0x14]
jne 0x40f2eb
cmp eax, dword [ebp + 0x10]
jae 0x40f2f7
call fcn.00405c48
jmp 0x40f515
mov eax, dword [edi + 0x30]
mov edx, dword [edi + 0x34]
cmp edx, dword [ebp + 0xc]
jne 0x40f305
cmp eax, dword [ebp + 8]
jae 0x40f4c4
mov eax, dword [edi + 0x30]
mov dword [ebp + 8], eax
mov eax, dword [edi + 0x34]
mov dword [ebp + 0xc], eax
jmp 0x40f4c4
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
sub eax, dword [ebp + 0x10]
sbb edx, dword [ebp + 0x14]
cmp edx, 0
jne 0x40f336
cmp eax, 0x200
jbe 0x40f348
jmp 0x40f338
jle 0x40f348
mov dword [ebp - 0x30], 0x200
mov dword [ebp - 0x2c], 0
jmp 0x40f35a
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
sub eax, dword [ebp + 0x10]
sbb edx, dword [ebp + 0x14]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x30]
mov esi, eax
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xc], eax
push 0
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
mov eax, dword [edi + 0x18]
push eax
call sub.kernel32.dll_SetFilePointerEx
test eax, eax
jne 0x40f3a2
mov edx, 0x40f530
mov eax, edi
call fcn.0040efc0
call fcn.00405c48
jmp 0x40f515
push 0
lea eax, [ebp - 0x1c]
push eax
push esi
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [edi + 0x18]
push eax
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x40f3bf
cmp esi, dword [ebp - 0x1c]
je 0x40f3f9
push 0
lea eax, [ebp - 0x20]
push eax
push 0x200
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [edi + 0x1c]
push eax
call sub.kernel32.dll_WriteFile
cmp eax, 1
sbb ebx, ebx
inc ebx
cmp byte [edi + 4], 0
je 0x40f430
cmp dword [ebp - 0x20], 0
jbe 0x40f430
mov edx, dword [ebp - 0x18]
lea eax, [edi + 0x50]
mov ecx, dword [ebp - 0x20]
call fcn.0040de70
jmp 0x40f430
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [edi + 0x1c]
push eax
call sub.kernel32.dll_WriteFile
cmp eax, 1
sbb ebx, ebx
inc ebx
cmp byte [edi + 4], 0
je 0x40f430
cmp dword [ebp - 0x20], 0
jbe 0x40f430
mov edx, dword [ebp - 0x14]
lea eax, [edi + 0x50]
mov ecx, dword [ebp - 0x20]
call fcn.0040de70
test bl, bl
jne 0x40f44a
mov edx, 0x40f590
mov eax, edi
call fcn.0040efc0
call fcn.00405c48
jmp 0x40f515
push 0
push 2
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
call fcn.00407650
cmp edx, 0
jne 0x40f4b2
cmp eax, 0
jne 0x40f4b2
push 0
push 0x64
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
call fcn.004075e0
mov dword [ebp - 0x38], eax
sub edx, 0x80000000
mov dword [ebp - 0x34], edx
fild qword [ebp - 0x38]
fadd qword [0x40f5d0]
mov eax, dword [edi + 0x30]
mov edx, dword [edi + 0x34]
mov dword [ebp - 0x40], eax
sub edx, 0x80000000
mov dword [ebp - 0x3c], edx
fild qword [ebp - 0x40]
fadd qword [0x40f5d0]
fdivp st(1)
call fcn.00404368
mov edx, eax
mov eax, edi
call fcn.0040f014
mov eax, esi
xor edx, edx
add dword [ebp + 0x10], eax
adc dword [ebp + 0x14], edx
add dword [ebp - 0x28], 1
adc dword [ebp - 0x24], 0
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
cmp edx, dword [ebp + 0xc]
jne 0x40f4d2
cmp eax, dword [ebp + 8]
jae 0x40f4de
cmp byte [edi + 5], 1
je 0x40f31c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40f511
cmp dword [ebp - 0x14], 0
je 0x40f4f9
mov eax, dword [ebp - 0x14]
call fcn.00403cc0
cmp dword [ebp - 0x18], 0
je 0x40f507
mov eax, dword [ebp - 0x18]
call fcn.00403cc0
pop eax
jmp eax
movzx eax, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10