Function at 0x4e8e4c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov edx, dword [edi + 0x3c]
cmp edx, 0x103
jae 0x4e8e95
push edi
call fcn.004df120
add esp, 4
mov edx, dword [edi + 0x3c]
test ebp, ebp
jne 0x4e8e80
cmp edx, 0x103
jb 0x4e903e
test edx, edx
je 0x4e9045
mov eax, dword [edi + 0x68]
cmp edx, 2
ja 0x4e8e98
mov esi, dword [edi + 0x48]
jmp 0x4e8ee5
mov eax, dword [edi + 0x68]
mov esi, dword [edi + 0x48]
test eax, eax
je 0x4e8ee3
mov bl, byte [esi + eax - 1]
cmp bl, byte [esi + eax]
jne 0x4e8ee5
lea ecx, [esi + eax]
cmp bl, byte [ecx + 1]
jne 0x4e8ee5
mov dword [esp], esi
movzx esi, word [ecx - 1]
mov ebx, esi
shl ebx, 0x10
or ebx, esi
xor ebp, ebp
mov esi, dword [ecx + ebp + 2]
xor esi, ebx
jne 0x4e8f9b
lea esi, [ebp + 4]
cmp ebp, 0xfc
mov ebp, esi
jb 0x4e8ec0
mov ecx, 0x100
jmp 0x4e8fa3
xor eax, eax
movzx eax, byte [esi + eax]
mov ecx, dword [edi + 0x16ec]
mov edx, dword [edi + 0x16f0]
lea esi, [edx + 1]
mov dword [edi + 0x16f0], esi
xor ebx, ebx
mov byte [ecx + edx], bl
mov ecx, dword [edi + 0x16ec]
mov edx, dword [edi + 0x16f0]
lea esi, [edx + 1]
mov dword [edi + 0x16f0], esi
mov byte [ecx + edx], bl
mov ecx, dword [edi + 0x16ec]
mov edx, dword [edi + 0x16f0]
lea esi, [edx + 1]
mov dword [edi + 0x16f0], esi
mov byte [ecx + edx], al
inc word [edi + eax*4 + 0xe4]
mov eax, dword [edi + 0x16f0]
dec dword [edi + 0x3c]
mov ecx, dword [edi + 0x68]
inc ecx
cmp eax, dword [edi + 0x16f4]
mov dword [edi + 0x68], ecx
jne 0x4e8e59
mov edx, dword [edi + 0x58]
xor esi, esi
mov eax, 0
test edx, edx
js 0x4e8f6a
mov eax, dword [edi + 0x48]
add eax, edx
sub ecx, edx
push 0
push ecx
push eax
push edi
call fcn.004e704f
add esp, 0x10
mov eax, dword [edi]
mov ecx, dword [edi + 0x68]
mov dword [edi + 0x58], ecx
push eax
call fcn.004dffa0
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], 0
jne 0x4e8e59
jmp 0x4e90df
bsf ecx, esi
shr ecx, 3
add ecx, ebp
mov ebp, dword [esp + 0x1c]
add ecx, 2
cmp ecx, edx
cmovae ecx, edx
cmp ecx, 3
mov esi, dword [esp]
jb 0x4e8ee5
mov eax, dword [edi + 0x16ec]
mov edx, dword [edi + 0x16f0]
lea esi, [edx + 1]
mov dword [edi + 0x16f0], esi
mov byte [eax + edx], 1
mov eax, dword [edi + 0x16ec]
mov edx, dword [edi + 0x16f0]
lea esi, [edx + 1]
mov dword [edi + 0x16f0], esi
mov byte [eax + edx], 0
mov eax, ecx
add al, 0xfd
mov edx, dword [edi + 0x16ec]
mov esi, dword [edi + 0x16f0]
lea ebx, [esi + 1]
mov dword [edi + 0x16f0], ebx
mov byte [edx + esi], al
inc dword [edi + 0x1700]
movzx eax, byte [ecx + 0x74d92d]
inc word [edi + eax*4 + 0x4e8]
movzx eax, byte [0x74d730]
inc word [edi + eax*4 + 0x9d8]
mov eax, dword [edi + 0x16f0]
sub dword [edi + 0x3c], ecx
add ecx, dword [edi + 0x68]
jmp 0x4e8f48
xor esi, esi
jmp 0x4e90df
mov dword [edi + 0x1704], 0
cmp ebp, 4
jne 0x4e9065
mov eax, dword [edi + 0x58]
mov ecx, dword [edi + 0x68]
sub ecx, eax
test eax, eax
js 0x4e90b1
add eax, dword [edi + 0x48]
jmp 0x4e90b3
cmp dword [edi + 0x16f0], 0
je 0x4e90ac
mov ecx, dword [edi + 0x58]
mov eax, dword [edi + 0x68]
sub eax, ecx
xor esi, esi
mov edx, 0
test ecx, ecx
js 0x4e9086
add ecx, dword [edi + 0x48]
mov edx, ecx
push 0
push eax
push edx
push edi
call fcn.004e704f
add esp, 0x10
mov eax, dword [edi]
mov ecx, dword [edi + 0x68]
mov dword [edi + 0x58], ecx
push eax
call fcn.004dffa0
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], 0
je 0x4e90df
xor esi, esi
inc esi
jmp 0x4e90df
xor eax, eax
push 1
push ecx
push eax
push edi
call fcn.004e704f
add esp, 0x10
mov eax, dword [edi]
mov ecx, dword [edi + 0x68]
mov dword [edi + 0x58], ecx
push eax
call fcn.004dffa0
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], 1
mov esi, 3
sbb esi, 0
mov eax, esi
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret