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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x1400b8288]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov r12, r8
mov rbx, rdx
mov r13, rcx
mov edi, 0x208
mov r8d, edi
lea rcx, [rsp + 0x70]
xor edx, edx
call sub.msvcrt.dll_memset
mov r8d, edi
lea rcx, [rbp + 0x180]
xor edx, edx
call sub.msvcrt.dll_memset
xor esi, esi
lea rax, [0x1400a12d0]
mov qword [rsp + 0x48], rax
lea rax, str.WINNT
mov qword [rsp + 0x50], rax
lea rax, str.I386
mov qword [rsp + 0x58], rax
lea rax, str.AMD64
mov qword [rsp + 0x60], rax
lea rax, str.IA64
mov qword [rsp + 0x68], rax
mov edi, esi
mov dword [rsp + 0x40], esi
test r13, r13
je 0x14001e440
cmp word [r13], si
je 0x14001e440
test r12, r12
je 0x14001e440
test rbx, rbx
je 0x14001e300
cmp word [rbx], si
je 0x14001e300
lea rax, [rbp + 0x180]
mov edx, 0x104
sub rbx, rax
lea rcx, [rbp + 0x180]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14001e177
movzx eax, word [rbx + rcx]
test ax, ax
je 0x14001e177
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14001e155
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], si
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, str.IMGX
lea rcx, [rbp + 0x180]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
nop dword [rax + rax]
test eax, eax
je 0x14001e320
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x28], 0xc000100
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14001e320
mov ebx, 1
cmp esi, 5
jae 0x14001e42d
lea rax, [rsp + 0x70]
mov r8, r13
sub r8, rax
lea rcx, [rsp + 0x70]
xor ebx, ebx
mov edx, 0x104
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14001e235
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14001e235
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14001e212
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], bx
mov rax, rdx
neg rax
sbb ecx, ecx
not ecx
and ecx, 0x8007007a
test rdx, rdx
je 0x14001e3e8
mov r8d, esi
lea rcx, [rsp + 0x70]
mov edx, 0x104
mov r8, qword [rsp + r8*8 + 0x48]
call fcn.1400010f8
mov ebx, eax
test eax, eax
js 0x14001e395
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x14001e327
xor r9d, r9d
lea rdx, [rbp + 0x180]
mov r8, r14
lea rcx, [rsp + 0x70]
call fcn.140055114
xor ebx, ebx
test eax, eax
je 0x14001e329
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
add eax, 2
mov dword [rsp + 0x40], eax
je 0x14001e329
mov ebx, eax
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
xor ebx, ebx
mov rdi, rax
mov word [rax], bx
jmp 0x14001e329
lea rdx, [rbp + 0x180]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
nop dword [rax + rax]
test eax, eax
jne 0x14001e185
mov ebx, esi
jmp 0x14001e43c
xor ebx, ebx
test rdi, rdi
je 0x14001e37c
mov eax, 0xfeff
xor r9d, r9d
mov word [rdi], ax
xor r8d, r8d
add dword [rsp + 0x40], 0xfffffffe
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
mov r8d, dword [rsp + 0x40]
lea rdx, [rdi + 2]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x14001e40d
inc esi
mov ebx, 1
test rdi, rdi
je 0x14001e1ed
mov qword [r12], rdi
jmp 0x14001e42d
mov ecx, ebx
bt ebx, 0x1c
jae 0x14001e3c2
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
cmp eax, 0x13d
je 0x14001e3d4
mov ecx, ebx
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x14001e3d4
and ecx, 0x1fff0000
movzx eax, bx
cmp ecx, 0x70000
cmove ebx, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
mov ebx, eax
jmp 0x14001e408
mov edx, ecx
movzx eax, cx
and edx, 0x1fff0000
cmp edx, 0x70000
cmove ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
test rdi, rdi
je 0x14001e42d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov eax, ebx
jmp 0x14001e453
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.140096bd0
lea r11, [rsp + 0x4a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret