Function at 0x402f10
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x523240
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x556358]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 4], 0
push eax
push 0x543194
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00402a30
mov byte [ebp - 4], 1
mov dword [ebp - 0x4c], 0
call fcn.00494dd0
test al, al
je 0x402f8e
pop ecx
pop esp
push eax
push esp
push ebx
push ecx
push esp
push ebx
pop esi
pop edi
pop ebp
pop edi
pop edi
pop ebx
push edi
pop edx
pop ebx
pop eax
pop esi
pop esi
push ecx
push ebx
push 0x20
push str.fa4d02d7ccd654f812d9b62ba632350d
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.004023d0
cmp dword [ebp - 0x18], 0x100
mov eax, dword [ebp - 0x14]
jbe 0x402fe5
cmp eax, 0x10
jb 0x402fcd
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402510
pop esi
push ebp
pop ecx
pop eax
pop esi
push edx
pop edi
push ecx
push edx
pop esp
push esp
pop esi
pop esp
push edi
push eax
pop ecx
push ebx
pop ebx
pop esi
push edi
pop ebx
pop esi
jmp 0x402ff7
cmp eax, 0x10
jb 0x402ff7
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402510
call fcn.00494b30
test al, al
je 0x40301a
push ebp
push eax
push esp
pop edx
pop edx
pop eax
pop esi
pop edi
pop edi
push ebx
push edx
pop ebp
pop ecx
push esi
push eax
push esp
pop ecx
pop ebx
pop ebp
pop ebx
pop edx
pop esi
pop esi
pop esp
push esi
pop ebx
push 0x20
push str.57d0fe31bdd0193168aeb025444b8d6f
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.004023d0
cmp dword [ebp - 0x18], 0x100
mov eax, dword [ebp - 0x14]
jbe 0x403070
cmp eax, 0x10
jb 0x403059
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402510
pop ebx
pop ebp
pop edi
pop eax
pop ebp
pop edx
pop ebp
push eax
push esp
push eax
push ebx
push esp
pop esp
pop edi
pop ebp
pop edx
push esp
push ebx
push eax
pop esi
pop esi
jmp 0x403082
cmp eax, 0x10
jb 0x403082
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402510
call fcn.00494dd0
test al, al
je 0x4030aa
pop edx
pop ebp
pop edx
pop edx
pop esp
pop ebx
push esi
push ebx
push edx
pop esi
push eax
pop edx
pop esp
push edi
pop ebx
pop esi
pop esp
pop edx
pop ecx
push esp
pop ebp
push edx
push edx
push ecx
pop edi
push ebp
push edx
push ecx
pop eax
push esi
pop ebx
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40324f
call fcn.00494c10
test al, al
je 0x4030e2
push ecx
pop ebp
pop esp
pop ebp
pop esi
pop ecx
pop eax
push edx
push edx
push ebp
pop ebp
push ebx
push edx
pop edi
pop edx
push eax
pop edx
pop edi
push esi
pop eax
push edx
call fcn.00494970
test al, al
je 0x403105
push esp
pop ebp
pop edx
push edx
push edx
pop ecx
push edi
pop esp
pop esi
pop esi
push esi
push ecx
push ecx
push esp
push ebx
pop ecx
push esp
pop esi
push esi
push ebp
pop esp
pop eax
push edx
push edi
push esp
pop esi
call fcn.00494ac0
test al, al
je 0x403124
pop ebp
push edx
pop edx
pop eax
pop eax
push esp
pop esp
pop edx
push esp
push esp
push ecx
pop ebp
pop edx
push ecx
pop eax
push edx
pop ebx
push esi
pop ecx
pop ecx
push ecx
push edi
call fcn.00494900
test al, al
je 0x403142
pop ecx
pop edx
pop edi
push ecx
pop eax
push ecx
push esp
pop esi
push ebp
pop edi
push edx
pop ebp
push eax
pop edi
push ebp
pop edi
pop eax
push esp
pop edi
pop esi
push esp
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
push 0
cmovae eax, dword [ebp + 8]
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x48], esi
cmp esi, 0xffffffff
jne 0x40319b
call fcn.00494820
test al, al
je 0x4031e1
push esi
push esp
push ecx
pop ebp
push ecx
pop ecx
pop edi
push edx
pop edx
push ecx
pop esi
push ecx
push esp
push ecx
push esp
pop ebx
push esp
push ebp
pop ebx
push esi
pop esi
pop eax
push eax
push ebp
push ebp
push edx
push edx
xor ebx, ebx
jmp 0x403252
call fcn.00494ba0
test al, al
je 0x4031c4
push edi
pop ecx
push esi
push ebx
push edi
push ebp
push ebp
push esp
pop eax
pop edi
pop ecx
pop ebp
pop ecx
pop esp
push esi
pop eax
pop ebp
push ebp
push ebp
push eax
pop edi
push edx
push eax
push eax
pop ebp
push ebx
pop edx
push ebp
pop esi
mov esi, dword [ebp - 0x48]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
call fcn.004d8036
mov ebx, eax
add esp, 4
mov dword [ebp - 0x4c], ebx
test ebx, ebx
jne 0x4031e5
xor ebx, ebx
jmp 0x403252
push edi
push 0
push ebx
call fcn.004e0850
add esp, 0xc
lea eax, [ebp - 0x44]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
call fcn.00494b30
test al, al
je 0x403227
pop eax
push edx
push edi
push esp
push ebp
pop ebp
pop eax
push eax
pop esi
push esi
pop eax
pop esp
push esi
push esi
push eax
push esp
push eax
push eax
pop ecx
push edx
pop esi
push edx
pop esp
pop eax
push esi
push ebp
push edx
mov esi, dword [ebp - 0x48]
call fcn.00494e40
test al, al
je 0x403248
pop esp
push ebx
pop esp
pop esp
pop esp
pop edi
pop eax
pop eax
push esi
push esi
pop eax
push esi
push ebx
push eax
push ebp
push ebp
push ebp
push edi
pop edi
pop ebp
pop esp
push ebx
push ebp
pop ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x403267
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00402b90
mov ecx, dword [ebp + 0x1c]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
cmp ecx, 8
jb 0x403290
inc ecx
push ecx
push dword [ebp + 8]
lea ecx, [ebp + 8]
call fcn.00402b90
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d7fbc
mov esp, ebp
pop ebp
ret