Function at 0x4a81a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [ebp + 8]
push ebx
mov dword [esp + 0x3c], edx
mov edx, dword [edx]
mov ebx, edx
mov eax, dword [eax]
mov dword [esp + 0x24], ebx
mov ebx, dword [ebp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x58], eax
push esi
lea eax, [ebx + 6]
mov dword [esp + 0x60], edx
mov esi, 0xfffffffe
mov dword [esp + 0xc], eax
cmp byte [edx], 0x7f
push edi
mov edi, dword [ebp + 0x2c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], esi
jne 0x4a822e
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 4]
shl ecx, 8
or ecx, eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x58], eax
xor eax, eax
mov word [esp + 0x5e], ax
lea eax, [esp + 0x58]
mov dword [esp + 0x40], ecx
mov word [esp + 0x5c], cx
mov dword [edi + 0x20], eax
lea eax, [edx + 1]
add ebx, 3
mov byte [eax], 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x50], eax
add ebx, edx
lea eax, [edx + 2]
xor edx, edx
mov byte [eax], 0
cmp dword [ebp + 0x30], edx
mov dword [esp + 0x54], eax
mov eax, dword [edi + 0x38]
cmove ecx, edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
cmp dword [ebp + 0x14], 0
mov dword [esp + 0x18], ebx
je 0x4a826f
mov dword [edi + 0x38], eax
cmp dword [ebp + 0x10], 0
je 0x4a8290
lea eax, [ebx + 1]
mov byte [ebx], 0x76
mov word [eax], 0
mov dword [esp + 0x3c], eax
add eax, 2
add dword [esp + 0x10], 3
mov dword [esp + 0x18], eax
push ecx
push edi
push dword [ebp + 0x1c]
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x48]
push eax
push dword [ebp + 0xc]
lea eax, [esp + 0x3c]
push eax
lea edx, [esp + 0x38]
lea ecx, [esp + 0x58]
call fcn.004a4980
add esp, 0x20
test eax, eax
je 0x4a8414
mov eax, dword [edi + 0x38]
cmp eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
cmovle eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x30]
test eax, eax
jne 0x4a8395
cmp byte [edx], 0x71
mov eax, dword [esp + 0x34]
je 0x4a82fe
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
jmp 0x4a834a
mov ecx, dword [esp + 0x28]
test ecx, ecx
js 0x4a8318
cmp ecx, eax
je 0x4a832b
test esi, esi
cmovns ecx, esi
mov esi, ecx
or ecx, 0xffffffff
mov dword [esp + 0x28], ecx
test eax, eax
js 0x4a832b
mov ecx, dword [esp + 0x24]
test ecx, ecx
cmovs ecx, eax
mov dword [esp + 0x24], ecx
jmp 0x4a832f
mov ecx, dword [esp + 0x24]
mov eax, ecx
xor eax, esi
test eax, 0xdfffffff
je 0x4a8344
mov dword [esp + 0x1c], 0xffffffff
jmp 0x4a834a
or esi, ecx
mov dword [esp + 0x1c], esi
cmp dword [ebp + 0x10], 0
je 0x4a8392
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
shr edx, 0xb
push edi
push 0
and edx, 1
mov byte [ebx], 0
call fcn.004a37c0
mov ecx, eax
add esp, 8
cmp ecx, 0xfffffffd
jne 0x4a837c
mov dword [edi + 0x5c], 1
jmp 0x4a838e
test ecx, ecx
js 0x4a83f5
mov edx, dword [esp + 0x3c]
mov eax, ecx
sar eax, 8
mov byte [edx], al
mov byte [edx + 1], cl
mov edx, dword [esp + 0x14]
mov eax, dword [ebp + 0x30]
mov edi, dword [esp + 0x20]
cmp byte [edi], 0x7c
jne 0x4a8426
test eax, eax
je 0x4a83bb
mov eax, dword [esp + 0x44]
mov ebx, dword [ebp + 0x18]
add ebx, 3
mov eax, dword [eax]
add ebx, eax
add dword [esp + 0x10], 3
jmp 0x4a83dc
mov eax, ebx
mov byte [ebx], 0x71
sub eax, edx
mov esi, ebx
sar eax, 8
mov byte [ebx + 1], al
mov al, bl
sub al, dl
mov dword [esp + 0x14], esi
mov byte [ebx + 2], al
mov dword [esp + 0x64], ebx
add ebx, 3
mov esi, dword [esp + 0x1c]
inc edi
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x20], edi
mov edi, dword [ebp + 0x2c]
jmp 0x4a8262
cmp ecx, 0xfffffffe
jne 0x4a83ff
lea eax, [ecx + 0x26]
jmp 0x4a840f
cmp ecx, 0xfffffffc
mov eax, 0x19
mov edx, 0x46
cmove eax, edx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x20]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x4a8452
mov esi, dword [esp + 0x14]
mov edx, ebx
sub edx, esi
movzx ecx, byte [esi + 1]
movzx eax, byte [esi + 2]
shl ecx, 8
or ecx, eax
mov byte [esi + 2], dl
mov eax, edx
mov edx, ecx
sar eax, 8
mov byte [esi + 1], al
sub esi, edx
test ecx, ecx
jne 0x4a8432
mov ecx, dword [esp + 0x2c]
mov eax, ebx
mov esi, dword [ebp + 0x2c]
sub eax, ecx
sar eax, 8
mov byte [ebx], 0x72
mov byte [ebx + 1], al
mov al, bl
sub al, cl
mov byte [ebx + 2], al
add ebx, 3
cmp dword [esp + 0x40], 0
jbe 0x4a84e4
mov eax, dword [esi + 0x20]
cmp word [eax + 6], 0
je 0x4a84d9
mov eax, ebx
sub eax, ecx
push eax
push ecx
lea eax, [ecx + 3]
push eax
call fcn.004aff90
mov eax, dword [esp + 0x38]
lea edx, [ebx + 3]
mov ebx, dword [esp + 0x38]
mov ecx, edx
sub ecx, eax
add esp, 0xc
sar ecx, 8
mov byte [eax], 0x7b
mov eax, dword [esp + 0x50]
mov byte [eax], cl
mov al, dl
sub al, bl
mov ebx, dword [esp + 0x54]
mov byte [ebx], al
lea ebx, [edx + 3]
mov byte [edx], 0x72
mov byte [edx + 1], cl
mov byte [edx + 2], al
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x20]
add ecx, 6
mov dword [esp + 0x10], ecx
mov eax, dword [eax]
mov dword [esi + 0x20], eax
jmp 0x4a84e8
mov eax, dword [eax]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x20], eax
jmp 0x4a84e8
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x38], eax
mov eax, dword [esp + 0x44]
mov dword [eax], ebx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x30]
mov dword [eax], edi
mov eax, dword [ebp + 0x20]
mov edi, dword [esp + 0x28]
mov dword [eax], edi
mov eax, dword [ebp + 0x24]
mov dword [eax], edx
test ebx, ebx
je 0x4a8537
mov edx, dword [ebx]
mov eax, 0x7fffffeb
sub eax, edx
cmp eax, ecx
jge 0x4a8532
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edx + ecx]
mov dword [ebx], eax
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret