Function at 0x140024050
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x180
mov rax, qword [0x14010e8c0]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rsi, rdx
mov rdi, rcx
mov rax, qword [rcx + 0x10]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14002424d
mov rbx, qword [rcx + 0x18]
mov qword [rsp + 0x30], rbx
mov rcx, rbx
call fcn.1400c9908
test eax, eax
jne 0x140024284
mov eax, dword [rbx + 0x4c]
cmp eax, 0x7fffffff
je 0x140024274
xor r14d, r14d
mov qword [rsi + 0x28], r14
mov qword [rsi + 0x30], r14
xor edx, edx
mov r8d, 0x120
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x60], r14
lea r15, vtable.fmt::v10::basic_memory_buffer_char__250__class_std::allocator_char__.0
mov qword [rsp + 0x50], r15
lea rax, [rsp + 0x70]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x68], 0xfa
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
lea r8, [rsp + 0x50]
mov rdx, rsi
call qword [rax + reloc.WS2_32.dll_htonl]
cmp byte [rdi + 0x20], r14b
je 0x1400241da
mov r8, qword [rsi + 0x28]
cmp qword [rsi + 0x30], r8
jbe 0x1400241da
test r8, r8
je 0x14002413a
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
movsxd rax, dword [rsi + 0x10]
movzx ebp, word [rdi + rax*2 + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x14002415b
lea ebp, [rax + 7]
jmp 0x140024176
mov edx, dword [rsp + 0x40]
and edx, 0xfff0
or edx, ebp
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
movzx ebp, word [rsp + 0x40]
mov r8, qword [rsi + 0x30]
mov rcx, qword [rsi + 0x28]
cmp r8, rcx
jbe 0x1400241a0
sub r8d, ecx
mov rdx, qword [rsp + 0x58]
add rdx, rcx
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
movzx edx, bp
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [rsi + 0x30]
mov r8, qword [rsp + 0x60]
cmp r8, rcx
jbe 0x1400241fe
sub r8d, ecx
mov rdx, qword [rsp + 0x58]
add rdx, rcx
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
jmp 0x1400241fe
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x30]
mov r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov qword [rsp + 0x50], r15
lea rax, [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
cmp rcx, rax
je 0x140024245
mov rdx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002423f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14002423f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c7dfc
nop
mov rcx, rbx
call fcn.1400c9910
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1400c7da0
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x180
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
dec eax
mov dword [rbx + 0x4c], eax
mov ecx, 6
call fcn.1400c93e8
int3
mov ecx, 5
call fcn.1400c93e8
int3