Function at 0x180016080
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0xd8]
sub rsp, 0x1b0
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x180067008]
xor rax, rsp
mov qword [rbp + 0xa8], rax
mov r14, rcx
xor r12d, r12d
mov r15d, r12d
cmp qword [rcx + 0x40], r12
jne 0x1800160d7
mov dword [rcx], 6
xor eax, eax
jmp 0x180016c08
mov qword [rbp + 0x50], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x48], r12
mov byte [rbp + 0x38], r12b
movups xmm0, xmmword [0x180058bf0]
movups xmmword [rbp + 0x68], xmm0
movups xmm1, xmmword [0x180058c00]
movups xmmword [rbp + 0x78], xmm1
movups xmm0, xmmword [0x180058c10]
movups xmmword [rbp + 0x88], xmm0
movsd xmm1, qword [0x180058c20]
movsd qword [rbp + 0x98], xmm1
mov eax, dword [0x180058c28]
mov dword [rbp + 0xa0], eax
movzx eax, byte [0x180058c2c]
mov byte [rbp + 0xa4], al
mov ecx, 0x3b
nop dword [rax]
movzx eax, byte [rbp + rcx + 0x67]
xor byte [rbp + rcx + 0x68], al
dec rcx
test rcx, rcx
jg 0x180016140
xor byte [rbp + 0x68], 0xbe
jne 0x18001615c
mov r8, r12
jmp 0x18001616e
lea rax, [rbp + 0x68]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180016164
lea rdx, [rbp + 0x68]
lea rcx, [rbp + 0x38]
call fcn.1800020b0
lea rdx, [r14 + 0x30]
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rbp + 0x38]
call fcn.180006290
movups xmm0, xmmword [0x180058c30]
movups xmmword [rbp + 0x68], xmm0
movups xmm1, xmmword [0x180058c40]
movups xmmword [rbp + 0x78], xmm1
movzx eax, word [0x180058c50]
mov word [rbp + 0x88], ax
movzx eax, byte [0x180058c52]
mov byte [rbp + 0x8a], al
lea r8, [rbp + 0x88]
mov r9d, reloc.WS2_32.dll_inet_addr
nop dword [rax]
movzx edx, byte [r8]
xor byte [r8 + 1], dl
movzx eax, byte [r8 - 1]
xor al, dl
mov byte [r8], al
movzx eax, byte [r8 - 2]
xor byte [r8 - 1], al
lea r8, [r8 - 3]
sub r9, 1
jne 0x1800161d0
xor byte [rbp + 0x68], 0xe1
jne 0x180016200
mov r8, r12
jmp 0x18001621a
lea rax, [rbp + 0x68]
or r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180016210
lea rdx, [rbp + 0x68]
lea rcx, [rbp + 0x38]
call fcn.180006140
mov qword [rbp + 0x30], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x28], r12
mov byte [rbp + 0x18], 0
xor r8d, r8d
lea rdx, [0x180057690]
lea rcx, [rbp + 0x18]
call fcn.1800020b0
nop
mov qword [rbp - 0x28], r12
mov qword [rbp - 0x20], r12
call fcn.18000f420
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x18], r12
mov qword [rbp - 0x10], r12
call fcn.18000f420
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x38], r12
mov qword [rbp - 0x30], r12
call fcn.18000f420
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x48], r12
mov qword [rbp - 0x40], r12
call fcn.18000f420
mov qword [rbp - 0x48], rax
xor eax, eax
mov qword [rbp - 0x50], rax
mov dword [rbp - 0x50], r12d
mov dword [rbp - 0x4c], 0x400
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8d, 0x400
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp - 0x58], rax
lea rdx, [rbp - 0x28]
call fcn.18001af60
nop dword [rax]
nop dword [rax + rax]
mov dword [rbp - 0x50], r12d
mov qword [rbp - 0x60], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x68], r12
mov byte [rbp - 0x78], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0x38]
lea rcx, [rbp - 0x78]
call fcn.1800021e0
nop
cmp qword [rbp + 0x28], 0
jbe 0x1800163ee
movsd xmm0, qword [0x180058c58]
movsd qword [rbp + 0x58], xmm0
mov eax, dword [0x180058c60]
mov dword [rbp + 0x60], eax
movzx eax, byte [rbp + 0x61]
xor byte [rbp + 0x62], al
movzx ecx, byte [rbp + 0x60]
xor al, cl
mov byte [rbp + 0x61], al
movzx eax, byte [rbp + 0x5f]
xor cl, al
mov byte [rbp + 0x60], cl
movzx ecx, byte [rbp + 0x5e]
xor al, cl
mov byte [rbp + 0x5f], al
movzx eax, byte [rbp + 0x5d]
xor cl, al
mov byte [rbp + 0x5e], cl
movzx ecx, byte [rbp + 0x5c]
xor al, cl
mov byte [rbp + 0x5d], al
movzx eax, byte [rbp + 0x5b]
xor cl, al
mov byte [rbp + 0x5c], cl
movzx ecx, byte [rbp + 0x5a]
xor al, cl
mov byte [rbp + 0x5b], al
movzx edx, byte [rbp + 0x59]
xor cl, dl
mov byte [rbp + 0x5a], cl
movzx eax, byte [rbp + 0x58]
xor dl, al
mov byte [rbp + 0x59], dl
xor al, 0xd6
mov byte [rbp + 0x58], al
lea r8, [rbp + 0x18]
lea rdx, [rbp + 0x58]
lea rcx, [rbp + 0x68]
call fcn.180006960
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rbp - 0x78]
call fcn.180006290
nop
mov rax, qword [rbp + 0x80]
cmp rax, 0x10
jb 0x1800163ee
inc rax
mov rcx, qword [rbp + 0x68]
cmp rax, 0x1000
jb 0x1800163e9
test cl, 0x1f
jne 0x180016821
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x18001681b
sub rcx, rax
cmp rcx, 8
jb 0x180016815
cmp rcx, 0x27
ja 0x18001680f
mov rcx, rax
call fcn.180033ed0
mov dword [rbp - 0x80], r12d
mov qword [rbp + 0x80], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x78], r12
mov byte [rbp + 0x68], 0
mov r8d, 3
lea rdx, [0x180058ba4]
lea rcx, [rbp + 0x68]
call fcn.1800020b0
nop
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 0x10
cmovae rdx, qword [rbp - 0x78]
mov qword [rsp + 0x70], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x68], r12
mov byte [rsp + 0x58], 0
cmp byte [rdx], 0
jne 0x180016447
mov r8, r12
jmp 0x18001645a
or r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x180016450
lea rcx, [rsp + 0x58]
call fcn.1800020b0
nop
lea rax, [rbp - 0x58]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [r14 + 8]
call fcn.1800124b0
mov edi, eax
mov rax, qword [rsp + 0x70]
cmp rax, 0x10
jb 0x1800164f8
inc rax
mov rcx, qword [rsp + 0x58]
cmp rax, 0x1000
jb 0x1800164f3
test cl, 0x1f
jne 0x180016839
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x180016833
sub rcx, rax
cmp rcx, 8
jb 0x18001682d
cmp rcx, 0x27
ja 0x180016827
mov rcx, rax
call fcn.180033ed0
mov qword [rsp + 0x70], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x68], r12
mov byte [rsp + 0x58], 0
mov rax, qword [rbp + 0x80]
cmp rax, 0x10
jb 0x18001655c
inc rax
mov rcx, qword [rbp + 0x68]
cmp rax, 0x1000
jb 0x180016557
test cl, 0x1f
jne 0x180016851
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x18001684b
sub rcx, rax
cmp rcx, 8
jb 0x180016845
cmp rcx, 0x27
ja 0x18001683f
mov rcx, rax
call fcn.180033ed0
mov ebx, r12d
nop
test edi, edi
je 0x18001670b
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rbp + 0x80], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x78], r12
mov byte [rbp + 0x68], 0
mov r8d, 3
lea rdx, [0x180058ba4]
lea rcx, [rbp + 0x68]
call fcn.1800020b0
nop
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 0x10
cmovae rdx, qword [rbp - 0x78]
mov qword [rsp + 0x70], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x68], r12
mov byte [rsp + 0x58], 0
cmp byte [rdx], 0
jne 0x1800165c8
mov r8, r12
jmp 0x1800165da
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x1800165d0
lea rcx, [rsp + 0x58]
call fcn.1800020b0
nop
lea rax, [rbp - 0x58]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [r14 + 8]
call fcn.1800124b0
mov edi, eax
mov rax, qword [rsp + 0x70]
cmp rax, 0x10
jb 0x180016678
inc rax
mov rcx, qword [rsp + 0x58]
cmp rax, 0x1000
jb 0x180016673
test cl, 0x1f
jne 0x180016869
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x180016863
sub rcx, rax
cmp rcx, 8
jb 0x18001685d
cmp rcx, 0x27
ja 0x180016857
mov rcx, rax
call fcn.180033ed0
mov qword [rsp + 0x70], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x68], r12
mov byte [rsp + 0x58], 0
mov rax, qword [rbp + 0x80]
cmp rax, 0x10
jb 0x1800166dc
inc rax
mov rcx, qword [rbp + 0x68]
cmp rax, 0x1000
jb 0x1800166d7
test cl, 0x1f
jne 0x180016881
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x18001687b
sub rcx, rax
cmp rcx, 8
jb 0x180016875
cmp rcx, 0x27
ja 0x18001686f
mov rcx, rax
call fcn.180033ed0
inc ebx
cmp ebx, 3
jl 0x180016560
test edi, edi
je 0x18001670b
cmp edi, 2
je 0x1800168e8
cmp edi, 4
je 0x1800168e8
lea eax, [rdi - 1]
test eax, 0xfffffffd
je 0x180016887
mov qword [rbp + 0x10], reloc.WS2_32.dll_ntohs
mov qword [rbp + 8], r12
mov byte [rbp - 8], 0
mov r8d, dword [rbp - 0x50]
mov rdx, qword [rbp - 0x58]
lea rcx, [rbp - 8]
call fcn.1800020b0
nop
lea r9, [rbp + 0x18]
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 8]
call fcn.18001c680
test eax, eax
je 0x180016979
mov r15d, 1
mov dword [r14], r12d
mov rax, qword [rbp + 0x10]
cmp rax, 0x10
jb 0x1800167a1
inc rax
mov rcx, qword [rbp - 8]
cmp rax, 0x1000
jb 0x18001679c
test cl, 0x1f
jne 0x18001695b
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x180016955
sub rcx, rax
cmp rcx, 8
jb 0x18001694f
cmp rcx, 0x27
ja 0x180016949
mov rcx, rax
call fcn.180033ed0
mov qword [rbp + 0x10], reloc.WS2_32.dll_ntohs
mov qword [rbp + 8], r12
mov byte [rbp - 8], 0
mov rax, qword [rbp - 0x60]
cmp rax, 0x10
jb 0x1800167ff
inc rax
mov rcx, qword [rbp - 0x78]
cmp rax, 0x1000
jb 0x1800167fa
test cl, 0x1f
jne 0x180016973
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x18001696d
sub rcx, rax
cmp rcx, 8
jb 0x180016967
cmp rcx, 0x27
ja 0x180016961
mov rcx, rax
call fcn.180033ed0
cmp qword [rbp + 0x28], 0
jbe 0x180016a3c
jmp 0x1800162d0
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
nop
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
nop
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
nop
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
nop
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
mov dword [r14], 1
mov rax, qword [rbp - 0x60]
cmp rax, 0x10
jb 0x180016a3c
inc rax
mov rcx, qword [rbp - 0x78]
cmp rax, 0x1000
jb 0x180016a37
test cl, 0x1f
je 0x1800168ba
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1800168c9
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x1800168d8
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180016a34
call fcn.18003835c
nop
mov dword [r14], 3
mov rax, qword [rbp - 0x60]
cmp rax, 0x10
jb 0x180016a3c
inc rax
mov rcx, qword [rbp - 0x78]
cmp rax, 0x1000
jb 0x180016a37
test cl, 0x1f
je 0x18001691b
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x18001692a
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x180016939
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180016a34
call fcn.18003835c
nop
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
nop
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
int3
call fcn.18003835c
nop
mov dword [r14], 4
mov rax, qword [rbp + 0x10]
cmp rax, 0x10
jb 0x1800169d6
inc rax
mov rcx, qword [rbp - 8]
cmp rax, 0x1000
jb 0x1800169d1
test cl, 0x1f
je 0x1800169a4
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1800169b3
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x1800169c2
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x1800169ce
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
mov qword [rbp + 0x10], reloc.WS2_32.dll_ntohs
mov qword [rbp + 8], r12
mov byte [rbp - 8], 0
mov rax, qword [rbp - 0x60]
cmp rax, 0x10
jb 0x180016a3c
inc rax
mov rcx, qword [rbp - 0x78]
cmp rax, 0x1000
jb 0x180016a37
test cl, 0x1f
je 0x180016a0a
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180016a19
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x180016a28
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180016a34
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
mov rbx, qword [r14 + 0x28]
mov qword [rbp - 0x80], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rdi, [r14 + 0x50]
lea rax, [rbp - 0x38]
cmp rdi, rax
je 0x180016a75
mov rcx, rdi
call fcn.18000e0d0
movzx r8d, byte [rsp + 0x50]
lea rdx, [rbp - 0x38]
mov rcx, rdi
call fcn.18000f500
lea rdi, [r14 + 0x60]
lea rax, [rbp - 0x48]
cmp rdi, rax
je 0x180016a9d
mov rcx, rdi
call fcn.18000e0d0
movzx r8d, byte [rsp + 0x50]
lea rdx, [rbp - 0x48]
mov rcx, rdi
call fcn.18000f500
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rbx, qword [rbp - 0x58]
test rbx, rbx
je 0x180016ac5
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov r8, qword [rbp - 0x48]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x48]
call fcn.18000e170
mov rcx, qword [rbp - 0x48]
call fcn.180033ed0
nop
mov r8, qword [rbp - 0x38]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x38]
call fcn.18000e170
mov rcx, qword [rbp - 0x38]
call fcn.180033ed0
nop
mov r8, qword [rbp - 0x18]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x18]
call fcn.18000e170
mov rcx, qword [rbp - 0x18]
call fcn.180033ed0
nop
mov r8, qword [rbp - 0x28]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x28]
call fcn.18000e170
mov rcx, qword [rbp - 0x28]
call fcn.180033ed0
nop
mov rax, qword [rbp + 0x30]
cmp rax, 0x10
jb 0x180016b9f
inc rax
mov rcx, qword [rbp + 0x18]
cmp rax, 0x1000
jb 0x180016b9a
test cl, 0x1f
je 0x180016b6d
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180016b7c
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x180016b8b
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180016b97
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
mov qword [rbp + 0x30], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x28], r12
mov byte [rbp + 0x18], 0
mov rax, qword [rbp + 0x50]
cmp rax, 0x10
jb 0x180016c05
inc rax
mov rcx, qword [rbp + 0x38]
cmp rax, 0x1000
jb 0x180016c00
test cl, 0x1f
je 0x180016bd3
call fcn.18003835c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180016be2
call fcn.18003835c
int3
sub rcx, rax
cmp rcx, 8
jae 0x180016bf1
call fcn.18003835c
int3
cmp rcx, 0x27
jbe 0x180016bfd
call fcn.18003835c
int3
mov rcx, rax
call fcn.180033ed0
mov eax, r15d
mov rcx, qword [rbp + 0xa8]
xor rcx, rsp
call fcn.180033e70
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret