Function at 0x140155394
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
lea eax, [rdx - 0x435]
mov rdi, rcx
bts rdi, 0x34
test edx, edx
mov ebp, 0xfffffbcc
cmovne ebp, eax
cmove rdi, rcx
lea rax, [rdi*4]
mov qword [rsp + 0x30], rax
test rcx, rcx
setne al
cmp edx, 2
setb r13b
or r13b, al
movzx r12d, r13b
test ebp, ebp
js 0x140155492
imul r15d, ebp, 0x13441
shr r15d, 0x12
cmp ebp, 4
adc r15d, 0xffffffff
imul eax, r15d, 0x12934f
shr eax, 0x13
mov ecx, r15d
sub ecx, ebp
lea r8d, [rcx + rax]
add r8d, 0x7d
mov rax, r15
shl rax, 4
lea rdx, [0x140320818]
add rdx, rax
mov dword [rsp + 0x28], r12d
lea r13, [rsp + 0x40]
mov qword [rsp + 0x20], r13
lea rbx, [rsp + 0x38]
mov rcx, rdi
mov r9, rbx
call fcn.140155924
mov rsi, rax
mov r14, qword [rbx]
mov rbx, qword [r13]
cmp r15d, 0x16
jae 0x14015557e
mov ecx, 5
mov r8, qword [rsp + 0x30]
mov rax, r8
xor edx, edx
div rcx
imul eax, eax, 0xfffffffb
add eax, r8d
jne 0x14015553e
mov rcx, r8
mov edx, r15d
call fcn.1401558c8
test al, al
je 0x14015557e
mov r9b, 1
xor r13d, r13d
jmp 0x140155576
mov eax, ebp
neg eax
imul r15d, ebp, 0xfff4d105
shr r15d, 0x14
xor ecx, ecx
cmp eax, 2
setge cl
sub r15d, ecx
add ebp, r15d
sub eax, r15d
imul ecx, eax, 0x12934f
shr ecx, 0x13
neg ecx
lea r8d, [r15 + rcx]
add r8d, 0x7c
shl rax, 4
lea rdx, [0x140321d78]
add rdx, rax
mov dword [rsp + 0x28], r12d
lea r12, [rsp + 0x40]
mov qword [rsp + 0x20], r12
lea rbx, [rsp + 0x38]
mov rcx, rdi
mov r9, rbx
call fcn.140155924
mov rsi, rax
mov r14, qword [rbx]
mov rbx, qword [r12]
cmp r15d, 2
jae 0x140155518
mov eax, edi
and eax, 1
sete cl
and r13b, cl
sub r14, rax
mov r9b, 1
jmp 0x14015561d
cmp r15d, 0x3f
jae 0x140155539
mov rax, 0xffffffffffffffff
mov ecx, r15d
shl rax, cl
not rax
test qword [rsp + 0x30], rax
je 0x140155617
mov r15d, ebp
jmp 0x14015557e
test dil, 1
je 0x14015555b
or r8, 2
mov rcx, r8
mov edx, r15d
call fcn.1401558c8
movzx eax, al
sub r14, rax
jmp 0x14015557e
mov ecx, r12d
not rcx
add rcx, r8
mov edx, r15d
call fcn.1401558c8
test al, al
je 0x14015557e
mov r13b, 1
xor r9d, r9d
mov ebp, r15d
jmp 0x14015561d
xor r10d, r10d
mov ecx, 0x64
mov rax, r14
xor edx, edx
div rcx
mov r8, rax
mov rax, rbx
xor edx, edx
div rcx
cmp r8, rax
jbe 0x1401555c5
mov r9, rax
mov rax, rsi
xor edx, edx
div rcx
imul ecx, eax, 0xffffff9c
add ecx, esi
cmp ecx, 0x32
setae r10b
mov ecx, 2
mov rbx, r9
mov r14, r8
mov rsi, rax
jmp 0x1401555c7
xor ecx, ecx
mov r9d, 0xa
mov rax, r14
xor edx, edx
div r9
mov r14, rax
mov rax, rbx
xor edx, edx
div r9
cmp r14, rax
jbe 0x140155606
mov r8, rax
mov rax, rsi
xor edx, edx
div r9
imul edx, eax, 0xfffffff6
add edx, esi
cmp edx, 5
setae r10b
inc ecx
mov rbx, r8
mov rsi, rax
jmp 0x1401555cd
cmp rsi, rbx
sete al
or al, r10b
mov ebp, r15d
jmp 0x1401556eb
mov r9b, 1
xor r13d, r13d
xor r10d, r10d
mov r11d, 0xa
xor ecx, ecx
mov rax, r14
xor edx, edx
div r11
mov r14, rax
mov rax, rbx
xor edx, edx
div r11
cmp r14, rax
jbe 0x140155675
mov r8, rax
imul r15d, r8d, 0xfffffff6
mov rax, rsi
xor edx, edx
div r11
imul edx, eax, 0xfffffff6
add dl, sil
add r15d, ebx
sete bl
and r13b, bl
test r10b, r10b
sete r10b
and r9b, r10b
inc ecx
mov r10d, edx
mov rbx, r8
mov rsi, rax
jmp 0x140155628
xor r13b, 1
test r13b, 1
jne 0x1401556bd
mov r11d, 0xa
mov rax, rbx
xor edx, edx
div r11
mov r8, rax
imul eax, r8d, 0xfffffff6
add eax, ebx
jne 0x1401556bd
mov rax, rsi
xor edx, edx
div r11
imul edx, eax, 0xfffffff6
add dl, sil
test r10b, r10b
sete r10b
and r9b, r10b
inc ecx
mov r10d, edx
mov rbx, r8
mov rsi, rax
jmp 0x140155685
mov eax, esi
and al, 1
or al, 4
movzx edx, r10b
movzx eax, al
test r9b, 1
cmove eax, edx
cmp dl, 5
cmovne eax, edx
cmp rsi, rbx
sete dl
or dil, r13b
and dil, dl
cmp al, 5
setae al
or al, dil
add ecx, ebp
movzx eax, al
and eax, 1
add rax, rsi
mov edx, ecx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret