Function at 0x140051880
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rsi, r8
mov r14, rdx
mov rbp, rcx
test r8, r8
jg 0x1400518a2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x1400518b1
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov qword [rsp + 0x28], rbx
mov rbx, rsi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.MSVCP140.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const___ptr64]
test rax, rax
je 0x140051902
cmp rax, rsi
mov rdi, rsi
mov rcx, rbp
cmovb rdi, rax
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const___ptr64]
mov r8, rdi
mov rcx, r14
mov rdx, rax
call sub.VCRUNTIME140.dll_memcpy
mov edx, edi
mov rcx, rbp
add r14, rdi
sub rbx, rdi
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int____ptr64]
cmp qword [rbp + 0x80], 0
mov rdi, rbx
je 0x140051971
mov rcx, rbp
call fcn.14003da30
cmp rbx, 0xfff
jbe 0x140051951
mov r9, qword [rbp + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
add r14, rax
mov rdi, rbx
cmp rax, 0xfff
jne 0x14005198a
cmp rbx, rax
ja 0x140051920
test rdi, rdi
je 0x140051971
mov r9, qword [rbp + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rdi, rax
sub rsi, rdi
mov rbx, qword [rsp + 0x28]
mov rax, rsi
mov rdi, qword [rsp + 0x20]
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
sub rsi, rbx
jmp 0x140051974
add eax, dword [rax]
add byte [rax - 0x75], cl
mov word [rax + rdx*2], fs
add eax, dword [rax]
add al, ch
scasb al, byte [rdi]
lodsb al, byte [rsi]
add byte [rax], al
cmp rax, 0x10
jb 0x14010b778
call 0x140117200
movzx eax, al
test eax, eax
je 0x14010b778
mov rdx, qword [rsp + 0x358]
mov rcx, qword [rsp + 0x350]
call 0x140115e90
and rax, 0xfffffffffffffff0
and eax, 0xfffffff0
mov qword [rsp + 0x38], rax
mov qword [rsp + 0xf0], 0x1000
cmp qword [rsp + 0x38], 0x1000
jbe 0x14010b23a
mov qword [rsp + 0x38], 0x1000
mov rax, qword [rsp + 0x350]
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x48]
call 0x140115e60
mov rax, qword [rsp + 0x350]
movdqu xmm0, xmmword [rax]
movdqa xmmword [rsp + 0x100], xmm0
movdqa xmm0, xmmword [rsp + 0x100]
movdqa xmmword [rsp + 0x110], xmm0
movzx edx, byte [rsp + 0x360]
lea rcx, [rsp + 0x110]
call 0x140116fc0
movdqa xmmword [rsp + 0x50], xmm0
movdqa xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x60], xmm0
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x120], xmm0
movdqa xmm0, xmmword [rsp + 0x120]
movdqa xmmword [rsp + 0x80], xmm0
movdqa xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x320], xmm0
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x130], xmm0
movdqa xmm0, xmmword [rsp + 0x130]
movdqa xmmword [rsp + 0x330], xmm0
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x140], xmm0
movdqa xmm0, xmmword [rsp + 0x140]
movdqa xmmword [rsp + 0x90], xmm0