Function at 0x14001da20
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xa0
mov r15, rcx
test r9, r9
je 0x14001da5e
mov rsi, r9
mov rbx, r8
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
je 0x14001da67
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14001da93
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
jmp 0x14001da71
xorps xmm0, xmm0
movups xmmword [r15], xmm0
jmp 0x14001da84
movabs rax, 0x600000000
mov qword [r15 + 8], rax
mov qword [r15 + 0x10], 0
mov qword [r15], 1
add rsp, 0xa0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov dword [rsp + 0x48], 0
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x14001db15
mov r14, qword [rsp + 0xf0]
movzx eax, byte [r14 + 4]
test rax, rax
je 0x14001db5e
cmp al, 4
jae 0x14001dcf5
mov cl, byte [rbx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x14001dbc1
mov byte [r14 + rax], cl
mov al, byte [r14 + 4]
add al, 1
mov byte [r14 + 4], al
movzx ecx, byte [r14]
mov rdx, qword [0x14003a090]
movzx esi, byte [rdx + rcx]
mov qword [rsp + 0x90], rsi
cmp sil, al
jbe 0x14001dc1f
movaps xmm0, xmmword [0x14002e900]
jmp 0x14001da61
mov dword [rsp + 0x48], 0
mov eax, 0xffffffff
cmp rsi, rax
mov r8d, 0xffffffff
cmovb r8d, esi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov rcx, rdi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14001dbde
mov eax, dword [rsp + 0x48]
xor ecx, ecx
xor edx, edx
jmp 0x14001dbef
cmp rsi, 0x1000
mov r8d, 0x1000
cmovb r8, rsi
lea rcx, [rsp + 0x78]
mov rdx, rbx
call fcn.140029820
cmp dword [rsp + 0x78], 1
jne 0x14001dbff
mov r8, qword [rsp + 0x80]
test r8, r8
je 0x14001dc85
cmp r8, rsi
ja 0x14001dd20
lea rcx, [rsp + 0x48]
mov rdx, rbx
call fcn.140029820
cmp dword [rsp + 0x48], 1
je 0x14001dd37
mov r8, qword [rsp + 0x50]
mov r9, qword [rsp + 0x58]
jmp 0x14001dc0f
mov byte [r14 + 4], 0
lea rax, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
mov qword [r15 + 0x10], rax
mov qword [r15 + 8], 0x1502
jmp 0x14001da7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
xor ecx, ecx
mov edx, 1
mov qword [r15], rdx
mov qword [r15 + 8], rax
mov qword [r15 + 0x10], rcx
jmp 0x14001da84
mov r8, qword [rsp + 0x80]
mov r9, qword [rsp + 0x88]
mov rcx, r15
mov rdx, rdi
call fcn.14001ddb0
jmp 0x14001da84
movzx r8d, al
cmp al, 5
jae 0x14001dd0f
lea rcx, [rsp + 0x78]
mov rdx, r14
call fcn.140029820
mov byte [r14 + 4], 0
cmp dword [rsp + 0x78], 1
je 0x14001dbc6
mov r8, qword [rsp + 0x80]
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x30], rax
cmp rax, rsi
jne 0x14001dd6c
lea rcx, [rsp + 0x48]
mov rdx, rdi
mov r9, rsi
call fcn.14001ddb0
cmp dword [rsp + 0x48], 1
jne 0x14001dca8
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [r15 + 8], xmm0
jmp 0x14001dce8
movzx eax, byte [rbx]
mov rcx, qword [0x14003a090]
movzx ecx, byte [rcx + rax]
cmp rcx, 2
jb 0x14001dcd5
cmp rcx, rsi
jbe 0x14001dcd5
mov byte [r14], al
mov byte [r14 + 4], 1
jmp 0x14001dcc3
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x30], rsi
cmp rax, rsi
jne 0x14001dd86
mov qword [r15 + 8], 1
xor eax, eax
mov qword [r15], rax
jmp 0x14001da84
lea rax, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
mov qword [r15 + 0x10], rax
mov qword [r15 + 8], 0x1502
mov eax, 1
mov qword [r15], rax
jmp 0x14001da84
lea rcx, [0x140031391]
lea r8, [0x1400313f0]
mov edx, 0x3a
call fcn.14002cbf0
ud2
lea rax, [0x140031468]
mov edx, 4
mov rcx, r8
jmp 0x14001dd2d
lea rax, [0x1400314b0]
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.14002cf20
ud2
movups xmm0, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x30], xmm0
lea rax, [0x1400314c8]
mov qword [rsp + 0x20], rax
lea rcx, [0x14002ed28]
lea r9, [0x14002ed78]
lea r8, [rsp + 0x30]
mov edx, 0x2b
call fcn.14002ce00
ud2
mov qword [rsp + 0x48], 0
lea r9, [0x140031480]
lea rcx, [rsp + 0x90]
jmp 0x14001dd9e
mov qword [rsp + 0x48], 0
lea r9, [0x140031498]
lea rcx, [rsp + 0x98]
lea rdx, [rsp + 0x30]
lea r8, [rsp + 0x48]
call fcn.14002c320
ud2