Function at 0x518611
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 0x518651
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 0x518651
mov eax, 0
jmp 0x5187da
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.0051854c
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x5187ab
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x44]
and eax, 8
test al, al
je 0x5187ab
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
js 0x5186ce
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 0x5186ce
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
test eax, eax
js 0x5186ce
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 0x5186da
mov dword [esp], str.regexp_returned_nonsense
call fcn.004b54c7
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
je 0x518702
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.00518384
test eax, eax
jne 0x518731
mov eax, dword [ebp + 0x18]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 0xc]
cmp edx, eax
je 0x51873a
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.00518384
test eax, eax
je 0x51873a
mov dword [ebp - 0xc], 0
jmp 0x51873b
nop
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov eax, dword [ebp + 0x18]
mov eax, dword [eax + 4]
cmp edx, eax
jne 0x518751
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0
jne 0x5187ab
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 0x5187ab
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
add eax, 1
add dword [ebp + 0xc], eax
jmp 0x51877a
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.00518384
test eax, eax
je 0x51879a
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jb 0x518776
or dword [ebp + 0x1c], 1
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x5187ab
jmp 0x518652
cmp dword [ebp - 0xc], 0
je 0x5187d7
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