Function at 0x14018d400
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov r8, qword [r8]
movsxd rbx, r9d
mov rsi, rcx
test rbx, rbx
je 0x14018d550
movzx ecx, byte [r8]
cmp rbx, 1
je 0x14018d580
test cl, cl
jne 0x14018d4f0
xor cl, byte [r8 + 1]
jns 0x14018d778
lea rdi, [rbx - 1]
cmp rdi, 8
ja 0x14018d520
lea rcx, [rsp + 0x38]
mov r9, rbx
call fcn.14018b730
movzx eax, byte [rsp + 0x38]
cmp rdi, 1
je 0x14018d4d7
movzx edx, byte [rsp + 0x39]
shl rax, 8
or rax, rdx
cmp rdi, 2
je 0x14018d4d7
movzx edx, byte [rsp + 0x3a]
shl rax, 8
or rax, rdx
cmp rdi, 3
je 0x14018d4d7
movzx edx, byte [rsp + 0x3b]
shl rax, 8
or rax, rdx
cmp rdi, 4
je 0x14018d4d7
movzx edx, byte [rsp + 0x3c]
shl rax, 8
or rax, rdx
cmp rdi, 5
je 0x14018d4d7
movzx edx, byte [rsp + 0x3d]
shl rax, 8
or rax, rdx
cmp rdi, 6
je 0x14018d4d7
movzx edx, byte [rsp + 0x3e]
shl rax, 8
or rax, rdx
cmp rdi, 8
jne 0x14018d4d7
movzx edx, byte [rsp + 0x3f]
shl rax, 8
or rax, rdx
mov qword [rsi], rax
mov eax, 1
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
cmp cl, 0xff
je 0x14018d5a0
cmp rbx, 8
ja 0x14018d520
lea rcx, [rsp + 0x38]
mov r9, rbx
mov rdi, rbx
call fcn.14018b730
movzx eax, byte [rsp + 0x38]
jmp 0x14018d45f
mov r8d, 0xdf
mov edx, 0x65
mov ecx, 0xd
mov dword [rsp + 0x20], 0x267
lea r9, str.crypto_asn1_a_int.c
call fcn.1401d1f90
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov r8d, 0xde
mov edx, 0xe2
mov ecx, 0xd
mov dword [rsp + 0x20], 0x9a
lea r9, str.crypto_asn1_a_int.c
call fcn.1401d1f90
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rsp + 0x38]
mov r9d, 1
call fcn.14018b730
movzx eax, byte [rsp + 0x38]
jmp 0x14018d4d7
lea rax, [rbx - 2]
lea r10, [rbx - 1]
cmp rax, 0xe
jbe 0x14018d7a3
mov r9, r10
pxor xmm3, xmm3
pxor xmm4, xmm4
mov rax, r8
and r9, 0xfffffffffffffff0
pxor xmm2, xmm2
add r9, r8
nop dword [rax + rax]
movdqu xmm0, xmmword [rax + 1]
add rax, 0x10
movdqa xmm1, xmm0
punpckhbw xmm0, xmm4
movdqa xmm5, xmm0
punpcklbw xmm1, xmm4
punpckhwd xmm0, xmm2
punpcklwd xmm5, xmm2
por xmm0, xmm5
movdqa xmm5, xmm1
punpckhwd xmm1, xmm2
punpcklwd xmm5, xmm2
por xmm1, xmm5
por xmm0, xmm1
por xmm3, xmm0
cmp rax, r9
jne 0x14018d5d0
movdqa xmm0, xmm3
mov r11, r10
psrldq xmm0, 8
and r11, 0xfffffffffffffff0
por xmm3, xmm0
lea r9, [r11 + 1]
movdqa xmm0, xmm3
psrldq xmm0, 4
por xmm3, xmm0
movd eax, xmm3
cmp r11, r10
je 0x14018d768
movzx r10d, byte [r8 + r9]
or eax, r10d
lea r10, [r9 + 1]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 1]
or eax, r10d
lea r10, [r9 + 2]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 2]
or eax, r10d
lea r10, [r9 + 3]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 3]
or eax, r10d
lea r10, [r9 + 4]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 4]
or eax, r10d
lea r10, [r9 + 5]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 5]
or eax, r10d
lea r10, [r9 + 6]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 6]
or eax, r10d
lea r10, [r9 + 7]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 7]
or eax, r10d
lea r10, [r9 + 8]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 8]
or eax, r10d
lea r10, [r9 + 9]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 9]
or eax, r10d
lea r10, [r9 + 0xa]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 0xa]
or eax, r10d
lea r10, [r9 + 0xb]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 0xb]
or eax, r10d
lea r10, [r9 + 0xc]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 0xc]
or eax, r10d
lea r10, [r9 + 0xd]
cmp rbx, r10
jbe 0x14018d768
movzx r10d, byte [r8 + r9 + 0xd]
or eax, r10d
lea r10, [r9 + 0xe]
cmp rbx, r10
jbe 0x14018d768
movzx r9d, byte [r8 + r9 + 0xe]
or eax, r9d
nop dword [rax]
test eax, eax
jne 0x14018d42f
jmp 0x14018d4f9
mov r8d, 0xdd
mov edx, 0xe2
mov ecx, 0xd
mov dword [rsp + 0x20], 0xbb
lea r9, str.crypto_asn1_a_int.c
call fcn.1401d1f90
xor eax, eax
jmp 0x14018d546
xor eax, eax
mov r9d, 1
jmp 0x14018d644