Function at 0x14001f894
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x48
xor ebx, ebx
mov rdi, rcx
cmp dword [rcx + 8], 3
mov r15d, ebx
mov qword [rbp - 0x18], rbx
mov r12b, bl
setne r15b
mov dword [rbp + 0x60], ebx
inc r15d
mov r13b, bl
test r13b, r13b
jne 0x14001fb51
mov r14, qword [rdi + 0x18]
mov r11d, ebx
test r12b, r12b
jne 0x14001f986
mov esi, r15d
test r13b, r13b
jne 0x14001f986
add byte [rax], al
test r14, r14
je 0x14001f986
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x14001f986
cmp r15d, dword [rdi + 0x20]
ja 0x14001f986
mov eax, dword [rdi + 0x20]
lea r8, [r15 - 1]
lea rdx, [rcx - 1]
add r8, r14
add rdx, rax
cmp r8, r14
jb 0x14001f986
cmp rdx, rcx
jb 0x14001f986
cmp r14, rcx
jb 0x14001f986
cmp r8, rdx
ja 0x14001f986
mov r8b, 0xd
mov rdx, r14
mov rcx, rdi
call fcn.14001fce0
test al, al
je 0x14001f94a
mov r12b, 1
jmp 0x14001f97a
mov r8b, 0xa
mov rdx, r14
mov rcx, rdi
call fcn.14001fce0
test al, al
je 0x14001f961
mov r13b, 1
jmp 0x14001f97a
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call fcn.14001fce0
test al, al
jne 0x14001fb1e
add r11d, r15d
add r14, rsi
test r12b, r12b
je 0x14001f8ed
test r11d, r11d
je 0x14001f9a3
mov rcx, qword [rdi + 0x18]
lea r9, [rbp + 0x60]
lea r8, [rbp - 0x18]
mov edx, r11d
call fcn.14001fbf4
mov esi, eax
jmp 0x14001f9a5
mov esi, ebx
test esi, esi
js 0x14001fb3d
mov rcx, qword [rdi + 0x10]
mov esi, dword [rdi + 0x20]
mov qword [rdi + 0x18], r14
test r14, r14
je 0x14001f9ef
test rcx, rcx
je 0x14001f9ef
cmp r15d, esi
ja 0x14001f9ef
mov r8d, r15d
lea rdx, [rcx - 1]
dec r8
add rdx, rsi
add r8, r14
cmp r8, r14
jb 0x14001f9ef
cmp rdx, rcx
jb 0x14001f9ef
cmp r14, rcx
jb 0x14001f9ef
cmp r8, rdx
jbe 0x14001fb14
cmp dword [rdi + 0x24], ebx
jne 0x14001fa1c
cmp qword [0x140076ca8], rbx
je 0x14001fb09
lea r8, str.__this__hasMore_
mov edx, 0x80070490
xor r9d, r9d
mov cl, 1
call fcn.14000153c
jmp 0x14001fb09
sub esi, r14d
add esi, ecx
test rcx, rcx
jne 0x14001fa6f
lea rdx, [0x140037388]
mov ecx, 0x10000
call fcn.140033d7c
mov rcx, qword [rdi + 0x10]
mov r14, rax
cmp rcx, rax
je 0x14001fa4f
call fcn.140033d70
mov rcx, r14
mov qword [rdi + 0x10], r14
test rcx, rcx
jne 0x14001fa82
cmp qword [0x140076ca8], rbx
je 0x14001fb09
lea r8, str._this__buffer___NULL
mov edx, 0x8007000e
jmp 0x14001fa0d
test esi, esi
je 0x14001fa82
mov r8d, esi
mov rdx, r14
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov rcx, qword [rdi + 0x10]
mov r8d, 0x10000
mov edx, esi
add rdx, rcx
mov dword [rbp + 0x48], ebx
mov rcx, qword [rdi]
lea r9, [rbp + 0x48]
sub r8d, esi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14001faf1
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp qword [0x140076ca8], rbx
je 0x14001fae3
movzx edx, ax
lea r8, str.__ReadFile__this__fileHandle__this__buffer__unusedBytes__ReadBlockSize___unusedBytes__bytesRead__0__
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]
jmp 0x14001fb09
mov ecx, dword [rbp + 0x48]
lea eax, [rcx + rsi]
mov dword [rdi + 0x20], eax
mov rax, qword [rdi + 0x10]
mov qword [rdi + 0x18], rax
test ecx, ecx
jne 0x14001fb09
mov dword [rdi + 0x24], ebx
cmp dword [rdi + 0x24], ebx
jne 0x14001fb14
mov r12b, 1
mov r13b, r12b
test r12b, r12b
jne 0x14001fb56
jmp 0x14001f8d1
mov rcx, qword [rbp + 0x40]
lea r8, str.onecoreprintscan_appxpackaginglibcore_src_textfilereader.cpp
mov esi, 0x8007000d
mov edx, 0xe9
mov r9d, esi
call fcn.140002204
jmp 0x14001fbb4
cmp qword [0x140076ca8], rbx
je 0x14001fbb4
lea r8, str._AppendBuffer_this__bufferOffset__bytesToCopy__rawLinePtr__rawLength__
mov edx, esi
jmp 0x14001fbaa
test r12b, r12b
je 0x14001fb7a
test r13b, r13b
jne 0x14001fb7a
cmp dword [rdi + 0x24], ebx
je 0x14001fb7a
mov rdx, qword [rdi + 0x18]
mov r8b, 0xa
mov rcx, rdi
call fcn.14001fce0
test al, al
je 0x14001fb7a
mov eax, r15d
add qword [rdi + 0x18], rax
lea r9, [rbp + 0x60]
mov word [rbp + 0x48], bx
lea r8, [rbp - 0x18]
mov edx, r15d
lea rcx, [rbp + 0x48]
call fcn.14001fbf4
mov esi, eax
test eax, eax
jns 0x14001fbba
cmp qword [0x140076ca8], rbx
je 0x14001fbb4
lea r8, str._AppendBuffer_nullterminator__charLength__rawLine.AddressOf____rawLength__
mov edx, eax
xor r9d, r9d
mov cl, 1
call fcn.14000153c
mov rbx, qword [rbp - 0x18]
jmp 0x14001fbd0
mov rcx, qword [rbp + 0x50]
mov esi, ebx
mov rax, qword [rbp - 0x18]
mov qword [rcx], rax
mov rcx, qword [rbp + 0x58]
mov eax, dword [rbp + 0x60]
mov dword [rcx], eax
mov rcx, rbx
call fcn.140033d70
mov eax, esi
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret