Function at 0x18006f160
Capabilities:
Encode data using xor

Disassembly:
jmp 0x18006f160
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
mov eax, gethostbyname
call fcn.180001055
sub rsp, rax
mov rax, qword [rsp + 0x80]
mov rbp, rcx
movzx r15d, byte [rax + 1]
lea rdi, [rax + 1]
movzx r14d, byte [rdi + 3]
mov r10, r9
shl r14d, 0x18
mov rbx, rdx
movzx ecx, byte [rax]
movzx eax, byte [rdi + 1]
shl eax, 8
shl ecx, 8
or r15d, ecx
shl r15d, 0x10
or r15d, eax
movzx eax, byte [rdi + 2]
or r15d, eax
movzx eax, byte [rdi + 4]
shl eax, 0x10
or r14d, eax
movzx eax, byte [rdi + 5]
shl eax, 8
or r14d, eax
movzx eax, byte [rdi + 6]
or r14d, eax
cmp dword [rsp + 0x88], 0
je 0x18006f3e2
dec rdi
lea esi, [r8 - 8]
mov r13, rdi
test esi, esi
js 0x18006f2da
mov rdi, qword [rsp + 0x78]
lea r12d, [rsi + 8]
shr r12, 3
mov eax, r12d
neg eax
lea esi, [rsi + rax*8]
nop dword [rax + rax]
movzx edx, byte [rbp]
movzx ecx, byte [rbp + 4]
movzx eax, byte [rbp + 1]
shl eax, 0x10
shl edx, 0x18
or edx, eax
shl ecx, 0x18
movzx eax, byte [rbp + 2]
shl eax, 8
or edx, eax
movzx eax, byte [rbp + 3]
or edx, eax
movzx eax, byte [rbp + 5]
shl eax, 0x10
xor edx, r15d
or ecx, eax
mov dword [rsp + 0x20], edx
movzx eax, byte [rbp + 6]
mov rdx, rdi
shl eax, 8
or ecx, eax
movzx eax, byte [rbp + 7]
or ecx, eax
add rbp, 8
xor ecx, r14d
mov dword [rsp + 0x24], ecx
lea rcx, [rsp + 0x20]
call sym.libcrypto_1_1_x64.dll_CAST_encrypt
mov r15d, dword [rsp + 0x20]
mov eax, r15d
mov r14d, dword [rsp + 0x24]
shr eax, 0x18
mov byte [rbx], al
mov eax, r15d
shr eax, 0x10
mov byte [rbx + 1], al
mov eax, r15d
shr eax, 8
mov byte [rbx + 2], al
mov eax, r14d
shr eax, 0x18
mov byte [rbx + 3], r15b
mov byte [rbx + 4], al
mov eax, r14d
shr eax, 0x10
mov byte [rbx + 5], al
mov eax, r14d
shr eax, 8
mov byte [rbx + 6], al
mov byte [rbx + 7], r14b
add rbx, 8
sub r12, 1
jne 0x18006f220
mov r10, qword [rsp + 0x78]
mov rdi, r13
cmp esi, 0xfffffff8
je 0x18006f3c4
lea eax, [rsi + 8]
add esi, 7
movsxd rcx, eax
add rbp, rcx
xor ecx, ecx
mov edx, ecx
cmp esi, 7
ja case.default.0x18006f30d
lea r9, [0x180000000]
movsxd rax, esi
mov eax, dword [r9 + rax*4 + 0x6f63c]
add rax, r9
jmp rax
movzx ecx, byte [rbp - 1]
dec rbp
movzx eax, byte [rbp - 1]
dec rbp
shl eax, 8
or ecx, eax
movzx eax, byte [rbp - 1]
dec rbp
shl eax, 0x10
or ecx, eax
movzx eax, byte [rbp - 1]
dec rbp
shl eax, 0x18
or ecx, eax
movzx edx, byte [rbp - 1]
dec rbp
movzx eax, byte [rbp - 1]
dec rbp
shl eax, 8
or edx, eax
movzx eax, byte [rbp - 1]
dec rbp
shl eax, 0x10
or edx, eax
movzx eax, byte [rbp - 1]
shl eax, 0x18
or edx, eax
xor edx, r15d
xor ecx, r14d
mov dword [rsp + 0x20], edx
mov rdx, r10
mov dword [rsp + 0x24], ecx
lea rcx, [rsp + 0x20]
call sym.libcrypto_1_1_x64.dll_CAST_encrypt
mov r15d, dword [rsp + 0x20]
mov eax, r15d
mov r14d, dword [rsp + 0x24]
shr eax, 0x18
mov byte [rbx], al
mov eax, r15d
shr eax, 0x10
mov byte [rbx + 1], al
mov eax, r15d
shr eax, 8
mov byte [rbx + 2], al
mov eax, r14d
shr eax, 0x18
mov byte [rbx + 3], r15b
mov byte [rbx + 4], al
mov eax, r14d
shr eax, 0x10
mov byte [rbx + 5], al
mov eax, r14d
shr eax, 8
mov byte [rbx + 6], al
mov byte [rbx + 7], r14b
lea rbx, [rdi + 1]
add rdi, 2
mov r11, rdi
mov rsi, rdi
mov r12, rdi
add rdi, 2
add r11, 4
jmp 0x18006f5dc
lea r13d, [r8 - 8]
lea r12, [rdi - 1]
mov qword [rsp + 0x28], r12
test r13d, r13d
js 0x18006f4e0
lea r12d, [r13 + 8]
shr r12, 3
mov eax, r12d
neg eax
lea r13d, [r13 + rax*8]
mov dword [rsp + 0x88], r13d
mov r13, qword [rsp + 0x78]
nop word [rax + rax]
movzx esi, byte [rbp]
lea rcx, [rsp + 0x20]
movzx eax, byte [rbp + 1]
mov rdx, r13
movzx edi, byte [rbp + 4]
shl eax, 0x10
shl esi, 0x18
or esi, eax
shl edi, 0x18
movzx eax, byte [rbp + 2]
shl eax, 8
or esi, eax
movzx eax, byte [rbp + 3]
or esi, eax
movzx eax, byte [rbp + 5]
shl eax, 0x10
or edi, eax
mov dword [rsp + 0x20], esi
movzx eax, byte [rbp + 6]
shl eax, 8
or edi, eax
movzx eax, byte [rbp + 7]
or edi, eax
add rbp, 8
mov dword [rsp + 0x24], edi
call sym.libcrypto_1_1_x64.dll_CAST_decrypt
mov ecx, dword [rsp + 0x20]
mov edx, dword [rsp + 0x24]
xor ecx, r15d
xor edx, r14d
mov eax, ecx
shr eax, 0x18
mov r15d, esi
mov byte [rbx], al
mov r14d, edi
mov eax, ecx
shr eax, 0x10
mov byte [rbx + 1], al
mov eax, ecx
shr eax, 8
mov byte [rbx + 2], al
mov eax, edx
shr eax, 0x18
mov byte [rbx + 3], cl
mov byte [rbx + 4], al
mov eax, edx
shr eax, 0x10
mov byte [rbx + 5], al
mov eax, edx
shr eax, 8
mov byte [rbx + 6], al
mov byte [rbx + 7], dl
add rbx, 8
sub r12, 1
jne 0x18006f420
mov r12, qword [rsp + 0x28]
mov r13d, dword [rsp + 0x88]
mov r10, qword [rsp + 0x78]
cmp r13d, 0xfffffff8
je 0x18006f5c2
movzx ecx, byte [rbp + 6]
mov rdx, r10
movzx edi, byte [rbp]
movzx eax, byte [rbp + 1]
movzx esi, byte [rbp + 4]
shl eax, 0x10
shl edi, 0x18
or edi, eax
shl ecx, 8
movzx eax, byte [rbp + 2]
shl eax, 8
or edi, eax
shl esi, 0x18
movzx eax, byte [rbp + 3]
or edi, eax
movzx eax, byte [rbp + 5]
shl eax, 0x10
or esi, eax
mov dword [rsp + 0x20], edi
movzx eax, byte [rbp + 7]
or ecx, eax
or esi, ecx
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x24], esi
call sym.libcrypto_1_1_x64.dll_CAST_decrypt
mov edx, dword [rsp + 0x20]
lea eax, [r13 + 8]
mov r8d, dword [rsp + 0x24]
xor edx, r15d
movsxd rcx, eax
xor r8d, r14d
add rbx, rcx
add r13d, 7
cmp r13d, 7
ja case.default.0x18006f575
lea r9, [0x180000000]
movsxd rax, r13d
mov eax, dword [r9 + rax*4 + 0x6f65c]
add rax, r9
jmp rax
dec rbx
mov byte [rbx], r8b
dec rbx
mov eax, r8d
shr eax, 8
mov byte [rbx], al
dec rbx
mov eax, r8d
shr eax, 0x10
mov byte [rbx], al
dec rbx
shr r8d, 0x18
mov byte [rbx], r8b
dec rbx
mov byte [rbx], dl
dec rbx
mov eax, edx
shr eax, 8
mov byte [rbx], al
dec rbx
mov eax, edx
shr eax, 0x10
mov byte [rbx], al
shr edx, 0x18
mov byte [rbx - 1], dl
mov r15d, edi
mov r14d, esi
mov r13, qword [rsp + 0x28]
lea rbx, [r12 + 1]
add r12, 2
mov rsi, r12
lea rdi, [r12 + 2]
lea r11, [rdi + 2]
mov eax, r14d
mov ecx, r14d
shr eax, 8
mov edx, r14d
shr ecx, 0x10
mov r8d, r15d
shr edx, 0x18
mov r9d, r15d
shr r8d, 8
mov r10d, r15d
shr r9d, 0x10
shr r10d, 0x18
mov byte [r13], r10b
mov byte [rbx], r9b
mov byte [r12], r8b
mov byte [rsi + 1], r15b
mov byte [rdi], dl
mov byte [rdi + 1], cl
mov byte [r11], al
mov byte [r11 + 1], r14b
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret