Function at 0x140015ca0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xf0]
sub rsp, 0x1f0
mov rax, qword [0x1400a31a0]
xor rax, rsp
mov qword [rbp + 0xe0], rax
mov r14, rdx
mov rsi, rcx
mov rbx, qword [rcx + 0x28]
mov qword [rsp + 0x30], rbx
mov rcx, rbx
call fcn.14002c574
test eax, eax
jne 0x140015eea
xor edx, edx
mov r8d, 0x120
lea rcx, [rbp - 0x40]
call fcn.14004c400
xor r15d, r15d
mov qword [rbp - 0x30], r15
lea r12, vtable.fmt::v6::basic_memory_buffer_char__250__class_std::allocator_char__.0
mov qword [rbp - 0x40], r12
lea rax, [rbp - 0x20]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x28], 0xfa
mov rcx, qword [rsi + 0x38]
mov rax, qword [rcx]
lea r8, [rbp - 0x40]
mov rdx, r14
call qword [rax + htons]
cmp byte [rsi + 0x30], r15b
jne 0x140015da3
cmp qword [rsi + 0x20], r15
je 0x140015e75
mov r14d, dword [rbp - 0x30]
test r14d, r14d
je 0x140015e75
mov edi, r15d
nop word [rax + rax]
mov dword [rbp - 0x70], r15d
mov r8d, r14d
sub r8d, edi
mov edx, edi
add rdx, qword [rbp - 0x38]
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x70]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140015ef2
mov eax, dword [rbp - 0x70]
test eax, eax
je 0x140015ef2
add edi, eax
cmp edi, r14d
jae 0x140015e75
jmp 0x140015d60
cmp byte [rsi + 0x31], 0
je 0x140015e5a
mov rax, qword [r14 + 0x28]
cmp qword [r14 + 0x30], rax
jbe 0x140015e5a
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov r8d, eax
mov rdx, qword [rbp - 0x38]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
lea r8, [r14 + 0x10]
lea rcx, [rsi + 0x40]
lea rdx, [rsp + 0x38]
call fcn.140018780
mov rcx, qword [rax]
movzx edi, word [rcx + 0x14]
lea rdx, [rbp - 0x68]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movzx edx, word [rbp - 0x60]
mov eax, 0xfff0
and dx, ax
or dx, di
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov r8, qword [r14 + 0x30]
mov rcx, qword [r14 + 0x28]
sub r8d, ecx
mov rdx, qword [rbp - 0x38]
add rdx, rcx
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
movzx edx, word [rbp - 0x60]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [r14 + 0x30]
mov r8d, dword [rbp - 0x30]
sub r8d, ecx
mov rdx, qword [rbp - 0x38]
add rdx, rcx
jmp 0x140015e62
mov r8d, dword [rbp - 0x30]
mov rdx, qword [rbp - 0x38]
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
nop
mov qword [rbp - 0x40], r12
lea rax, [rbp - 0x20]
mov rcx, qword [rbp - 0x38]
cmp rcx, rax
je 0x140015eb1
mov rdx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140015eab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140015ee4
call fcn.14002dc64
nop
mov rcx, rbx
call fcn.14002c598
mov rcx, qword [rbp + 0xe0]
xor rcx, rsp
call fcn.14002dc40
lea r11, [rsp + 0x1f0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.140056774
nop
mov ecx, eax
call fcn.14002cca4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x38]
call fcn.140001470
nop
mov r8, rax
lea rdx, str.wincolor_sink:_write_to_file__failed._GetLastError__:
lea rcx, [rbp - 0x68]
call fcn.14000f740
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140002d50
lea rdx, [0x1400a0968]
lea rcx, [rsp + 0x58]
call fcn.14004bf1c
int3