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

Disassembly:
push 0xd4
mov eax, 0x1017d153
call fcn.10077939
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0xcc], ebx
mov dword [ebp - 0xdc], edi
push edi
xor eax, eax
mov dword [ebp - 4], edi
push 0x101d73f8
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], edi
mov word [ebp - 0x28], ax
call fcn.1001fe10
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 1
call fcn.1004f29f
call fcn.1003c688
test al, al
je 0x1003e29f
push eax
push eax
pop edi
push eax
pop ebp
pop ebx
pop ebx
pop edx
pop ecx
pop edi
pop edx
push eax
pop eax
push ecx
push esp
pop ebp
push ebp
pop esi
pop ecx
push esp
pop ebp
pop esp
push esi
push ebx
push edx
pop edi
push edx
push esi
mov ebx, dword [ebp - 0xcc]
xor edi, edi
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
cmovae eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1003e557
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
push edi
cmovae eax, dword [ebp + 0xc]
push 0x80
push 4
push edi
push 1
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc8], eax
cmp eax, 0xffffffff
jne 0x1003e30f
push 0x101d73f8
mov ecx, ebx
call fcn.1001fcb0
push edi
push 1
lea ecx, [ebp - 0x28]
call fcn.1001fd50
push edi
push 1
lea ecx, [ebp + 0xc]
call fcn.1001fd50
mov eax, ebx
jmp 0x1003e582
call fcn.1003c757
test al, al
je 0x1003e332
push ebx
pop edx
push ebp
push ecx
push esp
push esp
pop esi
pop ebx
pop edx
pop edx
pop ebx
push esi
push eax
push esp
push esp
pop eax
pop ebx
pop eax
pop esi
pop eax
pop ebp
pop edi
push ebx
push edi
pop ebx
pop edx
call fcn.1003c8f5
test al, al
je 0x1003e357
push esi
pop esp
push eax
push esi
push ebx
push esi
pop esp
push edi
pop ebp
push edi
push edx
pop edi
pop esp
push ecx
push ecx
pop eax
push ecx
pop ebp
push ebp
push ebx
pop esi
pop edi
pop ebx
push eax
pop ebp
push esp
push esi
push ebx
xor ebx, ebx
push ebx
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xd4], eax
inc eax
push eax
mov dword [ebp - 0xd8], eax
call fcn.10032069
mov dword [ebp - 0xd0], eax
pop ecx
test eax, eax
jne 0x1003e3a5
mov ecx, dword [ebp - 0xcc]
push 0x101d73f8
call fcn.1001fcb0
push ebx
push 1
lea ecx, [ebp - 0x28]
call fcn.1001fd50
push ebx
jmp 0x1003e572
call fcn.1003c7e1
test al, al
je 0x1003e3c3
pop edx
pop ebp
pop eax
push ecx
pop edx
push edx
pop edi
push eax
pop ebx
push esp
pop esi
push ebp
pop eax
pop ebx
pop edi
pop eax
push ebx
push edx
push ebx
push edi
pop eax
call fcn.1003c574
test al, al
je 0x1003e3dc
pop ecx
push ebp
pop ebp
push eax
pop ebp
pop ecx
push ebp
pop ecx
push edx
pop edi
pop edx
push eax
pop edx
pop edx
pop ecx
pop eax
call fcn.1003cb1d
test al, al
je 0x1003e3f9
pop esi
push ecx
pop edx
pop edx
push ebx
pop ebx
pop ecx
push edx
pop esi
pop ebp
push esi
push esi
pop esi
push ebp
push edi
pop ebx
push ebx
pop edi
pop ebp
pop esi
push dword [ebp - 0xd8]
mov ebx, dword [ebp - 0xd0]
push 0
push ebx
call fcn.10056120
add esp, 0xc
lea eax, [ebp - 0xe0]
push 0
push eax
push dword [ebp - 0xd4]
push ebx
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
call fcn.1003c7e1
test al, al
je 0x1003e45b
push eax
pop esp
pop ecx
push ebx
pop eax
pop ecx
push ecx
pop ebx
pop edx
push edi
push ebx
pop esp
push ebx
push ebx
push edi
pop esp
push edx
pop edi
pop ecx
pop ebx
push ebp
pop edx
pop edi
push edi
push edx
pop esp
push esi
push ebp
push esi
push edi
push ebx
push ebp
mov ebx, dword [ebp - 0xd0]
call fcn.1003cad8
test al, al
je 0x1003e47d
push esp
push edx
push edi
push edx
pop eax
pop ecx
push esp
push edx
pop ecx
pop edx
pop ecx
push esp
pop eax
push esp
pop edx
push esi
pop esp
push ebx
push edx
push esp
pop esi
push esp
push esi
push edi
pop edi
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xd4]
lea ecx, [ebp - 0xc4]
push ebx
call fcn.1004fcec
push ebx
call fcn.10032072
pop ecx
call fcn.1003c574
test al, al
je 0x1003e4bb
push ebp
push ebp
pop esi
push ecx
pop edi
push edi
push eax
push edi
pop ebx
pop ebx
push esi
push ebp
push esi
push edx
push ebx
push esp
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0xc4]
call fcn.1004f53a
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
call fcn.10040938
pop ecx
pop ecx
xor edi, edi
mov byte [ebp - 4], 4
push edi
push 1
lea ecx, [ebp - 0x58]
call fcn.1003cca1
call fcn.1003c7e1
test al, al
je 0x1003e511
push ebp
push ecx
push edi
pop esi
pop ecx
pop eax
pop esp
push ebx
push edi
pop ecx
push ecx
pop esp
push ecx
push eax
push ebx
push edi
push ebp
push esp
push eax
push ebx
pop esp
push eax
pop ebx
pop esi
pop eax
push ebp
push esi
push ecx
push edx
call fcn.1003ca4e
test al, al
je 0x1003e537
push esp
pop edx
push ebx
pop ebp
pop eax
pop ebp
push ecx
pop eax
push eax
push ecx
pop ebx
push edx
pop esi
push edx
pop esp
pop esp
push ebp
pop edx
pop ecx
push ebp
push eax
push edi
push esp
pop edi
push esi
push ecx
pop edi
xor edi, edi
cmp dword [ebp - 0x30], 0
jbe 0x1003e54c
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.10020060
push edi
push 1
lea ecx, [ebp - 0x40]
call fcn.1001fd50
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0x28]
push eax
call fcn.10021e30
push edi
push 1
lea ecx, [ebp - 0x28]
call fcn.1001fd50
push edi
push 1
lea ecx, [ebp + 0xc]
call fcn.1001fd50
mov eax, dword [ebp - 0xcc]
call fcn.100778f4
ret