Function at 0x40fb07
Capabilities:
Check if file exists
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1fc
push ebx
push esi
push edi
push 0xffffffffffffffff
push dword [0x42f168]
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [ebp + 0x14], 6
jne 0x40fb88
lea eax, [ebp - 0x70]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x40fb55
push dword [0x42f168]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push str.Cant_get_the_default_Windows_Directory
call fcn.004099b6
pop ecx
push dword [ebp + 0xc]
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x1fc]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
xor eax, eax
push eax
push 2
push 3
push eax
push eax
lea eax, [ebp - 0x1fc]
push closesocket
push eax
jmp 0x40fb9f
xor eax, eax
push eax
push 0x80
push 3
push eax
push eax
push closesocket
push dword [0x42de58]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x40fbd9
push dword [0x42f168]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x40fbd1
call esi
cmp eax, 3
je 0x40fbd1
push 4
jmp 0x40fbd3
push 3
pop eax
jmp 0x40fd4c
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x40fc05
push dword [0x42f168]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 3
jmp 0x40fd4c
mov esi, 0x230
push esi
call fcn.004179b4
mov dword [ebp - 8], eax
mov dword [esp], 0x22c
call fcn.004179b4
pop ecx
mov dword [ebp + 0x14], eax
lea eax, [ebp - 0xc]
push 0
push eax
push esi
push dword [ebp - 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40fd01
cmp dword [ebp - 0xc], 0
jbe 0x40fd01
mov esi, dword [ebp + 0x14]
push 2
pop edi
push edi
push dword [ebp - 8]
push esi
call fcn.0040ced0
add esp, 0xc
test eax, eax
jbe 0x40fcfe
sub esp, 0x22c
mov ecx, 0x8b
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.0040eddb
add esp, 0x22c
test al, al
jne 0x40fc8a
mov dword [ebp - 4], 2
jmp 0x40fd01
mov esi, dword [ebp + 0x14]
lea eax, [esi + 0x18]
push eax
lea eax, [ebp - 0x134]
push eax
call fcn.00418030
push esi
call fcn.0040d3bc
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.00418030
sub esp, 0xb0
lea esi, [ebp - 0x134]
push 0x31
pop ecx
mov edi, esp
push 0x42f170
rep movsd dword es:[edi], dword [esi]
call fcn.0040efb1
mov eax, dword [ebp + 0x14]
push dword [ebp + 0x10]
add eax, 0x18
push eax
call fcn.004181a0
add esp, 0xd0
test eax, eax
jne 0x40fd01
push 1
pop ebx
push 0x22c
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.00417bc0
add esp, 0xc
jmp 0x40fd01
mov dword [ebp - 4], edi
mov esi, 0x230
cmp dword [ebp - 0xc], esi
je 0x40fc23
cmp dword [ebp - 4], 2
je 0x40fd22
neg ebx
sbb ebx, ebx
and ebx, 0xfffffffe
add ebx, 3
mov dword [ebp - 4], ebx
push dword [ebp + 0x14]
call fcn.00417985
push dword [ebp - 8]
call fcn.00417985
pop ecx
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x42f168]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov al, byte [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret