Function at 0x14000cadc
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 0x14000cb12
movzx eax, r12w
jmp 0x14000cd3f
mov rdx, qword [rcx + 0x48]
cmp qword [rdx], r12
je 0x14000cb4a
mov rdx, qword [rdx]
mov r8, qword [rcx + 0x60]
movsxd rax, dword [r8]
lea rcx, [rdx + rax*2]
cmp rdx, rcx
jae 0x14000cb4a
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 0x14000cd3f
cmp qword [rbx + 0x98], r12
je 0x14000cd3c
mov rdx, qword [rbx + 0x20]
lea rax, [rbx + 0x88]
cmp qword [rdx], rax
jne 0x14000cb85
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 0x14000cbae
mov rdx, qword [rbx + 0x98]
movzx ecx, si
call fcn.140024348
cmp ax, di
je 0x14000cd3c
movzx edi, si
jmp 0x14000cd3c
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 0x14000cbd7
lea rcx, str.string_too_long
call fcn.14003a258
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 0x14000cd2c
cmp eax, 1
jg 0x14000ccff
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 0x14000cca5
lea rcx, [rbp - 0x28]
cmp r10, 0x10
cmovae rcx, r9
mov r9, qword [rbx + 0x98]
mov r8, r13
mov edx, 1
call fcn.140021f20
cmp r13, rax
jne 0x14000ccdb
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 0x14000cce8
test r13, r13
jne 0x14000cbf9
cmp qword [rbp - 0x18], 0x20
jae 0x14000ccdd
xor r8d, r8d
lea edx, [r13 + 8]
lea rcx, [rbp - 0x28]
call fcn.1400042a4
jmp 0x14000cbf1
jmp 0x14000cd2c
cmp r10, 0x10
jb 0x14000cd3c
mov rcx, r9
jmp 0x14000cd37
cmp r10, 0x10
jb 0x14000cb42
mov rcx, r9
call fcn.140020df4
jmp 0x14000cb42
cmp eax, 3
jne 0x14000cd2c
mov rdx, qword [rbx + 0x98]
movzx ecx, word [rbp + 0x48]
call fcn.140024348
cmp ax, di
jne 0x14000cd1b
mov esi, edi
cmp qword [rbp - 0x10], 0x10
jb 0x14000cb42
mov rcx, qword [rbp - 0x28]
jmp 0x14000ccf5
cmp qword [rbp - 0x10], 0x10
jb 0x14000cd3c
mov rcx, qword [rbp - 0x28]
call fcn.140020df4
movzx eax, di
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret