Function at 0x54e300
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x2c]
lea ebx, [edi + 0x38]
mov dword [ebp - 0x10], esi
mov eax, dword [edi + 0x3c]
mov edx, eax
sub edx, dword [edi + 0x74]
sub edx, dword [edi + 0x6c]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x2c]
add eax, 0xfffffefa
mov dword [ebp - 4], ebx
add eax, esi
mov dword [ebp - 8], edx
cmp dword [edi + 0x6c], eax
jb 0x54e3be
mov ecx, dword [ebx]
push esi
lea eax, [ecx + esi]
push eax
push ecx
call fcn.00582dc0
mov ebx, dword [edi + 0x4c]
add esp, 0xc
mov eax, dword [edi + 0x44]
sub dword [edi + 0x70], esi
sub dword [edi + 0x6c], esi
sub dword [edi + 0x5c], esi
lea edx, [eax + ebx*2]
nop dword [eax]
movzx ecx, word [edx - 2]
lea edx, [edx - 2]
mov eax, ecx
mov dword [ebp - 0xc], 0
sub eax, esi
cmp ecx, esi
movzx eax, ax
cmovb eax, dword [ebp - 0xc]
mov word [edx], ax
sub ebx, 1
jne 0x54e360
mov eax, dword [edi + 0x40]
mov ebx, esi
lea edx, [eax + esi*2]
nop dword [eax + eax]
movzx ecx, word [edx - 2]
lea edx, [edx - 2]
mov eax, ecx
mov dword [ebp - 0xc], 0
sub eax, esi
cmp ecx, esi
movzx eax, ax
cmovb eax, dword [ebp - 0xc]
mov word [edx], ax
sub ebx, 1
jne 0x54e390
mov edx, dword [ebp - 8]
mov eax, dword [edi + 0x3c]
add edx, esi
mov dword [ebp - 0xc], eax
mov ebx, dword [edi]
mov eax, dword [ebx + 4]
test eax, eax
je 0x54e50d
mov esi, dword [ebp - 4]
mov ecx, dword [edi + 0x74]
add ecx, dword [esi]
add ecx, dword [edi + 0x6c]
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], ecx
mov ecx, eax
mov dword [ebp - 8], ecx
cmp ecx, edx
jbe 0x54e3f3
mov ecx, edx
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x54e3f3
mov ebx, dword [ebp - 0xc]
jmp 0x54e449
sub eax, ecx
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x54e410
mov edx, dword [ebx]
push ecx
mov ecx, dword [ebx + 0x30]
call fcn.0054d190
jmp 0x54e428
cmp eax, 2
jne 0x54e42e
mov edx, dword [ebx]
test edx, edx
jne 0x54e41f
xor eax, eax
jmp 0x54e42b
push ecx
mov ecx, dword [ebx + 0x30]
call fcn.0054d410
add esp, 4
mov dword [ebx + 0x30], eax
push dword [ebp - 8]
push dword [ebx]
push dword [ebp - 0x14]
call fcn.00582dc0
mov ecx, dword [ebp - 8]
add esp, 0xc
add dword [ebx], ecx
add dword [ebx + 8], ecx
mov ebx, dword [edi + 0x3c]
add ecx, dword [edi + 0x74]
mov edx, dword [edi + 0x6c]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
mov dword [edi + 0x74], ecx
cmp ecx, 3
jb 0x54e4cd
mov eax, dword [eax]
mov ecx, dword [edi + 0x58]
movzx edx, byte [eax + edx]
mov dword [edi + 0x48], edx
shl edx, cl
mov ecx, dword [edi + 0x6c]
movzx eax, byte [eax + ecx + 1]
mov ecx, dword [ebp - 0x14]
xor edx, eax
and edx, dword [edi + 0x54]
mov eax, dword [ebp - 4]
mov dword [edi + 0x48], edx
mov edx, dword [eax]
cmp ecx, 0x106
jb 0x54e4cf
cmp dword [edi + 0x16c0], ebx
jae 0x54e50d
mov esi, dword [edi + 0x6c]
add esi, ecx
mov ecx, dword [edi + 0x16c0]
cmp ecx, esi
jae 0x54e4df
mov eax, 0x102
sub ebx, esi
cmp ebx, eax
cmova ebx, eax
lea eax, [edx + esi]
push ebx
push 0
push eax
call fcn.00583340
add esp, 0xc
lea eax, [ebx + esi]
mov dword [edi + 0x16c0], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [eax]
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x54e48b
mov ebx, dword [ebp - 4]
jmp 0x54e314
lea eax, [esi + 0x102]
cmp ecx, eax
jae 0x54e50d
sub esi, ecx
sub ebx, ecx
lea eax, [esi + 0x102]
cmp eax, ebx
cmovbe ebx, eax
lea eax, [ecx + edx]
push ebx
push 0
push eax
call fcn.00583340
add esp, 0xc
add dword [edi + 0x16c0], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret