Function at 0x14002aa40
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov qword [rbp - 0x11], 0xfffffffffffffffe
mov qword [rsp + 0xe0], rbx
mov rax, qword [0x140232230]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x14002aa88
xor eax, eax
jmp 0x14002ad3b
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x14002aac4
mov r8, qword [rcx + 0x58]
movsxd r9, dword [r8]
lea rcx, [rdx + r9]
cmp rdx, rcx
jae 0x14002aac4
lea ecx, [r9 - 1]
mov dword [r8], ecx
mov rdx, qword [rdi + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], r14b
mov eax, r14d
jmp 0x14002ad3b
cmp qword [rdi + 0x90], 0
jne 0x14002aad7
or rax, 0xffffffffffffffff
jmp 0x14002ad3b
mov rdx, qword [rdi + 0x18]
lea rax, [rdi + 0x80]
cmp qword [rdx], rax
jne 0x14002ab01
mov rcx, qword [rdi + 0x70]
mov rax, qword [rdi + 0x68]
mov qword [rdx], rax
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
sub ecx, ecx
mov rax, qword [rdi + 0x50]
mov dword [rax], ecx
cmp qword [rdi + 0x78], 0
jne 0x14002ab27
movsx ecx, r14b
mov rdx, qword [rdi + 0x90]
call fcn.140167f80
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r14d
jmp 0x14002ad39
mov byte [rbp - 0x29], r14b
xor r12d, r12d
mov qword [rbp + 7], r12
mov qword [rbp + 0xf], r12
mov r13d, reloc.WS2_32.dll_ntohs
mov qword [rbp + 0xf], r13
mov qword [rbp + 7], r12
mov byte [rbp - 9], r12b
xor ecx, ecx
mov qword [rbp - 9], rcx
mov qword [rbp + 7], 8
lea rax, [rbp - 9]
cmp r13, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
or rsi, 0xffffffffffffffff
mov r9, qword [rbp + 0xf]
mov r8, qword [rbp + 7]
mov r10, qword [rbp - 9]
nop word [rax + rax]
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
lea rdx, [rbp - 9]
cmovae rdx, r10
mov rcx, qword [rdi + 0x78]
mov r10, qword [rcx]
add rax, r8
lea r8, [rbp - 0x19]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdx
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x28]
lea r8, [rbp - 0x29]
lea rdx, [rdi + 0x84]
call qword [r10 + gethostname]
test eax, eax
js 0x14002ad1d
cmp eax, 1
jg 0x14002ad01
lea rax, [rbp - 9]
mov r10, qword [rbp - 9]
mov r9, qword [rbp + 0xf]
cmp r9, 0x10
cmovae rax, r10
mov rbx, qword [rbp - 0x19]
sub rbx, rax
je 0x14002ac2c
lea rcx, [rbp - 9]
cmp r9, 0x10
cmovae rcx, r10
mov r9, qword [rdi + 0x90]
mov r8, rbx
mov edx, 1
call fcn.140168220
cmp rbx, rax
jne 0x14002ad1d
mov r9, qword [rbp + 0xf]
mov r10, qword [rbp - 9]
mov byte [rdi + 0x81], 1
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x21], rax
jne 0x14002acfc
mov r8, qword [rbp + 7]
test rbx, rbx
jne 0x14002ab80
cmp r8, 0x20
jae 0x14002ad1d
mov rax, rsi
sub rax, r8
cmp rax, 8
jbe 0x14002acef
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x14002ace2
cmp r9, rbx
jae 0x14002ac91
mov rdx, rbx
lea rcx, [rbp - 9]
call fcn.140001dc0
mov r9, qword [rbp + 0xf]
mov r8, qword [rbp + 7]
mov r10, qword [rbp - 9]
jmp 0x14002acad
test rbx, rbx
jne 0x14002acb6
mov qword [rbp + 7], r12
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
mov byte [rax], bl
jmp 0x14002ab69
test rbx, rbx
je 0x14002ab80
lea rax, [rbp - 9]
cmp r9, 0x10
cmovae rax, r10
xor ecx, ecx
mov qword [r8 + rax], rcx
mov qword [rbp + 7], rbx
lea rax, [rbp - 9]
cmp qword [rbp + 0xf], 0x10
cmovae rax, qword [rbp - 9]
mov byte [rbx + rax], cl
jmp 0x14002ab69
lea rcx, str.string_too_long
call fcn.140144f6c
int3
lea rcx, str.string_too_long
call fcn.140144f6c
int3
mov esi, r14d
jmp 0x14002ad1d
cmp eax, 3
jne 0x14002ad1d
movsx ecx, byte [rbp - 0x29]
mov rdx, qword [rdi + 0x90]
call fcn.140167f80
cmp eax, 0xffffffff
cmovne esi, r14d
cmp qword [rbp + 0xf], 0x10
jb 0x14002ad2d
mov rcx, qword [rbp - 9]
call fcn.1401669a0
mov qword [rbp + 0xf], r13
mov qword [rbp + 7], r12
mov byte [rbp - 9], 0
mov eax, esi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140166980
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret