Function at 0x18002c660
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push rbx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov rax, qword [0x18005b0d0]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rbx, qword [rcx]
xor eax, eax
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov eax, dword [rcx + 8]
mov ecx, reloc.ca_core.dll_Ordinal_16
mov r15, rdx
xor edx, edx
cmp eax, ecx
lea r10, [rsp + 0x20]
cmovg eax, ecx
xor r9d, r9d
movsxd r11, eax
test eax, eax
jle 0x18002c6e7
movzx eax, byte [r9 + rbx]
lea ecx, [rdx*8]
shl eax, cl
or r8d, eax
cmp edx, 3
jne 0x18002c6d5
mov dword [r10], r8d
add r10, 4
xor r8d, r8d
xor edx, edx
jmp 0x18002c6d7
inc edx
inc r9
cmp r9, r11
jl 0x18002c6b1
test r8d, r8d
je 0x18002c6e7
mov dword [r10], r8d
mov eax, dword [r15 + 8]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
movsxd r13, eax
lea ecx, [r13*8]
movsxd rcx, ecx
call qword [sym.imp.MSVCR100.dll_malloc]
mov r8, qword [r15]
mov r14, rax
mov r9, rax
test r13d, r13d
jle 0x18002c803
mov r10d, r13d
movzx ecx, byte [r8]
movzx eax, cl
and eax, 0xf
test cl, 0x40
je 0x18002c732
add eax, 9
movzx ecx, byte [r8 + 1]
test cl, 0x40
movzx ecx, cl
je 0x18002c747
and ecx, 0xf
add ecx, 9
jmp 0x18002c74a
and ecx, 0xf
shl eax, 4
add eax, ecx
movzx ecx, byte [r8 + 2]
movzx edx, cl
and edx, 0xf
test cl, 0x40
je 0x18002c762
add edx, 9
movzx ecx, byte [r8 + 3]
test cl, 0x40
movzx ecx, cl
je 0x18002c777
and ecx, 0xf
add ecx, 9
jmp 0x18002c77a
and ecx, 0xf
shl edx, 0xc
shl ecx, 8
add ecx, edx
or eax, ecx
movzx ecx, byte [r8 + 4]
movzx edx, cl
and edx, 0xf
test cl, 0x40
je 0x18002c797
add edx, 9
movzx ecx, byte [r8 + 5]
test cl, 0x40
movzx ecx, cl
je 0x18002c7ac
and ecx, 0xf
add ecx, 9
jmp 0x18002c7af
and ecx, 0xf
shl edx, 0x14
shl ecx, 0x10
add ecx, edx
or eax, ecx
movzx ecx, byte [r8 + 6]
movzx edx, cl
and edx, 0xf
test cl, 0x40
je 0x18002c7cc
add edx, 9
movzx ecx, byte [r8 + 7]
test cl, 0x40
movzx ecx, cl
je 0x18002c7e1
and ecx, 0xf
add ecx, 9
jmp 0x18002c7e4
and ecx, 0xf
shl ecx, 0x18
shl edx, 0x1c
add r9, 4
add ecx, edx
add r8, 8
or ecx, eax
dec r10
mov dword [r9 - 4], ecx
jne 0x18002c720
mov edi, dword [r14]
mov eax, reloc.WS2_32.dll_gethostbyname
mov r12, r13
cdq
idiv r13d
lea r11d, [rax + 6]
imul r11d, r11d, 0x9e3779b9
test r11d, r11d
je 0x18002c906
mov qword [rsp + 0x90], rbp
dec r13d
mov qword [rsp + 0x40], rsi
nop word [rax + rax]
mov r10d, r11d
mov ebx, r13d
shr r10d, 2
and r10d, 3
test r13d, r13d
jle 0x18002c8a9
mov ebp, r10d
lea rsi, [r14 + r12*4 - 4]
nop dword [rax + rax]
mov edx, dword [rsi - 4]
lea r8d, [rdi*4]
mov ecx, edi
shr ecx, 3
xor edi, r11d
mov eax, edx
shr eax, 5
add rsi, 0xfffffffffffffffc
xor r8d, eax
mov eax, edx
shl eax, 4
xor ecx, eax
mov eax, ebx
dec ebx
add r8d, ecx
and eax, 3
xor rax, rbp
mov ecx, dword [rsp + rax*4 + 0x20]
xor ecx, edx
add ecx, edi
xor r8d, ecx
sub dword [rsi + 4], r8d
mov edi, dword [rsi + 4]
test ebx, ebx
jg 0x18002c860
mov edx, dword [r14 + r12*4 - 4]
mov ecx, edi
lea r8d, [rdi*4]
shr ecx, 3
mov eax, edx
xor edi, r11d
shr eax, 5
xor r8d, eax
mov eax, edx
shl eax, 4
xor ecx, eax
mov eax, r10d
add r8d, ecx
mov ecx, ebx
and ecx, 3
xor rcx, rax
mov eax, dword [rsp + rcx*4 + 0x20]
xor eax, edx
add eax, edi
xor r8d, eax
sub dword [r14], r8d
add r11d, 0x61c88647
mov edi, dword [r14]
jne 0x18002c840
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x90]
mov eax, dword [r15 + 8]
mov rcx, qword [r15]
cdq
sub eax, edx
mov rdx, r14
sar eax, 1
movsxd r8, eax
mov dword [r15 + 8], eax
call sub.MSVCR100.dll_memcpy
mov rcx, r14
call qword [sym.imp.MSVCR100.dll_free]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.18003c580
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret