Function at 0x494ef0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x34]
push ebp
cdq
push esi
mov ebp, eax
mov eax, dword [ebx + 4]
xor ebp, edx
sub ebp, edx
cmp ebp, dword [esp + 0x44]
mov esi, ebp
mov ecx, ebp
mov dword [esp + 0x28], ebp
cmovl esi, dword [esp + 0x44]
sub eax, dword [ebx + 8]
imul esi, eax
cmp ebp, dword [esp + 0x4c]
mov ebp, dword [esp + 0x30]
cmovl ecx, dword [esp + 0x4c]
imul ecx, dword [ebx + 8]
push edi
push 0
add esi, ecx
mov ecx, ebp
sub esi, dword [ebx + 0xc]
add esi, dword [esp + 0x3c]
push esi
call fcn.0048d840
mov eax, dword [ebp + 4]
mov edi, 0x5e2da0
mov ebx, dword [esp + 0x3c]
test eax, eax
mov dword [esp + 0x18], 0
cmovne edi, eax
mov eax, dword [esp + 0x38]
lea eax, [ebx + eax*2]
mov dword [esp + 0x10], eax
cmp ebx, eax
je 0x495128
cmp word [ebx], 0x25
mov dword [esp + 0x14], ebx
je 0x494f89
nop word [eax + eax]
add ebx, 2
cmp word [ebx], 0x25
jne 0x494f80
movzx eax, word [ebx + 2]
mov dword [esp + 0x24], ebx
mov ecx, eax
add ebx, 2
mov dword [esp + 0x28], ecx
mov esi, eax
cmp eax, 0x4c
jne 0x494fa8
movzx esi, word [ebx + 2]
add ebx, 2
call fcn.00496010
test al, al
je 0x494fc6
movzx eax, si
push eax
call fcn.004937d0
add esp, 4
movsx ebp, word [eax + 2]
sar ebp, 0xb
jmp 0x494fd5
lea eax, [esi - 0x30]
cmp ax, 9
ja 0x495037
movzx ebp, si
sub ebp, 0x30
cmp ebp, 0xffffffff
je 0x49503a
lea eax, [ebx + 2]
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x10]
je 0x49503a
mov si, word [eax]
mov word [esp + 0x1c], si
call fcn.00496010
test al, al
je 0x49500d
movzx eax, si
push eax
call fcn.004937d0
add esp, 4
movsx ecx, word [eax + 2]
sar ecx, 0xb
jmp 0x495020
mov eax, dword [esp + 0x1c]
add eax, 0xffffffd0
cmp ax, 9
ja 0x49503a
movzx ecx, si
sub ecx, 0x30
cmp ecx, 0xffffffff
je 0x49503a
mov ebx, dword [esp + 0x20]
lea eax, [ebp*4]
add eax, ebp
lea ebp, [ecx + eax*2]
jmp 0x49503a
or ebp, 0xffffffff
mov eax, dword [esp + 0x40]
cmp ebp, dword [eax]
mov eax, dword [esp + 0x14]
je 0x49505f
mov esi, ebx
sub esi, eax
and esi, 0xfffffffe
push esi
push eax
push edi
call fcn.00597bd0
add esp, 0xc
add edi, esi
jmp 0x4950f2
mov ebp, dword [esp + 0x24]
add ebx, 2
sub ebp, eax
and ebp, 0xfffffffe
push ebp
push eax
push edi
call fcn.00597bd0
add edi, ebp
lea eax, [esp + 0x5c]
mov ebp, dword [esp + 0x38]
lea ecx, [esp + 0x54]
add esp, 0xc
cmp word [esp + 0x28], 0x4c
cmovne eax, ecx
mov esi, dword [eax]
sub ebp, esi
cmp dword [esp + 0x44], 0
mov edx, dword [eax + 4]
jle 0x4950b1
mov ecx, ebp
test ebp, ebp
jle 0x4950b1
mov ax, word [esp + 0x58]
dec ecx
mov word [edi], ax
add edi, 2
test ecx, ecx
jg 0x4950a1
add esi, esi
push esi
push edx
push edi
call fcn.00597bd0
add esp, 0xc
add edi, esi
cmp dword [esp + 0x44], 0
jge 0x4950e0
test ebp, ebp
jle 0x4950e0
nop dword [eax + eax]
mov ax, word [esp + 0x58]
dec ebp
mov word [edi], ax
add edi, 2
test ebp, ebp
jg 0x4950d0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 4]
je 0x495108
cmp ebx, dword [esp + 0x10]
jne 0x494f70
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x10]
sub eax, ebx
and eax, 0xfffffffe
push eax
push ebx
push edi
call fcn.00597bd0
mov eax, dword [esp + 0x40]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x20
ret