Function at 0x1400167b0
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push r13
push r14
sub rsp, 0x68
mov rax, qword [rcx + 0x180]
mov r10, qword [rcx + 0x168]
mov rdi, rcx
mov qword [rsp + 0x40], rax
mov rax, qword [rcx + 0x38]
mov rsi, r9
lea rcx, [r9 + rax]
movabs rax, 0xfffffffe0
mov r14, r8
mov r13, rdx
mov qword [rsp + 0x38], r10
cmp rcx, rax
ja 0x140016acc
cmp rcx, r9
jb 0x140016acc
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0x60], rbp
mov ebp, dword [rdi + 0x170]
xor ebx, ebx
mov qword [rdi + 0x38], rcx
mov dword [rsp + 0x30], ebp
cmp dword [rdi + 0x174], ebx
je 0x140016875
test r9, r9
jne 0x140016848
lea rdx, [rdi + 0x60]
lea rcx, [rdi + 0x40]
call qword [rdi + 0x160]
mov dword [rdi + 0x174], ebx
xor eax, eax
jmp 0x140016ab4
mov rax, qword [rdi + 0x40]
mov ebp, reloc.WS2_32.dll_recv
mov dword [rdi + 0x174], ebx
mov qword [rdi + 0x188], rax
mov rax, qword [rdi + 0x48]
mov qword [rdi + 0x40], rbx
mov qword [rdi + 0x48], rbx
mov dword [rsp + 0x30], ebp
mov qword [rdi + 0x190], rax
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], r15
mov r15d, dword [rdi + 0xc]
mov r12d, ebp
bswap r15d
and r12d, 0xf
mov dword [rsp + 0x90], r15d
mov dword [rsp + 0x34], r12d
je 0x140016905
movsxd r8, ebp
nop
test rsi, rsi
je 0x1400168dc
movzx edx, byte [r13]
inc r14
inc ebp
mov byte [r8 + rdi + 0x188], dl
movzx ecx, byte [r12 + rdi + 0x10]
inc r8
xor cl, dl
inc r13
dec rsi
mov byte [r14 - 1], cl
inc r12d
and r12d, 0xf
mov dword [rsp + 0x34], r12d
jne 0x1400168a0
jmp 0x1400168e5
test r12d, r12d
jne 0x140016aa2
lea r8, [rdi + 0x188]
lea rdx, [rdi + 0x60]
lea rcx, [rdi + 0x40]
mov r9d, ebp
call r10
mov r10, qword [rsp + 0x38]
mov ebp, ebx
mov dword [rsp + 0x30], ebx
cmp rsi, 0x10
jb 0x14001692a
test ebp, ebp
je 0x14001692a
lea r8, [rdi + 0x188]
lea rdx, [rdi + 0x60]
lea rcx, [rdi + 0x40]
mov r9d, ebp
call r10
mov ebp, ebx
mov dword [rsp + 0x30], ebx
cmp rsi, 0xc00
jb 0x1400169dc
mov rbp, qword [rsp + 0x38]
movabs rax, 0xaaaaaaaaaaaaaaab
mul rsi
mov rbx, rdx
shr rbx, 0xb
mov rax, rbx
imul rax, rax, 0xfffffffffffff400
add rsi, rax
mov qword [rsp + 0xa8], rsi
nop word [rax + rax]
lea rdx, [rdi + 0x60]
lea rcx, [rdi + 0x40]
mov r9d, 0xc00
mov r8, r13
call rbp
mov r9, qword [rsp + 0x40]
mov r8d, 0xc0
mov rdx, r14
mov rcx, r13
mov qword [rsp + 0x20], rdi
call qword [rsp + 0xb0]
add r15d, 0xc0
add r14, 0xc00
mov eax, r15d
add r13, 0xc00
sub rbx, 1
bswap eax
mov dword [rdi + 0xc], eax
jne 0x140016970
mov rsi, qword [rsp + 0xa8]
mov ebp, dword [rsp + 0x30]
mov r12d, dword [rsp + 0x34]
mov dword [rsp + 0x90], r15d
mov r15, rsi
and r15, 0xfffffffffffffff0
je 0x140016a38
lea rdx, [rdi + 0x60]
lea rcx, [rdi + 0x40]
mov rbx, r15
mov r9, r15
mov r8, r13
shr rbx, 4
call qword [rsp + reloc.WS2_32.dll_getservbyport]
mov r9, qword [rsp + 0x40]
mov r8, rbx
mov rdx, r14
mov rcx, r13
mov qword [rsp + 0x20], rdi
call qword [rsp + 0xb0]
add dword [rsp + 0x90], ebx
add r14, r15
mov ebx, dword [rsp + 0x90]
add r13, r15
sub rsi, r15
mov eax, ebx
bswap eax
mov dword [rdi + 0xc], eax
jmp 0x140016a3f
mov ebx, dword [rsp + 0x90]
test rsi, rsi
je 0x140016aa2
mov r8, qword [rsp + 0x40]
lea rdx, [rdi + 0x10]
mov rcx, rdi
call qword [rdi + 0x178]
inc ebx
movsxd rax, r12d
movsxd rcx, ebp
bswap ebx
sub r13, r14
lea rdx, [rax + r14]
lea r8, [rax + rdi + 0x10]
mov dword [rdi + 0xc], ebx
lea r9, [rcx + rdi + 0x188]
add ebp, esi
nop dword [rax]
movzx ecx, byte [r13 + rdx]
inc rdx
inc r9
mov byte [r9 - 1], cl
movzx eax, byte [r8]
inc r8
xor al, cl
sub rsi, 1
mov byte [rdx - 1], al
jne 0x140016a80
mov r12, qword [rsp + 0x58]
mov r15, qword [rsp + 0x50]
mov dword [rdi + 0x170], ebp
xor eax, eax
mov rbx, qword [rsp + 0x98]
mov rbp, qword [rsp + 0x60]
add rsp, 0x68
pop r14
pop r13
pop rdi
pop rsi
ret
or eax, 0xffffffff
add rsp, 0x68
pop r14
pop r13
pop rdi
pop rsi
ret