Function at 0x14001f334
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
push r14
push r15
sub rsp, 0x40
mov r14, rdx
xor r15d, r15d
lea rdx, [rax + 0x20]
mov qword [rax + 0x20], r15
call fcn.140020728
mov esi, eax
test eax, eax
jns 0x14001f386
cmp qword [0x140076ca8], r15
je 0x14001f606
xor r9d, r9d
lea r8, str._StringHelper::GetFullOutputPath_fileName__longFileName__
mov edx, eax
mov cl, 1
call fcn.14000153c
jmp 0x14001f606
mov rcx, qword [rsp + 0x78]
mov esi, 3
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], r15d
mov edx, 0x80000000
mov rbx, r15
mov dword [rsp + 0x20], esi
lea r8d, [rsi - 2]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
test rax, rax
je 0x14001f41a
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14001f41a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp qword [0x140076ca8], r15
je 0x14001f3fb
movzx edx, ax
lea r8, [0x1400681c0]
or edx, 0x80070000
mov cl, 1
test eax, eax
cmovle edx, eax
xor r9d, r9d
call fcn.14000153c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x14001f5ed
mov ecx, 0x64
lea rdx, [0x140037388]
mov dword [rsp + 0x70], ecx
call fcn.140033d7c
mov rdi, rax
test rax, rax
jne 0x14001f461
cmp qword [0x140076ca8], r15
mov esi, 0x8007000e
je 0x14001f5e5
xor r9d, r9d
lea r8, str._fileSample___NULL
mov edx, esi
mov cl, 1
call fcn.14000153c
jmp 0x14001f5e5
mov r8d, dword [rsp + 0x70]
lea r9, [rsp + 0x70]
mov rdx, rdi
mov qword [rsp + 0x20], r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14001f4ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp qword [0x140076ca8], r15
je 0x14001f55d
lea r8, str.__ReadFile_fileHandle__fileSample__sampleSize__sampleSize__0__
jmp 0x14001f545
mov eax, dword [rsp + 0x70]
mov edx, 2
cmp eax, edx
jb 0x14001f50c
mov ecx, 0xbbef
cmp word [rdi], cx
je 0x14001f4e1
mov ecx, 0xfeff
cmp word [rdi], cx
je 0x14001f4da
mov ecx, 0xfffe
cmp word [rdi], cx
jne 0x14001f4ef
mov esi, edx
jmp 0x14001f50f
mov esi, 1
jmp 0x14001f50f
cmp eax, esi
jb 0x14001f4ef
cmp byte [rdi + 2], 0xbf
jne 0x14001f4ef
mov edx, esi
jmp 0x14001f50f
xor r8d, r8d
mov edx, eax
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_IsTextUnicode]
nop dword [rax + rax]
neg eax
sbb ecx, ecx
and ecx, 0xfffffffe
add esi, ecx
mov edx, r15d
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x14001f579
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp qword [0x140076ca8], r15
je 0x14001f55d
lea r8, str.SetFilePointer_fileHandle__bomLength__NULL__FILE_BEGIN___INVALID_SET_FILE_POINTER
movzx edx, ax
mov cl, 1
or edx, 0x80070000
test eax, eax
cmovle edx, eax
xor r9d, r9d
call fcn.14000153c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x14001f5e5
lea rdx, [0x140037388]
mov ecx, 0x28
call fcn.140033b94
test rax, rax
je 0x14001f5aa
mov qword [rax], rbx
mov dword [rax + 8], esi
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov dword [rax + 0x20], r15d
mov dword [rax + 0x24], 1
jmp 0x14001f5ad
mov rax, r15
test rax, rax
jne 0x14001f5d5
cmp qword [0x140076ca8], r15
mov esi, 0x8007000e
je 0x14001f5de
xor r9d, r9d
lea r8, str._result___NULL
mov edx, esi
mov cl, 1
call fcn.14000153c
jmp 0x14001f5de
mov rbx, r15
mov qword [r14], rax
mov esi, r15d
xor ecx, ecx
call fcn.140002d28
mov rcx, rdi
call fcn.140033d70
lea rcx, [rbx - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14001f606
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x78]
call fcn.140033d70
mov rbx, qword [rsp + 0x60]
mov eax, esi
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret