Function at 0x1400ae280
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x2050
call fcn.140116680
sub rsp, rax
mov rbx, r9
mov rsi, r8
mov r14, rcx
mov ecx, edx
call sub.KERNEL32.dll_GetStdHandle
test rax, rax
je 0x1400ae2c1
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400ae2f1
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
jmp 0x1400ae2cb
movabs rax, 0x600000000
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], 0
mov qword [r14], 1
add rsp, 0x2050
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x50], 0
lea rdx, [rsp + 0x50]
mov rcx, r12
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x1400ae36e
cmp rbx, 0x1000
mov r8d, 0x1000
cmovb r8, rbx
lea rcx, [rsp + 0x28]
mov rdx, rsi
call fcn.14000db80
cmp dword [rsp + 0x28], 1
jne 0x1400ae3b6
mov r8, qword [rsp + 0x30]
test r8, r8
je 0x1400ae69d
cmp r8, rbx
ja 0x1400ae722
lea rcx, [rsp + 0x50]
mov rdx, rsi
call fcn.14000db80
cmp dword [rsp + 0x50], 1
je 0x1400ae739
mov r15, qword [rsp + 0x58]
mov r13, qword [rsp + 0x60]
jmp 0x1400ae3c0
mov dword [rsp + 0x50], 0
mov eax, 0xffffffff
cmp rbx, rax
mov r8d, 0xffffffff
cmovb r8d, ebx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov rcx, r12
mov rdx, rsi
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x1400ae67d
mov eax, dword [rsp + 0x50]
xor ecx, ecx
xor edx, edx
jmp 0x1400ae68d
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
xor esi, esi
lea rcx, [rsp + 0x50]
mov edi, 0x2000
mov r8d, 0x2000
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov r8, r15
add r8, r13
xor ebx, ebx
test si, si
je 0x1400ae400
nop word cs:[rax + rax]
xor eax, eax
test rdi, rdi
jne 0x1400ae4e0
jmp 0x1400ae4fd
cmp r15, r8
je 0x1400ae504
lea rcx, [r15 + 1]
mov al, byte [r15]
movzx esi, al
test sil, sil
js 0x1400ae42b
mov r15, rcx
xor eax, eax
test rdi, rdi
jne 0x1400ae4e0
jmp 0x1400ae4fd
cmp rcx, r8
je 0x1400ae43e
movzx ecx, byte [r15 + 1]
add r15, 2
and ecx, 0x3f
jmp 0x1400ae443
xor ecx, ecx
mov r15, r8
mov edx, esi
and edx, 0x1f
cmp sil, 0xe0
jb 0x1400ae460
cmp r15, r8
je 0x1400ae465
movzx esi, byte [r15]
add r15, 1
and esi, 0x3f
jmp 0x1400ae46a
shl edx, 6
jmp 0x1400ae488
xor esi, esi
mov r15, r8
shl ecx, 6
or ecx, esi
cmp al, 0xf0
jb 0x1400ae485
cmp r15, r8
je 0x1400ae48e
movzx eax, byte [r15]
add r15, 1
and eax, 0x3f
jmp 0x1400ae490
shl edx, 0xc
or ecx, edx
mov esi, ecx
jmp 0x1400ae4a7
xor eax, eax
and edx, 7
shl edx, 0x12
shl ecx, 6
or ecx, edx
or ecx, eax
mov esi, ecx
cmp ecx, 0x110000
je 0x1400ae504
cmp esi, 0xffff
jbe 0x1400ae3f0
add esi, 0xffff0000
mov ecx, esi
shr ecx, 0xa
or ecx, 0xd800
and esi, 0x3ff
or esi, 0xdc00
mov eax, esi
mov esi, ecx
test rdi, rdi
je 0x1400ae4fd
nop dword [rax]
mov word [rsp + rbx*2 + 0x50], si
add rbx, 1
add rdi, 0xfffffffffffffffe
mov esi, eax
test si, si
jne 0x1400ae3f0
jmp 0x1400ae400
mov ebx, 0x1000
jmp 0x1400ae511
cmp rbx, 0x1001
jae 0x1400ae76e
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea rsi, [rsp + 0x50]
lea r9, [rsp + 0x28]
mov rcx, r12
mov rdx, rsi
mov r8d, ebx
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
je 0x1400ae2b6
mov r15d, dword [rsp + 0x28]
cmp rbx, r15
je 0x1400ae6fe
jbe 0x1400ae70e
movzx eax, word [rsp + r15*2 + 0x50]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x311
ja 0x1400ae5a4
lea rdx, [rsp + r15*2]
add rdx, 0x50
add r15, 1
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x28]
mov rcx, r12
mov r8d, 1
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
jne 0x1400ae5a4
call sub.KERNEL32.dll_GetLastError
cmp rbx, r15
jb 0x1400ae784
test r15, r15
je 0x1400ae6b5
lea rcx, [r15 + r15]
add rcx, 0xfffffffffffffffe
mov r8, rcx
shr r8, 1
add r8, 1
test rcx, rcx
je 0x1400ae6ba
mov rcx, r8
and rcx, 0xfffffffffffffffe
neg rcx
lea rsi, [rsp + 0x50]
xor r13d, r13d
jmp 0x1400ae601
add r13, rdx
add rsi, 4
add rcx, 2
je 0x1400ae6bd
movzx ebx, word [rsi]
mov edx, 1
mov edi, 1
cmp ebx, 0x80
jb 0x1400ae640
movzx eax, bx
mov edi, 2
cmp eax, 0x800
jb 0x1400ae640
add ebx, 0x2312
movzx eax, bx
xor ebx, ebx
cmp eax, 0x311
seta bl
lea rdi, [rbx + rbx]
add rdi, 1
add r13, rdi
movzx ebx, word [rsi + 2]
cmp ebx, 0x80
jb 0x1400ae5f0
movzx eax, bx
mov edx, 2
cmp eax, 0x800
jb 0x1400ae5f0
add ebx, 0x2312
movzx eax, bx
xor edx, edx
cmp eax, 0x311
seta dl
add rdx, rdx
add rdx, 1
jmp 0x1400ae5f0
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
xor ecx, ecx
mov edx, 1
mov qword [r14], rdx
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], rcx
jmp 0x1400ae2de
lea rax, [0x14014e748]
mov qword [r14 + 0x10], rax
mov qword [r14 + 8], 0xc02
jmp 0x1400ae2d7
xor r13d, r13d
jmp 0x1400ae6fe
xor r13d, r13d
test r8b, 1
je 0x1400ae6fe
movzx eax, word [rsi]
mov ecx, 1
cmp eax, 0x80
jb 0x1400ae6fb
movzx edx, ax
mov ecx, 2
cmp edx, 0x800
jb 0x1400ae6fb
add eax, 0x2312
movzx eax, ax
xor ecx, ecx
cmp eax, 0x311
seta cl
add rcx, rcx
add rcx, 1
add r13, rcx
mov qword [r14 + 8], r13
mov qword [r14], 0
jmp 0x1400ae2de
lea r8, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov rcx, r15
mov rdx, rbx
call fcn.140117750
ud2
lea rax, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov rcx, r8
mov rdx, rbx
mov r8, rax
call fcn.140117810
ud2
movups xmm0, xmmword [rsp + 0x58]
movaps xmmword [rsp + 0x40], xmm0
lea rax, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov qword [rsp + 0x20], rax
lea rcx, str.called__Result::unwrap____on_an__Err__value
lea r9, [0x14014e770]
lea r8, [rsp + 0x40]
mov edx, 0x2b
call fcn.140117e90
ud2
lea r8, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov edx, 0x1000
mov rcx, rbx
call fcn.140117810
ud2
lea r8, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov rcx, r15
mov rdx, rbx
call fcn.140117810
ud2