Function at 0x14000bbf0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x30], 0xfffffffffffffffe
movzx esi, dx
mov rbx, rcx
mov edi, 0xffff
xor r12d, r12d
cmp di, dx
jne 0x14000bc26
movzx eax, r12w
jmp 0x14000be53
mov rdx, qword [rcx + 0x48]
cmp qword [rdx], r12
je 0x14000bc5e
mov rdx, qword [rdx]
mov r8, qword [rcx + 0x60]
movsxd rax, dword [r8]
lea rcx, [rdx + rax*2]
cmp rdx, rcx
jae 0x14000bc5e
dec dword [r8]
mov rcx, qword [rbx + 0x48]
mov rdx, qword [rcx]
lea rax, [rdx + 2]
mov qword [rcx], rax
mov word [rdx], si
movzx eax, si
jmp 0x14000be53
cmp qword [rbx + 0x98], r12
je 0x14000be50
mov rdx, qword [rbx + 0x20]
lea rax, [rbx + 0x88]
cmp qword [rdx], rax
jne 0x14000bc99
mov rcx, qword [rbx + 0x78]
mov rax, qword [rbx + 0x70]
mov qword [rdx], rax
mov rax, qword [rbx + 0x40]
mov qword [rax], rcx
sub rcx, rcx
sar rcx, 1
mov rax, qword [rbx + 0x58]
mov dword [rax], ecx
cmp qword [rbx + 0x80], r12
jne 0x14000bcc2
mov rdx, qword [rbx + 0x98]
movzx ecx, si
call fcn.140023938
cmp ax, di
je 0x14000be50
movzx edi, si
jmp 0x14000be50
mov word [rbp + 0x48], si
mov edx, reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x10], rdx
mov qword [rbp - 0x18], r12
mov byte [rbp - 0x28], r12b
lea eax, [rdx - 7]
cmp al, 0xfe
jbe 0x14000bceb
lea rcx, str.string_too_long
call fcn.14003a510
int3
xor ecx, ecx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x18], rax
lea rax, [rbp - 0x28]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], r12b
mov r9, qword [rbp - 0x28]
mov r10, qword [rbp - 0x10]
lea rdx, [rbp - 0x28]
cmp r10, 0x10
cmovae rdx, r9
lea r8, [rbp - 0x28]
cmovae r8, r9
mov rcx, qword [rbx + 0x80]
mov r10, qword [rcx]
add rdx, qword [rbp - 0x18]
lea rax, [rbp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], r8
lea rax, [rbp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x4a]
lea r8, [rbp + 0x48]
lea rdx, [rbx + 0x8c]
call qword [r10 + 0x28]
test eax, eax
js 0x14000be40
cmp eax, 1
jg 0x14000be13
lea rax, [rbp - 0x28]
mov r9, qword [rbp - 0x28]
mov r10, qword [rbp - 0x10]
cmp r10, 0x10
cmovae rax, r9
mov r13, qword [rbp + 0x50]
sub r13, rax
je 0x14000bdb9
lea rcx, [rbp - 0x28]
cmp r10, 0x10
cmovae rcx, r9
mov r9, qword [rbx + 0x98]
mov r8, r13
mov edx, 1
call fcn.140021c04
cmp r13, rax
jne 0x14000bdef
mov r10, qword [rbp - 0x10]
mov r9, qword [rbp - 0x28]
mov byte [rbx + 0x8a], 1
lea rax, [rbp + 0x48]
cmp qword [rbp + 0x58], rax
jne 0x14000bdfc
test r13, r13
jne 0x14000bd0d
cmp qword [rbp - 0x18], 0x20
jae 0x14000bdf1
xor r8d, r8d
lea edx, [r13 + 8]
lea rcx, [rbp - 0x28]
call fcn.1400038a4
jmp 0x14000bd05
jmp 0x14000be40
cmp r10, 0x10
jb 0x14000be50
mov rcx, r9
jmp 0x14000be4b
cmp r10, 0x10
jb 0x14000bc56
mov rcx, r9
call fcn.140021190
jmp 0x14000bc56
cmp eax, 3
jne 0x14000be40
mov rdx, qword [rbx + 0x98]
movzx ecx, word [rbp + 0x48]
call fcn.140023938
cmp ax, di
jne 0x14000be2f
mov esi, edi
cmp qword [rbp - 0x10], 0x10
jb 0x14000bc56
mov rcx, qword [rbp - 0x28]
jmp 0x14000be09
cmp qword [rbp - 0x10], 0x10
jb 0x14000be50
mov rcx, qword [rbp - 0x28]
call fcn.140021190
movzx eax, di
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret