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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x34
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x10006058
and eax, 0x10
mov dword [ebp - 0x18], eax
jne 0x100060b0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov edi, eax
cmp eax, 0xffffffff
je 0x10006058
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
mov ecx, eax
sub esp, 8
mov dword [ebp - 0x14], eax
lea eax, [eax + 2]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], eax
call eax
mov ecx, dword [ebp - 0x1c]
test eax, eax
mov ebx, eax
je 0x100060b7
mov byte [eax + ecx], 0
mov byte [eax + ecx + 1], 0
lea eax, [ebp - 0x14]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
sub esp, 4
cmp eax, 2
jbe 0x10005f8e
movzx edi, word [0x10013d75]
cmp word [ebx], di
je 0x10006090
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0x288
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_IsTextUnicode]
sub esp, 0xc
test byte [ebp - 0x10], 0x88
jne 0x10006080
mov eax, ebx
mov ecx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 8], eax
mov edi, eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x14], 0
mov dword [ebp - 0x24], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], eax
call ecx
mov ecx, dword [ebp - 0x20]
mov edx, eax
mov dword [ebp - 0x14], eax
sub esp, 0x18
lea eax, [eax + eax]
mov dword [ebp - 0x1c], edx
mov dword [esp], eax
call ecx
mov dword [esi], eax
test eax, eax
je 0x100060c8
mov dword [esp + 0x10], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
mov dword [esp + 8], edi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], eax
call ecx
xor eax, eax
sub esp, 0x18
mov dword [ebp - 0x18], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x18]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
movzx edx, ax
or edx, 0x80070000
test eax, eax
cmovg eax, edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esi], ebx
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ecx, byte [0x10013d77]
cmp byte [ebx + 2], cl
jne 0x10005f8e
mov dword [ebp - 0x18], 0xfde9
lea eax, [ebx + 3]
jmp 0x10005fb8
mov eax, 0x80070003
jmp 0x1000604d
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
mov eax, 0x8007000e
jmp 0x1000604d
mov eax, 0x8007000e
jmp 0x1000603e