Function at 0x140182230
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x58
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x70], rax
jne 0x140182256
jmp 0x1401824ff
movsxd rax, dword [rsp + 0x80]
mov rcx, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x70]
mov rdx, qword [rdx + 0x10]
mov rcx, qword [rcx + 8]
sub rcx, rdx
sar rcx, 4
cmp rax, rcx
jle 0x1401822a3
lea r9, [0x1403d8878]
mov r8d, 0x9e
lea rdx, [0x1403d8900]
lea rcx, str._n_____from__top___from__base_
call fcn.140048260
test eax, eax
je 0x1401822a3
int3
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x18]
cmp qword [rax + 0x18], rcx
je 0x1401822de
lea r9, [0x1403d8948]
mov r8d, 0x9f
lea rdx, [0x1403d89d0]
lea rcx, [0x1403d8888]
call fcn.140048260
test eax, eax
je 0x1401822de
int3
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x20]
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 8]
mov rax, qword [rax + 0x10]
sub rax, rcx
sar rax, 4
movsxd rcx, dword [rsp + 0x80]
cmp rax, rcx
jge 0x14018232f
lea r9, [0x1403d8a18]
mov r8d, 0xa0
lea rdx, [0x1403d8aa0]
lea rcx, str.to__ci__top___to__top___n
call fcn.140048260
test eax, eax
je 0x14018232f
int3
mov rax, qword [rsp + 0x78]
movzx eax, byte [rax]
cmp eax, 5
jge 0x140182363
lea r9, [0x1403d8ae8]
mov r8d, 0xa1
lea rdx, [0x1403d8b70]
lea rcx, [0x1403d88a8]
call fcn.140048260
test eax, eax
je 0x140182363
int3
mov rax, qword [rsp + 0x78]
movzx eax, byte [rax + 1]
and eax, 4
test eax, eax
je 0x1401823c9
mov rax, qword [rsp + 0x78]
add rax, 0x68
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x78]
movzx eax, byte [rax]
cmp eax, 5
jge 0x1401823b5
lea r9, [0x1403d8bb8]
mov r8d, 0xa1
lea rdx, [0x1403d8c40]
lea rcx, [0x1403d8978]
call fcn.140048260
test eax, eax
je 0x1401823b5
int3
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x78]
call fcn.1401945b0
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 8]
mov qword [rsp + 0x38], rax
movsxd rax, dword [rsp + 0x80]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x70]
mov rcx, qword [rcx + 8]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], 0
jmp 0x14018240b
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x80]
cmp dword [rsp + 0x20], eax
jge 0x1401824d1
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rdi, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x48]
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0xc], 5
jl 0x1401824cc
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
movzx eax, byte [rax]
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + 0xc], eax
jne 0x1401824a5
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
movzx eax, byte [rax + 1]
and eax, 0xb
mov rcx, qword [rsp + 0x78]
mov rcx, qword [rcx + 0x18]
movzx ecx, byte [rcx + 0x20]
xor ecx, 3
and ecx, 3
cmp eax, ecx
jne 0x1401824cc
lea r9, str.lua_xmove
mov r8d, 0xa6
lea rdx, [0x1403d8cf0]
lea rcx, [0x1403d8d60]
call fcn.140048260
test eax, eax
je 0x1401824cc
int3
jmp 0x140182401
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x30]
mov qword [rax + 8], rcx
movsxd rax, dword [rsp + 0x80]
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x78]
mov qword [rcx + 8], rax
add rsp, 0x58
pop rdi
pop rsi
ret