Function at 0x4967f0
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.0048f140
mov eax, dword [ebp + 4]
mov edi, 0x5e7030
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 0x496a28
cmp word [ebx], 0x25
mov dword [esp + 0x14], ebx
je 0x496889
nop word [eax + eax]
add ebx, 2
cmp word [ebx], 0x25
jne 0x496880
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 0x4968a8
movzx esi, word [ebx + 2]
add ebx, 2
call fcn.00497910
test al, al
je 0x4968c6
movzx eax, si
push eax
call fcn.004950d0
add esp, 4
movsx ebp, word [eax + 2]
sar ebp, 0xb
jmp 0x4968d5
lea eax, [esi - 0x30]
cmp ax, 9
ja 0x496937
movzx ebp, si
sub ebp, 0x30
cmp ebp, 0xffffffff
je 0x49693a
lea eax, [ebx + 2]
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x10]
je 0x49693a
mov si, word [eax]
mov word [esp + 0x1c], si
call fcn.00497910
test al, al
je 0x49690d
movzx eax, si
push eax
call fcn.004950d0
add esp, 4
movsx ecx, word [eax + 2]
sar ecx, 0xb
jmp 0x496920
mov eax, dword [esp + 0x1c]
add eax, 0xffffffd0
cmp ax, 9
ja 0x49693a
movzx ecx, si
sub ecx, 0x30
cmp ecx, 0xffffffff
je 0x49693a
mov ebx, dword [esp + 0x20]
lea eax, [ebp*4]
add eax, ebp
lea ebp, [ecx + eax*2]
jmp 0x49693a
or ebp, 0xffffffff
mov eax, dword [esp + 0x40]
cmp ebp, dword [eax]
mov eax, dword [esp + 0x14]
je 0x49695f
mov esi, ebx
sub esi, eax
and esi, 0xfffffffe
push esi
push eax
push edi
call fcn.00599570
add esp, 0xc
add edi, esi
jmp 0x4969f2
mov ebp, dword [esp + 0x24]
add ebx, 2
sub ebp, eax
and ebp, 0xfffffffe
push ebp
push eax
push edi
call fcn.00599570
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 0x4969b1
mov ecx, ebp
test ebp, ebp
jle 0x4969b1
mov ax, word [esp + 0x58]
dec ecx
mov word [edi], ax
add edi, 2
test ecx, ecx
jg 0x4969a1
add esi, esi
push esi
push edx
push edi
call fcn.00599570
add esp, 0xc
add edi, esi
cmp dword [esp + 0x44], 0
jge 0x4969e0
test ebp, ebp
jle 0x4969e0
nop dword [eax + eax]
mov ax, word [esp + 0x58]
dec ebp
mov word [edi], ax
add edi, 2
test ebp, ebp
jg 0x4969d0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 4]
je 0x496a08
cmp ebx, dword [esp + 0x10]
jne 0x496870
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.00599570
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