Function at 0x1800095f0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xd8
movaps xmmword [rsp + 0xc0], xmm6
test r8, r8
je 0x180009b9d
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
mov r12, qword [sym.imp.kernel32.dll_GetStdHandle]
lea r14, [0x180009c2c]
lea r15, [rsp + 0x88]
xorps xmm6, xmm6
jmp 0x18000967c
mov rcx, qword [0x180024ac0]
xor edx, edx
mov r8, rbp
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, qword [0x180024ac0]
xor edx, edx
mov r8, r13
call qword [sym.imp.kernel32.dll_HeapFree]
mov r12, r15
mov r15, rbx
mov rbx, rdi
mov rdi, r14
mov r14, rsi
mov rsi, qword [rsp + 0xb8]
test rsi, rsi
je 0x180009b9d
mov ecx, 0xfffffff4
call r12
test rax, rax
je 0x1800096c0
mov r13, rax
cmp rax, 0xffffffffffffffff
jne case.default.0x1800096b9
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], 1
mov ecx, eax
and ecx, 3
movsxd rdx, dword [r14 + rcx*4]
add rdx, r14
jmp rdx
movabs rax, 0x600000002
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], 1
mov ecx, eax
and ecx, 3
movsxd rdx, dword [r14 + rcx*4]
add rdx, r14
jmp rdx
mov dword [rsp + 0x88], 0
mov rcx, r13
mov rdx, r15
call qword [sym.imp.kernel32.dll_GetConsoleMode]
test eax, eax
je 0x180009793
movzx eax, byte [rbx + 4]
test rax, rax
je 0x180009821
cmp al, 3
ja 0x180009bc4
movzx ecx, byte [rdi]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x180009891
mov byte [rbx + rax], cl
movzx eax, byte [rbx + 4]
inc al
mov byte [rbx + 4], al
movzx ecx, byte [rbx]
lea rdx, [0x180019850]
movzx ebp, byte [rcx + rdx]
mov ecx, 1
cmp al, bpl
jb 0x1800099e1
cmp al, 5
jae 0x180009bc4
movzx r8d, al
mov rcx, r15
mov rdx, rbx
call fcn.180008150
mov byte [rbx + 4], 0
cmp qword [rsp + 0x88], 0
je 0x180009a27
lea rax, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
jmp 0x1800098c8
movups xmm0, xmmword [0x1800197e0]
movaps xmmword [rsp + 0x70], xmm0
mov eax, 0xffffffff
cmp rsi, rax
cmovb rax, rsi
movups xmmword [rsp + 0x38], xmm6
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rdi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov rcx, r13
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x1800097f8
mov rcx, r13
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x70]
cmp eax, 0x103
je 0x180009bc8
test eax, eax
js 0x1800098b8
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x58], rax
xor eax, eax
mov qword [rsp + 0x50], rax
xor eax, eax
test rax, rax
jne 0x1800098e0
jmp 0x1800099d3
cmp rsi, 0x1000
mov r8d, 0x1000
cmovb r8, rsi
lea rcx, [rsp + 0x70]
mov rdx, rdi
call fcn.180008150
cmp qword [rsp + 0x70], 0
je 0x1800099ab
mov r8, qword [rsp + 0x78]
test r8, r8
je 0x1800099f2
cmp r8, rsi
ja 0x180009bc4
mov rcx, r15
mov rdx, rdi
call fcn.180008150
cmp qword [rsp + 0x88], 0
jne 0x180009bc4
mov r8, qword [rsp + 0x90]
mov r9, qword [rsp + 0x98]
jmp 0x1800099b8
mov byte [rbx + 4], 0
lea rax, str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], 1
mov ecx, eax
and ecx, 3
movsxd rdx, dword [r14 + rcx*4]
add rdx, r14
jmp rdx
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x58], rax
mov eax, 1
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1800099d3
mov rax, qword [rsp + 0x58]
mov ecx, eax
and ecx, 3
movsxd rdx, dword [r14 + rcx*4]
add rdx, r14
jmp rdx
movzx edx, byte [rax + 0x10]
jmp case.0x1800099a1.0
movzx edx, byte [rax + 0xf]
cmp dl, 0x23
jne case.0x1800096e4.2
lea rdx, [rcx - 2]
cmp rdx, 2
jb 0x180009673
test rcx, rcx
je 0x180009673
mov qword [rsp + 0xb8], rsi
mov rsi, r14
mov r14, rdi
mov rdi, rbx
mov rbx, r15
mov r15, r12
lea r13, [rax - 1]
mov rbp, qword [rax - 1]
mov r12, qword [rax + 7]
mov rcx, rbp
call qword [r12]
cmp qword [r12 + 8], 0
je 0x18000964a
cmp qword [r12 + 0x10], 0x11
jb 0x180009638
mov rbp, qword [rbp - 8]
jmp 0x180009638
mov r8, rax
shr r8, 0x20
cmp r8d, 0x28
ja case.default.0x1800099a1
xor edx, edx
lea r9, [0x180009c3c]
lea ecx, [0x180009c3c]
lea ecx, [0x180009c3c]
movsxd r8, dword [r9 + r8*4]
add r8, r9
jmp r8
mov dl, 1
jmp case.0x1800099a1.0
mov r8, qword [rsp + 0x78]
mov r9, qword [rsp + 0x80]
lea rcx, [rsp + 0x50]
mov rdx, r13
call fcn.180009020
mov rax, qword [rsp + 0x50]
test rax, rax
jne 0x1800098e0
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x180009bbb
sub rsi, rcx
jb 0x180009bc4
add rdi, rcx
jmp 0x180009673
movzx eax, byte [rdi]
lea rcx, [0x180019850]
movzx ecx, byte [rax + rcx]
cmp rcx, 2
jb 0x180009787
cmp rsi, rcx
jae 0x180009787
mov byte [rbx], al
mov byte [rbx + 4], 1
mov qword [rsp + 0x58], 1
jmp 0x18000980a
cmp qword [rsp + 0x98], rbp
jne 0x180009bc4
mov r8, qword [rsp + 0x90]
lea rcx, [rsp + 0x70]
mov rdx, r13
mov r9, rbp
call fcn.180009020
cmp qword [rsp + 0x70], 0
mov rax, qword [rsp + 0x78]
jne 0x1800098c8
cmp rax, rbp
jne 0x180009bc4
mov qword [rsp + 0x58], 1
xor eax, eax
mov qword [rsp + 0x50], rax
and al, 0x50
and al, 0x50
test rax, rax
jne 0x1800098e0
invalid
invalid
invalid
invalid
invalid
jmp 0x1800099d3
invalid
mov dl, 0x23
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x24
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x25
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x1b
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x22
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x10
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0xe
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x21
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0xb
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 2
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 4
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 9
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0xc
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x18
jmp case.0x1800099a1.0
mov dl, 0x19
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x28
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x29
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 3
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 7
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0xf
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x11
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x1f
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 5
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 6
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 8
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0xa
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0xd
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x12
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x14
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x15
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x1e
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x20
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x16
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x13
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x17
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x1c
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x1d
jmp case.0x1800099a1.0
invalid
invalid
invalid
mov dl, 0x27
jmp case.0x1800099a1.0
mov dl, 0x26
jmp case.0x1800099a1.0
mov dl, 0x1a
jmp case.0x1800099a1.0
xor eax, eax
movaps xmm6, xmmword [rsp + 0xc0]
add rsp, 0xd8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rax, str.failed_to_write_whole_buffer
jmp case.0x1800096e4.2
ud2
mov byte [rsp + 0x6c], 0
mov dword [rsp + 0x68], 0
lea rax, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], 1
lea rax, [rsp + 0x60]
mov qword [rsp + 0x98], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0xa0], xmm0
lea rcx, [rsp + 0x68]
lea rdx, [rsp + 0x88]
call fcn.180008ec0
mov rcx, rax
call fcn.180008fa0
mov ecx, 7
int 0x29
ud2