Function at 0x4d2690
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x816078]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, edx
or edx, 0xffffffff
push ebx
push esi
mov dword [ebp - 0x38], eax
mov ebx, ecx
mov esi, dword [eax]
mov eax, dword [eax + 8]
push edi
xor edi, edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], esi
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x2c], ecx
xor ecx, ecx
mov dword [ebp - 0x28], eax
mov dword [ebx + 0x1450], 0
mov dword [ebx + 0x1454], 0x23d
test eax, eax
jle 0x4d2723
nop
cmp word [esi + ecx*4], 0
je 0x4d2709
inc dword [ebx + 0x1450]
mov edx, ecx
mov eax, dword [ebx + 0x1450]
mov dword [ebx + eax*4 + 0xb5c], ecx
mov eax, dword [ebp - 0x28]
mov byte [ebx + ecx + 0x1458], 0
jmp 0x4d2710
xor edi, edi
mov word [esi + ecx*4 + 2], di
inc ecx
cmp ecx, eax
jl 0x4d26e0
mov edi, dword [ebx + 0x1450]
mov dword [ebp - 0x30], edx
cmp edi, 2
jge 0x4d277d
xor eax, eax
lea ecx, [edx + 1]
cmp edx, 2
cmovge ecx, eax
lea eax, [edx + 1]
cmovge eax, edx
mov edx, eax
lea eax, [edi + 1]
mov dword [ebx + 0x1450], eax
mov dword [ebx + eax*4 + 0xb5c], ecx
mov eax, 1
mov word [esi + ecx*4], ax
mov eax, dword [ebp - 0x2c]
mov byte [ebx + ecx + 0x1458], 0
dec dword [ebx + 0x16a8]
test eax, eax
je 0x4d276f
movzx eax, word [eax + ecx*4 + 2]
sub dword [ebx + 0x16ac], eax
mov edi, dword [ebx + 0x1450]
cmp edi, 2
jl 0x4d2723
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x38]
mov dword [eax + 4], edx
mov ecx, dword [ebx + 0x1450]
mov eax, ecx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
cmp edi, 1
jl 0x4d27ad
push edi
mov edx, esi
mov ecx, ebx
call fcn.004d23a0
dec edi
cmp edi, 1
jge 0x4d2797
mov ecx, dword [ebx + 0x1450]
lea eax, [ebx + 0x1458]
mov dword [ebp - 0x2c], eax
nop word [eax + eax]
mov eax, dword [ebx + ecx*4 + 0xb5c]
mov edx, esi
mov edi, dword [ebx + 0xb60]
mov ecx, ebx
mov dword [ebx + 0xb60], eax
dec dword [ebx + 0x1450]
push 1
call fcn.004d23a0
mov ecx, dword [ebx + 0xb60]
dec dword [ebx + 0x1454]
lea esi, [esi + ecx*4]
mov eax, dword [ebx + 0x1454]
mov edx, dword [ebp - 0x34]
push 1
mov dword [ebx + eax*4 + 0xb5c], edi
dec dword [ebx + 0x1454]
mov eax, dword [ebx + 0x1454]
mov dword [ebx + eax*4 + 0xb5c], ecx
mov ax, word [esi]
add ax, word [edx + edi*4]
mov ebx, dword [ebp - 0x28]
mov word [edx + ebx*4], ax
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + ecx]
mov dl, byte [eax + edi]
cmp dl, cl
movzx eax, cl
mov ecx, dword [ebp - 0x28]
movzx ebx, dl
cmovb ebx, eax
mov eax, dword [ebp - 0x2c]
inc bl
mov byte [eax + ecx], bl
mov ebx, dword [ebp - 0x3c]
movzx eax, cx
mov word [esi + 2], ax
mov esi, dword [ebp - 0x34]
mov edx, esi
mov word [esi + edi*4 + 2], ax
mov dword [ebx + 0xb60], ecx
inc ecx
mov dword [ebp - 0x28], ecx
mov ecx, ebx
call fcn.004d23a0
mov ecx, dword [ebx + 0x1450]
cmp ecx, 2
jge 0x4d27c0
dec dword [ebx + 0x1454]
mov ecx, dword [ebx + 0x1454]
mov eax, dword [ebx + 0xb60]
mov edx, dword [ebp - 0x38]
mov dword [ebx + ecx*4 + 0xb5c], eax
mov ecx, ebx
call fcn.004d2480
xor edx, edx
add ebx, 0xb3c
lea ecx, [edx + 1]
mov ax, word [ebx]
lea ebx, [ebx + 2]
add ax, dx
add ax, ax
movzx edx, ax
mov word [ebp + ecx*2 - 0x24], dx
inc ecx
cmp ecx, 0xf
jle 0x4d28a7
mov ebx, dword [ebp - 0x30]
xor edi, edi
test ebx, ebx
js 0x4d2906
nop word [eax + eax]
movzx edx, word [esi + edi*4 + 2]
test edx, edx
je 0x4d2901
movzx eax, word [ebp + edx*2 - 0x24]
mov esi, eax
inc eax
mov word [ebp + edx*2 - 0x24], ax
xor eax, eax
mov ecx, esi
dec edx
and ecx, 1
shr esi, 1
or eax, ecx
add eax, eax
test edx, edx
jg 0x4d28e8
mov esi, dword [ebp - 0x34]
shr eax, 1
mov word [esi + edi*4], ax
inc edi
cmp edi, ebx
jle 0x4d28d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0064c681
mov esp, ebp
pop ebp
ret