Function at 0x1800d5290
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x2068
call fcn.1800e69d0
sub rsp, rax
mov rsi, r9
mov rbp, r8
mov rbx, rdx
mov r15, rcx
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
je 0x1800d52da
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1800d530e
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
jmp 0x1800d52e4
movabs rax, 0x600000000
mov qword [r15 + 8], rax
mov qword [r15 + 0x10], 0
mov qword [r15], 1
mov rax, r15
add rsp, 0x2068
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x68], 0
lea rdx, [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x1800d5348
test rsi, rsi
je 0x1800d538f
cmp rsi, 4
jae 0x1800d539b
lea rax, str.Windows_stdin_in_console_mode_does_not_support_a_buffer_too_small_to_guarantee_holding_one_arbitrary_UTF_8_character__4_bytes_
mov qword [r15 + 0x10], rax
mov qword [r15 + 8], 0x1402
jmp 0x1800d52f0
mov dword [rsp + 0x68], 0
mov eax, 0xffffffff
cmp rsi, rax
mov r8d, 0xffffffff
cmovb r8d, esi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x68]
mov rcx, rdi
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800d55ff
mov edi, dword [rsp + 0x68]
xor eax, eax
jmp 0x1800d5621
xorps xmm0, xmm0
movups xmmword [r15], xmm0
jmp 0x1800d52f7
xor r14d, r14d
lea rcx, [rsp + 0x68]
mov r8d, 0x2000
xor edx, edx
call sub.VCRUNTIME140.dll_memset
movabs rcx, 0xaaaaaaaaaaaaaaab
mov rax, rsi
mul rcx
shr rdx, 1
cmp rdx, 0x1000
mov r12d, 0x1000
cmovb r12, rdx
movzx eax, word [rbx]
test ax, ax
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x48], rbx
je 0x1800d5408
mov word [rsp + 0x68], ax
mov word [rbx], 0
cmp r12, 1
mov eax, 2
cmove r12, rax
mov r14d, 1
lea rbp, [rsp + r14*2]
add rbp, 0x68
mov qword [rsp + 0x30], r14
sub r12, r14
movaps xmm0, xmmword [0x180157600]
movaps xmmword [rsp + 0x50], xmm0
mov dword [rsp + 0x2c], 0
lea rbx, [rsp + 0x50]
lea r14, [rsp + 0x2c]
mov r13, qword [sym.imp.KERNEL32.dll_ReadConsoleW]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word cs:[rax + rax]
nop
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x20], rbx
mov rcx, rdi
mov rdx, rbp
mov r8d, r12d
mov r9, r14
call r13
test eax, eax
je 0x1800d52ce
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x1800d5491
call rsi
cmp eax, 0x3e3
je 0x1800d5450
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x1800d5665
mov edx, eax
lea rcx, [rdx - 1]
cmp rcx, r12
jae 0x1800d566c
xor ecx, ecx
cmp word [rbp + rdx*2 - 2], 0x1a
sete cl
sub eax, ecx
mov r13, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
lea rsi, [rsp + 0x68]
mov rcx, qword [rsp + 0x30]
add rax, rcx
je 0x1800d5635
lea rcx, [rax - 1]
cmp rcx, 0xfff
ja 0x1800d567d
movzx ebx, word [rsp + rax*2 + 0x66]
mov edx, ebx
and edx, 0xfc00
cmp edx, 0xd800
jne 0x1800d5504
mov rax, qword [rsp + 0x48]
mov word [rax], bx
mov rax, rcx
test rcx, rcx
je 0x1800d5635
lea r12, [rsp + rax*2]
add r12, 0x68
xor edi, edi
movabs r14, 0x1000000000000
jmp 0x1800d5526
add rdi, rax
cmp rsi, r12
je 0x1800d5637
lea rcx, [rsi + 2]
movzx eax, word [rsi]
movzx ebx, ax
mov edx, eax
and edx, 0xf800
cmp edx, 0xd800
jne 0x1800d5591
cmp ebx, 0xdbff
ja 0x1800d5645
cmp rcx, r12
je 0x1800d5645
movzx ecx, word [rcx]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x1800d5645
add rsi, 4
add eax, 0x2800
movzx eax, ax
add ecx, 0x2400
movzx ebx, cx
shl rax, 0x2a
shl rbx, 0x20
or rbx, rax
add rbx, r14
jmp 0x1800d5598
shl rbx, 0x20
mov rsi, rcx
cmp bx, 2
je 0x1800d5637
test bx, bx
jne 0x1800d5645
cmp rdi, rbp
ja 0x1800d5690
shr rbx, 0x20
lea rdx, [rdi + r13]
mov r8, rbp
sub r8, rdi
mov ecx, ebx
call fcn.1800c39f0
mov eax, 1
cmp ebx, 0x80
jb 0x1800d551a
mov eax, 2
cmp ebx, 0x800
jb 0x1800d551a
cmp ebx, 0x10000
mov eax, 4
sbb rax, 0
jmp 0x1800d551a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, eax
call fcn.1800d42c0
cmp al, 0xb
jne 0x1800d5618
xor edi, edi
xor eax, eax
jmp 0x1800d5621
shl rdi, 0x20
mov eax, 1
mov qword [r15], rax
mov qword [r15 + 8], rdi
mov qword [r15 + 0x10], 0
jmp 0x1800d52f7
xor edi, edi
mov qword [r15 + 8], rdi
xor eax, eax
mov qword [r15], rax
jmp 0x1800d52f7
lea rax, str.Windows_stdin_in_console_mode_does_not_support_non_UTF_16_input__encountered_unpaired_surrogate
mov qword [r15 + 0x10], rax
mov qword [r15 + 8], 0x1502
mov eax, 1
mov qword [r15], rax
jmp 0x1800d52f7
xor eax, eax
jmp 0x1800d54ad
lea r8, [0x18015a050]
mov rdx, r12
call fcn.1800eb730
ud2
lea r8, [0x18015a038]
mov edx, 0x1000
call fcn.1800eb730
ud2
lea r8, [0x18015a0d8]
mov rcx, rdi
mov rdx, rbp
call fcn.1800eb890
ud2