Function at 0x180023990
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x38]
mov dword [rsp + 0x30], eax
mov rdx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0x94]
mov eax, dword [rdx + 0x50]
sub eax, ecx
mov rcx, qword [rsp + 0x50]
sub eax, dword [rcx + 0x8c]
mov dword [rsp + 0x2c], eax
cmp dword [rsp + 0x2c], 0
jne 0x1800239f9
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x8c], 0
jne 0x1800239f9
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x94], 0
jne 0x1800239f9
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x2c], eax
jmp 0x180023ba7
cmp dword [rsp + 0x2c], 0xffffffff
jne 0x180023a10
mov eax, dword [rsp + 0x2c]
sub eax, 1
mov dword [rsp + 0x2c], eax
jmp 0x180023ba7
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0x38]
mov eax, dword [rsp + 0x30]
lea ecx, [rax + rcx - 0x106]
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x8c], ecx
jb 0x180023ba7
mov r8d, dword [rsp + 0x30]
mov edx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x50]
add rdx, qword [rax + 0x48]
mov rcx, qword [rsp + 0x50]
mov rcx, qword [rcx + 0x48]
call fcn.18004e6a0
mov r11, qword [rsp + 0x50]
mov eax, dword [rsp + 0x30]
mov ecx, dword [r11 + 0x90]
sub ecx, eax
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x90], ecx
mov rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x30]
mov ecx, dword [rcx + 0x8c]
sub ecx, eax
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x8c], ecx
mov rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x30]
mov ecx, dword [rcx + 0x7c]
sub ecx, eax
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x7c], ecx
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6c]
mov dword [rsp + 0x28], eax
mov ecx, dword [rsp + 0x28]
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x60]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
sub rax, 2
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x34], eax
jb 0x180023af9
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
sub eax, ecx
mov dword [rsp + 0x38], eax
jmp 0x180023b01
mov dword [rsp + 0x38], 0
mov rcx, qword [rsp + 0x20]
movzx eax, word [rsp + 0x38]
mov word [rcx], ax
mov eax, dword [rsp + 0x28]
sub eax, 1
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
jne 0x180023ac5
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov ecx, dword [rsp + 0x28]
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x58]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
sub rax, 2
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x34], eax
jb 0x180023b72
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
sub eax, ecx
mov dword [rsp + 0x3c], eax
jmp 0x180023b7a
mov dword [rsp + 0x3c], 0
mov rcx, qword [rsp + 0x20]
movzx eax, word [rsp + 0x3c]
mov word [rcx], ax
mov eax, dword [rsp + 0x28]
sub eax, 1
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
jne 0x180023b3e
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x2c]
add eax, ecx
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x50]
mov rax, qword [rax]
cmp dword [rax + 8], 0
jne 0x180023bba
jmp 0x180023ca3
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x8c]
mov rdx, qword [rsp + 0x50]
mov rdx, qword [rdx + 0x48]
add rdx, rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x94]
add rdx, rax
mov r8d, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0x50]
mov rcx, qword [rcx]
call fcn.180023cb0
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0x94]
add ecx, dword [rsp + 0x28]
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x94], ecx
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x94], 3
jb 0x180023c80
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0x8c]
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x48]
movzx ecx, byte [rax + rcx]
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x68], ecx
mov rax, qword [rsp + 0x50]
mov ecx, dword [rax + 0x78]
mov rax, qword [rsp + 0x50]
mov edx, dword [rax + 0x68]
shl edx, cl
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x8c]
add eax, 1
mov ecx, eax
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x48]
movzx eax, byte [rax + rcx]
mov ecx, edx
xor ecx, eax
mov rax, qword [rsp + 0x50]
and ecx, dword [rax + 0x74]
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x68], ecx
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x94], 0x106
jae 0x180023ca3
mov rax, qword [rsp + 0x50]
mov rax, qword [rax]
cmp dword [rax + 8], 0
jne 0x1800239a5
add rsp, 0x48
ret