Function at 0x4e8e80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x10], eax
add eax, 0xb34
mov dword [ebp - 0x14], eax
mov eax, dword [edx + 0x68]
mov esi, dword [eax]
mov edx, dword [esi + 0xa8]
mov ecx, dword [esi + 8]
mov eax, edx
sar edx, 0x1f
idiv ecx
mov edx, dword [ebp + 8]
mov ebx, eax
mov edi, dword [edx + 0x14]
mov edx, edi
mov eax, edi
sar edx, 0x1f
idiv ecx
mov ecx, eax
lea eax, [eax - 4]
mov dword [ebp - 0x18], eax
mov eax, ebx
xor eax, 0xffffffff
sar eax, 0x1f
and ebx, eax
lea eax, [ecx + 2]
cmp eax, dword [esi + 0xa4]
jg 0x4e907a
cmp ebx, dword [ebp - 0x18]
jge 0x4e8fc3
lea edx, [esi + 0x28]
mov dword [ebp - 0x38], edx
mov eax, dword [esi + 0x9c]
mov dword [ebp - 0x20], 0
inc eax
cmp eax, 0x18
jle 0x4e906f
mov dword [esi + 0x9c], 0x18
mov eax, dword [esi]
xor edi, edi
test eax, eax
jle 0x4e8f6d
mov dword [ebp - 0x34], 0
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 8]
imul edx, ebx
mov eax, dword [ecx + 8]
mov eax, dword [eax + edi*4]
push ebx
mov ecx, dword [esi + 0x98]
inc edi
lea edx, [eax + edx*4]
mov eax, dword [ebp - 0x34]
add eax, ecx
push eax
mov eax, esi
mov ecx, dword [ebp - 0x38]
push ecx
push edx
mov edx, dword [ebp - 0x14]
call fcn.004e8a30
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
or edx, eax
add ecx, 0x3f0
add esp, 0x10
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x34], ecx
cmp dword [esi], edi
jg 0x4e8f23
mov eax, dword [esi + 0xa0]
test byte [ebp - 0x20], 1
mov dword [eax + ebx*4 + 8], 0
je 0x4e8f90
mov dword [eax + ebx*4], 1
mov dword [eax + ebx*4 + 4], 1
test byte [ebp - 0x20], 2
je 0x4e8fa9
mov dword [eax + ebx*4], 1
test ebx, ebx
jle 0x4e8fa9
mov dword [eax + ebx*4 - 4], 1
test byte [ebp - 0x20], 4
je 0x4e8fb9
mov dword [esi + 0x9c], 0xffffffff
inc ebx
cmp ebx, dword [ebp - 0x18]
jl 0x4e8ef3
mov edi, dword [esi + 8]
mov eax, dword [ebp - 0x18]
imul eax, edi
mov edx, dword [ebp + 8]
mov dword [esi + 0xa8], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov edx, dword [edx + 0x30]
mov dword [ebp - 0x28], edx
mov eax, dword [ecx + 0x28]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + eax*4]
test eax, eax
js 0x4e90a8
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
sar eax, 2
add eax, edx
mov edx, dword [ecx + 4]
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [ebp - 0x10]
sar edx, 1
add eax, edx
mov edx, dword [ecx]
test edx, edx
js 0x4e90a0
sar edx, 2
mov ebx, dword [esi + 0xb0]
lea edx, [eax + edx]
mov eax, dword [ebp - 0x24]
sub eax, edi
mov dword [ebp - 0x2c], edx
cmp eax, ebx
jle 0x4e9064
mov ecx, eax
cmp ebx, dword [ebp - 0x2c]
jge 0x4e90b0
mov edx, ebx
mov eax, ebx
sar edx, 0x1f
mov dword [esi + 0xb0], ebx
idiv edi
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 0xa0]
mov edx, dword [ebp - 0x3c]
mov eax, dword [eax + edx*4]
test eax, eax
je 0x4e905e
cmp ebx, dword [ebp - 0x28]
jg 0x4e90bd
add ebx, edi
cmp ecx, ebx
jg 0x4e9032
lea esp, [ebp - 0xc]
or eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esi + 0x9c], eax
jmp 0x4e8f14
mov dword [esi + 0xa4], eax
shl eax, 2
push edx
push edx
push eax
mov eax, dword [esi + 0xa0]
push eax
call sub.msvcrt.dll_realloc
add esp, 0x10
mov dword [esi + 0xa0], eax
jmp 0x4e8ee4
add edx, 3
jmp 0x4e9018
add eax, 3
jmp 0x4e8ff2
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ebx, dword [ebp - 0x2c]
mov dword [esi + 0xac], ebx
setge al
and eax, 0xff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret