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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x448
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x444], eax
mov ebx, 0x208
xor eax, eax
mov dword [ebp - 0x440], ecx
push ebx
push eax
lea eax, [ebp - 0x214]
xor edi, edi
push eax
mov esi, edx
inc edi
call sub.msvcrt.dll_memset
add esp, 0xc
xor eax, eax
push ebx
push eax
lea eax, [ebp - 0x41c]
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x440]
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x434], ecx
mov dword [ebp - 0x430], 0x1000441c
mov ebx, ecx
mov dword [ebp - 0x42c], 0x10004430
mov dword [ebp - 0x428], 0x10004440
mov dword [ebp - 0x424], 0x1000444c
mov dword [ebp - 0x420], 0x1000445c
test eax, eax
je 0x10019a27
cmp word [eax], cx
je 0x10019a27
cmp dword [ebp - 0x444], ecx
je 0x10019a27
test esi, esi
je 0x10019818
cmp word [esi], cx
je 0x10019818
push esi
mov edx, 0x104
lea ecx, [ebp - 0x41c]
call fcn.10015ac7
lea eax, [ebp - 0x214]
xor esi, esi
push eax
push esi
push 0x10004468
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x10019835
mov edi, esi
jmp 0x10019a23
lea eax, [ebp - 0x41c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x100197f1
mov edi, eax
jmp 0x10019a23
push esi
push 0xc000100
push 2
push esi
push esi
push 0xc0000000
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
xor eax, eax
mov dword [ebp - 0x43c], esi
cmp esi, 0xffffffff
je 0x1001982e
mov dword [ebp - 0x438], eax
cmp eax, 5
jae 0x10019969
push dword [ebp - 0x440]
mov edx, 0x104
lea ecx, [ebp - 0x214]
call fcn.10015ac7
mov esi, eax
test esi, esi
js 0x100199c7
mov eax, dword [ebp - 0x438]
lea ecx, [ebp - 0x214]
mov edx, 0x104
push dword [ebp + eax*4 - 0x430]
call fcn.1001a5bc
mov esi, eax
test esi, esi
js 0x10019988
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [ebp - 0x43c]
cmp eax, 0xffffffff
je 0x10019914
push ecx
push esi
lea edx, [ebp - 0x41c]
lea ecx, [ebp - 0x214]
call fcn.1004193c
test eax, eax
je 0x10019914
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
inc eax
add eax, 1
mov dword [ebp - 0x434], eax
je 0x10019914
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
xor eax, eax
mov word [ebx], ax
test ebx, ebx
je 0x10019954
mov eax, 0xfeff
mov word [ebx], ax
xor eax, eax
sub dword [ebp - 0x434], 2
push eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
push eax
lea eax, [ebp - 0x434]
push eax
push dword [ebp - 0x434]
lea eax, [ebx + 2]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
neg eax
sbb eax, eax
and edi, eax
mov eax, dword [ebp - 0x438]
inc eax
mov dword [ebp - 0x438], eax
test ebx, ebx
je 0x10019866
xor eax, eax
test edi, edi
je 0x10019a04
test ebx, ebx
je 0x10019a17
mov eax, dword [ebp - 0x444]
mov dword [eax], ebx
jmp 0x10019a17
test esi, 0x10000000
je 0x100199a9
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp eax, 0x13d
je 0x100199ba
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov esi, eax
jmp 0x100199ba
mov eax, esi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x100199ba
movzx esi, si
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov edi, eax
jmp 0x1001996b
test esi, 0x10000000
je 0x100199e8
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp eax, 0x13d
je 0x100199f9
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov esi, eax
jmp 0x100199f9
mov eax, esi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x100199f9
movzx esi, si
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov edi, eax
test ebx, ebx
je 0x10019a17
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x10019a31
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 4