Function at 0x5188cd
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x51890d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp eax, 1
sete dl
cmp dword [ebp + 0x14], 0
sete al
xor eax, edx
test al, al
je 0x51890d
mov eax, 0
jmp 0x518a96
nop
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00518808
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x518a67
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x44]
and eax, 8
test al, al
je 0x518a67
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
js 0x51898a
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 0xc]
mov edx, eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
cmp edx, eax
jl 0x51898a
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
test eax, eax
js 0x51898a
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 0xc]
mov edx, eax
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
cmp edx, eax
jge 0x518996
mov dword [esp], str.regexp_returned_nonsense
call fcn.004ae00f
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
je 0x5189be
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
lea edx, [eax - 1]
mov eax, dword [ebp + 0xc]
add eax, edx
movzx eax, byte [eax]
movsx eax, al
mov dword [esp], eax
call fcn.00518640
test eax, eax
jne 0x5189ed
mov eax, dword [ebp + 0x18]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 0xc]
cmp edx, eax
je 0x5189f6
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
mov edx, eax
mov eax, dword [ebp + 0xc]
add eax, edx
movzx eax, byte [eax]
movsx eax, al
mov dword [esp], eax
call fcn.00518640
test eax, eax
je 0x5189f6
mov dword [ebp - 0xc], 0
jmp 0x5189f7
nop
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
cmp edx, eax
jne 0x518a0d
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0
jne 0x518a67
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
lea edx, [eax + 1]
mov eax, dword [ebp + 0xc]
add eax, edx
cmp dword [ebp + 0x10], eax
jbe 0x518a67
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
add eax, 1
add dword [ebp + 0xc], eax
jmp 0x518a36
add dword [ebp + 0xc], 1
mov eax, dword [ebp + 0xc]
sub eax, 1
movzx eax, byte [eax]
movsx eax, al
mov dword [esp], eax
call fcn.00518640
test eax, eax
je 0x518a56
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jb 0x518a32
or dword [ebp + 0x1c], 1
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x518a67
jmp 0x51890e
cmp dword [ebp - 0xc], 0
je 0x518a93
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x10]
add edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x10]
add edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0xc]
leave
ret