Function at 0x1400b6f80
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 - 0x90]
sub rsp, 0x190
mov rax, qword [0x14032f0c0]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rsi, rdx
mov rdi, rcx
mov rax, qword [rcx + 0x10]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400b71f4
mov rbx, qword [rcx + 0x18]
mov qword [rsp + 0x38], rbx
mov rcx, rbx
call fcn.1401f32b0
test eax, eax
jne 0x1400b7231
cmp dword [rbx + 0x4c], 0x7fffffff
je 0x1400b721f
xor r15d, r15d
mov qword [rsi + 0x28], r15
mov qword [rsi + 0x30], r15
mov qword [rsp + 0x70], r15
lea r12, vtable.fmt::v9::basic_memory_buffer_char__250__class_std::allocator_char__.0
mov qword [rsp + 0x60], r12
lea rax, [rbp - 0x80]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x78], 0xfa
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
lea r8, [rsp + 0x60]
mov rdx, rsi
call qword [rax + reloc.WS2_32.dll_htonl]
cmp byte [rdi + 0x20], r15b
je 0x1400b710f
mov r8, qword [rsi + 0x28]
cmp qword [rsi + 0x30], r8
jbe 0x1400b710f
test r8, r8
je 0x1400b7063
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
lea rcx, [rdi + 0x30]
movsxd rdx, dword [rsi + 0x10]
call fcn.1400b7c70
movzx r14d, word [rax]
lea rdx, [rsp + 0x40]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x1400b708d
lea r14d, [rax + 7]
jmp 0x1400b70aa
mov edx, dword [rsp + 0x48]
and edx, 0xfff0
or edx, r14d
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
movzx r14d, word [rsp + 0x48]
mov r8, qword [rsi + 0x30]
mov rcx, qword [rsi + 0x28]
cmp r8, rcx
jbe 0x1400b70d4
sub r8d, ecx
mov rdx, qword [rsp + 0x68]
add rdx, rcx
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
movzx edx, r14w
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [rsi + 0x30]
mov r8, qword [rsp + 0x70]
cmp r8, rcx
jbe 0x1400b7133
sub r8d, ecx
mov rdx, qword [rsp + 0x68]
add rdx, rcx
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
jmp 0x1400b7133
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x30]
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov qword [rsp + 0x60], r12
mov rsi, qword [rsp + 0x68]
lea rax, [rbp - 0x80]
cmp rsi, rax
je 0x1400b71ec
mov rdi, qword [rsp + 0x78]
test rsi, rsi
jne 0x1400b71b4
test rdi, rdi
je 0x1400b71b4
lea rax, str.null_pointer_cannot_point_to_a_block_of_non_zero_size
mov qword [rsp + 0x28], rax
lea rax, [0x1402e4364]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x3cf
lea rdx, [0x1402e4370]
lea ecx, [rsi + 2]
call fcn.1402033a0
cmp eax, 1
jne 0x1400b718f
int3
mov qword [rsp + 0x20], r15
mov r9d, 0x3cf
lea r8, str.C:Program_FilesMicrosoft_Visual_Studio2022CommunityVCToolsMSVC14.39.33519includexmemory
lea rdx, [0x1402e44a4]
lea rcx, str._null_pointer_cannot_point_to_a_block_of_non_zero_size_
call fcn.140203dc0
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], rsi
cmp rdi, 0x1000
jb 0x1400b71e0
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.140002250
mov rdi, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdx, rdi
mov rcx, rsi
call fcn.1401f5a50
nop
mov rcx, rbx
call fcn.1401f32d0
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.1401f4d70
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov dword [rbx + 0x4c], 0x7ffffffe
mov ecx, 6
call fcn.1401f1ee0
int3
mov ecx, 5
call fcn.1401f1ee0
int3