Function at 0x180180660
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1c8
mov rax, qword [0x1802edb40]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
mov rax, qword [rcx + 0x38]
mov r11, rcx
mov r14, qword [rcx + 0x70]
mov rdi, r8
mov r10d, dword [rcx + 0x34]
mov r13d, edx
mov qword [rsp + 0x58], rax
mov rbx, rdx
mov rax, qword [rcx + 8]
mov esi, 1
mov ecx, dword [rcx + 0x18]
sub r13d, eax
mov qword [rsp + 0x50], rax
mov ebp, 3
mov r12, qword [rbx]
mov dword [rsp + 0x34], ecx
add rcx, rax
mov qword [rsp + 0xa0], rcx
mov eax, r13d
mov ecx, dword [r11 + 0x100]
mov qword [rsp + 0x68], r8
mov r8d, r13d
mov qword [rsp + 0x70], rdx
mov edx, esi
shl edx, cl
mov ecx, dword [r11 + 0x1c]
sub r8d, edx
sub eax, ecx
mov qword [rsp + 0x78], r9
cmp eax, edx
mov qword [rsp + 0x40], r14
mov eax, dword [r11 + 0x10c]
mov r9d, gethostname
cmovbe r8d, ecx
mov dword [rsp + 0x24], r10d
cmp dword [r11 + 0x28], 0
mov dword [rsp + 0x20], r13d
cmovne r8d, ecx
mov ecx, 4
cmp eax, ecx
mov dword [rsp + 0x60], r8d
cmovb ecx, eax
mov rax, qword [r11 + 0x60]
shl esi, cl
movabs rcx, 0xcf1bbcdcbf9b0000
mov qword [rsp + 0x28], rax
mov rax, qword [r11 + 0xf8]
imul r12, rcx
mov qword [rsp + 0x80], rax
mov ecx, r9d
mov rdx, qword [rax + 0x38]
sub ecx, dword [rax + 0x34]
mov r8, qword [rax + 0x70]
mov rax, r12
shr rax, cl
mov qword [rsp + 0x90], rax
shr eax, 4
and eax, 0xffffff0
mov dword [rsp + 0x30], esi
lea rcx, [rdx + rax]
lea rax, [r8 + rax*4]
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x98], rax
prefetcht0 byte [rax]
prefetcht0 byte [rcx]
xor r15d, r15d
mov dword [rsp + 0x48], reloc.WS2_32.dll_ntohs
cmp dword [r11 + 0x12c], r15d
jne 0x180180a7f
mov r10d, dword [r11 + 0x2c]
mov eax, r13d
mov edx, dword [rsp + 0x24]
sub eax, r10d
mov r12, qword [rsp + 0x58]
mov ecx, edx
cmp eax, 0x180
jbe 0x18018095d
lea eax, [r10 + 0x60]
cmp r10d, eax
jae 0x1801808a1
mov r12, qword [rsp + 0x50]
mov edi, r9d
mov rsi, qword [rsp + 0x40]
sub edi, edx
mov r13, qword [rsp + 0x58]
add r12, 8
add r12, r10
mov r14d, r10d
mov ebp, eax
movabs rbx, 0xcf1bbcdcbf9b0000
nop
mov rdx, qword [r12]
mov ecx, edi
imul rdx, rbx
xor rdx, qword [r11 + 0x60]
shr rdx, cl
mov eax, edx
shr eax, 4
and eax, 0xffffff0
prefetcht0 byte [rsi + rax*4]
prefetcht0 byte [rax + r13]
mov rax, r14
lea r12, [r12 + 1]
and eax, 7
mov r9d, dword [r11 + rax*4 + 0x40]
mov dword [r11 + rax*4 + 0x40], edx
mov eax, r9d
shr eax, 4
and eax, 0xffffff0
movzx ecx, byte [rax + r13]
lea rdx, [rax + r13]
dec ecx
mov r8d, eax
and ecx, 0xf
mov eax, r15d
cmove eax, dword [rsp + 0x48]
inc r14
add ecx, eax
mov byte [rdx], cl
mov eax, ecx
add rax, r8
mov byte [rcx + rdx], r9b
mov dword [rsi + rax*4], r10d
inc r10d
cmp r10d, ebp
jb 0x180180810
mov rbx, qword [rsp + 0x70]
mov ebp, 3
mov rdi, qword [rsp + 0x68]
mov esi, dword [rsp + 0x30]
mov r13d, dword [rsp + 0x20]
mov ecx, dword [r11 + 0x34]
lea r10d, [r13 - 0x20]
mov rdx, qword [rsp + 0x50]
lea rax, [rbx + 1]
mov r14, qword [r11 + 0x70]
mov r12, qword [r11 + 0x38]
mov dword [rsp + 0x38], ecx
mov ecx, eax
sub ecx, r10d
mov r8d, r10d
sub ecx, edx
lea r9, [r10 + rdx]
inc ecx
cmp r9, rax
mov eax, 8
cmova ecx, r15d
cmp ecx, eax
cmova ecx, eax
lea eax, [r10 + rcx]
cmp r10d, eax
jae 0x180180953
mov r13d, gethostname
mov edi, ecx
sub r13d, dword [rsp + 0x38]
movabs rsi, 0xcf1bbcdcbf9b0000
nop
mov rdx, qword [r9]
mov ecx, r13d
imul rdx, rsi
xor rdx, qword [r11 + 0x60]
shr rdx, cl
mov eax, edx
shr eax, 4
and eax, 0xffffff0
prefetcht0 byte [r14 + rax*4]
prefetcht0 byte [r12 + rax]
mov rax, r8
lea r9, [r9 + 1]
and eax, 7
inc r8
mov dword [r11 + rax*4 + 0x40], edx
sub rdi, 1
jne 0x180180900
mov r14, qword [r11 + 0x70]
mov r12, qword [r11 + 0x38]
mov rdi, qword [rsp + 0x68]
mov esi, dword [rsp + 0x30]
mov r13d, dword [rsp + 0x20]
mov ecx, dword [r11 + 0x34]
mov r9d, gethostname
mov rax, qword [r11 + 8]
cmp r10d, r13d
jae 0x180180a21
mov edi, dword [rsp + 0x20]
lea rbp, [rax + 8]
mov esi, r9d
mov r13d, r10d
sub esi, ecx
movabs rbx, 0xcf1bbcdcbf9b0000
add rbp, r13
nop word [rax + rax]
mov rdx, qword [rbp]
mov ecx, esi
imul rdx, rbx
xor rdx, qword [r11 + 0x60]
shr rdx, cl
mov eax, edx
shr eax, 4
and eax, 0xffffff0
prefetcht0 byte [r14 + rax*4]
prefetcht0 byte [r12 + rax]
mov rax, r13
lea rbp, [rbp + 1]
and eax, 7
mov r9d, dword [r11 + rax*4 + 0x40]
mov dword [r11 + rax*4 + 0x40], edx
mov eax, r9d
shr eax, 4
and eax, 0xffffff0
movzx ecx, byte [rax + r12]
lea rdx, [rax + r12]
dec ecx
mov r8d, eax
and ecx, 0xf
mov eax, r15d
cmove eax, dword [rsp + 0x48]
inc r13
add ecx, eax
mov byte [rdx], cl
mov eax, ecx
add rax, r8
mov byte [rcx + rdx], r9b
mov dword [r14 + rax*4], r10d
inc r10d
cmp r10d, edi
jb 0x180180990
mov rbx, qword [rsp + 0x70]
mov ebp, 3
mov rdi, qword [rsp + 0x68]
mov esi, dword [rsp + 0x30]
mov r13d, dword [rsp + 0x20]
mov rax, qword [rsp + 0x50]
mov ecx, gethostname
sub ecx, dword [rsp + 0x24]
mov r14, qword [rsp + 0x40]
mov r8d, r13d
mov dword [r11 + 0x2c], r13d
mov rdx, qword [r8 + rax + 8]
movabs rax, 0xcf1bbcdcbf9b0000
imul rdx, rax
xor rdx, qword [rsp + 0x28]
shr rdx, cl
mov eax, edx
shr eax, 4
and eax, 0xffffff0
prefetcht0 byte [r14 + rax*4]
mov r9, qword [rsp + 0x58]
prefetcht0 byte [rax + r9]
and r8d, 7
mov r12d, dword [r11 + r8*4 + 0x40]
mov dword [r11 + r8*4 + 0x40], edx
jmp 0x180180a97
xor r12, qword [rsp + 0x28]
sub r9d, r10d
movzx ecx, r9b
mov dword [r11 + 0x2c], r13d
mov r9, qword [rsp + 0x58]
shr r12, cl
add dword [r11 + 0x68], r12d
mov eax, r12d
shr eax, 4
mov r10, r15
and eax, 0xffffff0
movdqu xmm0, xmmword [rax + r9]
lea rdx, [rax + r9]
mov qword [rsp + 0x40], rdx
lea rcx, [r14 + rax*4]
movsx eax, r12b
mov qword [rsp + 0x28], rcx
mov r14, r15
movzx ecx, byte [rdx]
mov dword [rsp + 0x24], ecx
movd xmm1, eax
mov eax, ecx
and eax, 0xf
punpcklbw xmm1, xmm1
mov edx, eax
punpcklwd xmm1, xmm1
mov ecx, eax
pshufd xmm1, xmm1, 0
neg ecx
pcmpeqb xmm0, xmm1
pmovmskb r8d, xmm0
and ecx, 0xf
movzx eax, r8w
shl ax, cl
movzx ecx, dl
mov edx, dword [rsp + 0x24]
movzx r9d, ax
movzx eax, r8w
mov r8, qword [rsp + 0x28]
shr rax, cl
or r9, rax
jbe 0x180180b5d
mov r13d, dword [rsp + 0x60]
nop
test esi, esi
je 0x180180b58
bsf rcx, r9
add ecx, edx
and ecx, 0xf
mov ecx, dword [r8 + rcx*4]
je 0x180180b4f
cmp ecx, r13d
jb 0x180180b58
mov eax, ecx
add rax, qword [rsp + 0x50]
prefetcht0 byte [rax]
mov dword [rsp + r14*4 + 0xb0], ecx
inc r14
dec esi
lea rax, [r9 - 1]
and r9, rax
ja 0x180180b20
mov r13d, dword [rsp + 0x20]
lea ecx, [rdx - 1]
mov eax, r15d
and ecx, 0xf
mov edx, reloc.WS2_32.dll_ntohs
cmove eax, edx
add ecx, eax
mov rax, qword [rsp + 0x40]
mov byte [rax], cl
mov byte [rcx + rax], r12b
mov eax, dword [r11 + 0x2c]
mov dword [r8 + rcx*4], eax
inc dword [r11 + 0x2c]
test r14, r14
je 0x180180c77
mov r15, qword [rsp + 0x50]
mov r11, qword [rsp + 0x78]
nop word [rax + rax]
mov r9d, dword [rsp + r10*4 + 0xb0]
mov eax, dword [rbx + rbp - 3]
lea rdx, [r15 + r9]
cmp dword [rdx + rbp - 3], eax
jne 0x180180c68
lea r8, [rdi - 7]
mov rax, rbx
cmp rbx, r8
jae 0x180180c09
mov rcx, qword [rdx]
xor rcx, qword [rbx]
je 0x180180bd8
bsf rax, rcx
shr rax, 3
jmp 0x180180c4b
add rax, 8
add rdx, 8
cmp rax, r8
jae 0x180180c09
nop word [rax + rax]
mov rcx, qword [rax]
xor rcx, qword [rdx]
jne 0x180180e06
add rax, 8
add rdx, 8
cmp rax, r8
jb 0x180180bf0
lea rcx, [rdi - 3]
cmp rax, rcx
jae 0x180180c20
mov ecx, dword [rax]
cmp dword [rdx], ecx
jne 0x180180c20
add rax, 4
add rdx, 4
lea rcx, [rdi - 1]
cmp rax, rcx
jae 0x180180c39
movzx ecx, word [rax]
cmp word [rdx], cx
jne 0x180180c39
add rax, 2
add rdx, 2
cmp rax, rdi
jae 0x180180c48
movzx ecx, byte [rax]
cmp byte [rdx], cl
jne 0x180180c48
inc rax
sub rax, rbx
cmp rax, rbp
jbe 0x180180c68
mov ecx, r13d
mov rbp, rax
sub ecx, r9d
add ecx, 3
mov qword [r11], rcx
lea rcx, [rax + rbx]
cmp rcx, rdi
je 0x180180c74
inc r10
cmp r10, r14
jb 0x180180ba0
xor r15d, r15d
mov rax, qword [rsp + 0x80]
mov r14, r15
mov rcx, qword [rsp + 0x88]
mov r10, qword [rax + 8]
mov r12d, dword [rax + 0x18]
mov rax, qword [rax]
movzx r11d, byte [rcx]
movdqu xmm0, xmmword [rcx]
mov qword [rsp + 0x28], rax
sub eax, r10d
sub dword [rsp + 0x34], eax
movsx eax, byte [rsp + 0x90]
mov qword [rsp + 0x40], r10
movd xmm1, eax
mov eax, r11d
and eax, 0xf
punpcklbw xmm1, xmm1
mov ecx, eax
punpcklwd xmm1, xmm1
mov edx, eax
pshufd xmm1, xmm1, 0
neg ecx
pcmpeqb xmm0, xmm1
and ecx, 0xf
pmovmskb r8d, xmm0
movzx eax, r8w
shl ax, cl
movzx ecx, dl
movzx r9d, ax
movzx eax, r8w
shr rax, cl
or r9, rax
jbe 0x180180ddf
mov rdx, qword [rsp + 0x98]
test esi, esi
je 0x180180d38
bsf rcx, r9
add ecx, r11d
and ecx, 0xf
mov ecx, dword [rdx + rcx*4]
je 0x180180d2f
cmp ecx, r12d
jb 0x180180d38
prefetcht0 byte [rcx + r10]
mov dword [rsp + r15*4 + 0xb0], ecx
inc r15
dec esi
lea rax, [r9 - 1]
and r9, rax
ja 0x180180d05
test r15, r15
je 0x180180ddf
mov r13d, dword [rsp + r14*4 + 0xb0]
mov eax, dword [rbx]
lea r11, [r10 + r13]
cmp dword [r11], eax
jne 0x180180dd3
mov rcx, qword [rsp + 0x28]
lea r12, [rbx + 4]
add r11, 4
mov rax, r12
sub rax, r11
mov r8, rdi
add rcx, rax
mov rdx, r11
cmp rcx, rdi
cmovb r8, rcx
mov rcx, r12
call fcn.18016c740
mov rsi, rax
add rax, r11
cmp rax, qword [rsp + 0x28]
jne 0x180180da3
mov rdx, qword [rsp + 0xa0]
lea rcx, [rsi + r12]
mov r8, rdi
call fcn.18016c740
add rsi, rax
add rsi, 4
cmp rsi, rbp
jbe 0x180180dce
mov eax, dword [rsp + 0x20]
mov rbp, rsi
mov rcx, qword [rsp + 0x78]
sub eax, r13d
sub eax, dword [rsp + 0x34]
add eax, 3
mov qword [rcx], rax
lea rax, [rsi + rbx]
cmp rax, rdi
je 0x180180ddf
mov r10, qword [rsp + 0x40]
inc r14
cmp r14, r15
jb 0x180180d41
mov rax, rbp
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.1801cf080
add rsp, 0x1c8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
bsf rdx, rcx
shr rdx, 3
add rax, rdx
jmp 0x180180c48