Function at 0x140030144
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x140045ee0]
xor rax, rsp
mov qword [rbp - 0x10], rax
xor ebx, ebx
mov r15, rdx
mov rdi, rcx
test rdx, rdx
je 0x1400301bf
xor eax, eax
lea r11d, [rbx + 1]
mov qword [rdx], rax
lea r12d, [rbx + 0xc]
mov edx, ebx
lea rcx, [0x140000000]
movzx ecx, word [rcx + rax*2 + 0x39b18]
movzx eax, word [rdi + rax*2]
cmp cx, ax
je 0x1400301f9
cmp cx, 0x23
jne 0x1400301af
cmp ax, 0x30
jb 0x1400301bf
cmp ax, 0x39
jbe 0x1400301ff
cmp cx, 0x2d
jne 0x1400301eb
sub ax, 0x2e
cmp ax, r11w
jbe 0x1400301ff
mov ebx, 0x80070057
mov eax, ebx
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140030780
mov rbx, qword [rsp + 0xa0]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp cx, 0x54
jne 0x14003020e
cmp ax, 0x20
jne 0x1400301bf
jmp 0x1400301ff
cmp cx, 0x53
je 0x1400301bf
add edx, r11d
mov eax, edx
cmp rax, r12
jae 0x1400301bf
jmp 0x140030185
cmp cx, 0x53
jne 0x1400301bf
mov r14d, edx
mov r13d, 0xfffd
mov esi, 2
movzx eax, word [rdi + r14*2]
sub ax, 0x2b
test r13w, ax
je 0x140030247
cmp word [rdi + r14*2], 0x5a
jne 0x140030287
lea eax, [rdx + 1]
cmp word [rdi + rax*2], bx
je 0x140030287
jmp 0x1400301bf
mov r9d, ebx
lea r8, str.:
add edx, r11d
movzx r10d, word [r8]
cmp r10w, 0x23
jne 0x14003026d
movzx ecx, word [rdi + rdx*2]
sub cx, 0x30
cmp cx, 9
jbe 0x140030278
cmp r10w, word [rdi + rdx*2]
jne 0x1400301bf
add r9d, r11d
add r8, rsi
add edx, r11d
cmp r9d, 6
jb 0x140030254
xorps xmm0, xmm0
mov rcx, rdi
movups xmmword [rbp - 0x20], xmm0
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wtol]
nop dword [rax + rax]
lea rcx, [rdi + 0xa]
mov word [rbp - 0x20], ax
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wtol]
nop dword [rax + rax]
lea rcx, [rdi + 0x10]
mov word [rbp - 0x1e], ax
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wtol]
nop dword [rax + rax]
movzx edx, word [rbp - 0x1e]
mov ecx, eax
mov word [rbp - 0x1a], cx
cmp dx, r12w
ja 0x1400301bf
cmp word [rbp - 0x18], 0x17
ja 0x1400301bf
cmp word [rbp - 0x16], 0x3b
ja 0x1400301bf
cmp word [rbp - 0x14], 0x3b
ja 0x1400301bf
cmp bx, dx
je 0x1400301bf
cmp bx, cx
je 0x1400301bf
mov eax, 0x641
cmp word [rbp - 0x20], ax
jb 0x1400301bf
lea r8, [0x140000000]
cmp cx, word [r8 + rdx*2 + 0x39afe]
jbe 0x14003037f
cmp cx, 0x1d
jne 0x1400301bf
cmp dx, si
jne 0x1400301bf
movzx r9d, word [rbp - 0x20]
test r9b, 3
jne 0x1400301bf
mov r10d, 0x51eb851f
mov eax, r10d
mul r9d
shr edx, 5
imul r8d, edx, 0x64
cmp r9d, r8d
jne 0x14003037f
mov eax, r10d
mul r9d
shr edx, 7
imul eax, edx, 0x190
cmp r9d, eax
jne 0x1400301bf
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x20]
call qword [sym.imp.api_ms_win_core_timezone_l1_1_0.dll_SystemTimeToFileTime]
nop dword [rax + rax]
mov eax, dword [rbp - 0x28]
mov dword [rbp - 0x30], eax
mov eax, dword [rbp - 0x24]
mov dword [rbp - 0x2c], eax
movzx eax, word [rdi + r14*2]
sub ax, 0x2b
test r13w, ax
jne 0x14003041a
lea rcx, [rdi + 2]
lea rcx, [rcx + r14*2]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wtol]
nop dword [rax + rax]
lea rcx, [rdi + 8]
mov esi, eax
lea rcx, [rcx + r14*2]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wtol]
nop dword [rax + rax]
cmp si, 0x17
ja 0x1400301bf
cmp ax, 0x3b
ja 0x1400301bf
movzx ecx, si
imul rdx, rcx, 0x3c
movzx eax, ax
add rdx, rax
mov rax, qword [rbp - 0x30]
imul rcx, rdx, 0x23c34600
cmp word [rdi + r14*2], 0x2b
jne 0x140030415
sub rax, rcx
mov qword [rbp - 0x30], rax
jmp 0x14003041e
add rax, rcx
jmp 0x14003040f
mov rax, qword [rbp - 0x30]
mov ecx, dword [rbp - 0x30]
shr rax, 0x20
mov dword [rbp - 0x24], eax
mov dword [rbp - 0x28], ecx
mov rax, qword [rbp - 0x28]
mov qword [r15], rax
jmp 0x1400301c4