Function at 0x180059150
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov qword [rdx + 0x18], 0xf
xor edi, edi
mov qword [rdx + 0x10], rdi
mov r14, rdx
mov byte [rdx], dil
mov rbp, rcx
mov eax, r8d
lea rdx, [rsp + 0xb8]
lea r15, [rax*8]
mov rax, qword [rcx + 0x70]
mov r8, qword [r15 + rax]
mov rcx, qword [r8 + 0x20]
call fcn.18000a090
xor sil, sil
lea r13d, [rdi + 0x57]
mov ebx, edi
lea r12, [0x18028a9a8]
mov ecx, dword [rax]
mov dword [rsp + 0xa8], ecx
mov byte [0x18028a9a8], sil
nop dword [rax]
movzx ecx, byte [rsp + rbx + 0xa8]
lea r8, [rsp + 0xa0]
mov eax, 0xcccccccd
mul ecx
shr edx, 3
lea eax, [rdx + rdx*4]
add eax, eax
sub ecx, eax
mov eax, 0x30
cmp ecx, 0xa
cmovge eax, r13d
add al, cl
mov ecx, edx
mov byte [r8], al
inc r8
test edx, edx
jg 0x1800591d0
lea rax, [rsp + 0xa0]
mov byte [r8], dil
sub r8d, eax
mov r10d, edi
mov r11d, r8d
shr r11d, 1
je 0x18005924c
lea r9, [rsp + 0xa0]
nop dword [rax]
movzx edx, byte [r9]
lea rcx, [rsp + 0xa0]
mov eax, r8d
lea r9, [r9 + 1]
sub eax, r10d
inc r10d
dec eax
add rcx, rax
movzx eax, byte [rcx]
mov byte [r9 - 1], al
mov byte [rcx], dl
cmp r10d, r11d
jb 0x180059220
mov ecx, edi
test sil, sil
je 0x18005925b
inc ecx
cmp byte [rcx + r12], dil
jne 0x180059253
lea rdx, [rsp + 0xa0]
add rcx, r12
nop word [rax + rax]
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov byte [rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x180059270
cmp rbx, 3
jae 0x1800592c1
cmp byte [0x18028a9a8], dil
mov ecx, edi
je 0x18005929a
inc ecx
cmp byte [rcx + r12], dil
jne 0x180059292
mov eax, ecx
lea rdx, [0x18027a378]
add rax, r12
nop word [rax + rax]
movzx ecx, byte [rdx]
lea rdx, [rdx + 1]
mov byte [rax], cl
lea rax, [rax + 1]
test cl, cl
jne 0x1800592b0
inc rbx
cmp rbx, 4
jge 0x1800592d6
movzx esi, byte [0x18028a9a8]
jmp 0x1800591c0
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [r12 + r8], dil
jne 0x1800592e0
mov rdx, r12
mov rcx, r14
call fcn.18023c100
xor eax, eax
mov word [rsp + 0xb0], 0x28d
mov byte [rsp + 0xb2], al
movabs r9, 0xaaaaaaaaaaaaaaab
mov qword [rsp + 0x20], rdi
mov rax, qword [rsp + 0x20]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x20]
mov rax, qword [rsp + 0x20]
movzx r8d, byte [rsp + rax + 0xb1]
mov rax, r9
mul rcx
shr rdx, 4
movzx eax, dl
add al, al
add dl, al
mov rax, qword [rsp + 0x20]
shl dl, 3
sub cl, dl
mov edx, 0x6d62bf38
sar edx, cl
xor dl, r8b
mov byte [rsp + rax + 0xb1], dl
mov rax, qword [rsp + 0x20]
inc rax
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
cmp rax, 1
jb 0x180059320
mov byte [rsp + 0xb2], dil
lea rax, [rsp + 0xb1]
mov r8, rbx
nop word [rax + rax]
inc r8
cmp byte [rax + r8], dil
jne 0x180059390
lea rdx, [rsp + 0xb1]
mov rcx, r14
call fcn.18023c260
mov rax, qword [rbp + 0x70]
lea r9, [rsp + 0x28]
mov rcx, qword [r15 + rax]
movzx r8d, word [rcx + 0x4c8]
nop
mov eax, 0xcccccccd
mul r8d
shr edx, 3
lea eax, [rdx + rdx*4]
add eax, eax
sub r8d, eax
mov eax, 0x30
cmp r8d, 0xa
cmovge eax, r13d
add al, r8b
mov r8d, edx
mov byte [r9], al
inc r9
test edx, edx
jg 0x1800593c0
lea rax, [rsp + 0x28]
mov byte [r9], dil
sub r9d, eax
mov r10d, r9d
shr r10d, 1
je 0x180059437
lea r8, [rsp + 0x28]
nop dword [rax + rax]
movzx edx, byte [r8]
lea rcx, [rsp + 0x28]
mov eax, r9d
lea r8, [r8 + 1]
sub eax, edi
inc edi
dec eax
add rcx, rax
movzx eax, byte [rcx]
mov byte [r8 - 1], al
mov byte [rcx], dl
cmp edi, r10d
jb 0x180059410
lea rax, [rsp + 0x28]
nop dword [rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x180059440
mov r8, rbx
lea rdx, [rsp + 0x28]
mov rcx, r14
call fcn.18023c260
mov rax, r14
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret