Function at 0x545360
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x2c]
lea ebp, [edi + 0x38]
nop
mov eax, dword [edi + 0x3c]
mov edx, eax
sub edx, dword [edi + 0x74]
sub edx, dword [edi + 0x6c]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x2c]
add eax, 0xfffffefa
mov dword [esp + 0x10], ebp
add eax, esi
mov dword [esp + 0x18], edx
cmp dword [edi + 0x6c], eax
jb 0x545422
mov ecx, dword [ebp]
push esi
lea eax, [ecx + esi]
push eax
push ecx
call fcn.005854c0
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]
lea ecx, [ecx]
movzx ecx, word [edx - 2]
lea edx, [edx - 2]
mov eax, ecx
mov dword [esp + 0x14], 0
sub eax, esi
cmp ecx, esi
movzx eax, ax
cmovb eax, dword [esp + 0x14]
mov word [edx], ax
sub ebx, 1
jne 0x5453c0
mov eax, dword [edi + 0x40]
mov ebx, esi
lea edx, [eax + esi*2]
lea ecx, [ecx]
movzx ecx, word [edx - 2]
lea edx, [edx - 2]
mov eax, ecx
mov dword [esp + 0x14], 0
sub eax, esi
cmp ecx, esi
movzx eax, ax
cmovb eax, dword [esp + 0x14]
mov word [edx], ax
sub ebx, 1
jne 0x5453f0
mov edx, dword [esp + 0x18]
mov eax, dword [edi + 0x3c]
add edx, esi
mov dword [esp + 0x14], eax
mov ebx, dword [edi]
mov eax, dword [ebx + 4]
test eax, eax
je 0x54555e
mov ecx, dword [edi + 0x74]
add ecx, dword [ebp]
mov ebp, eax
add ecx, dword [edi + 0x6c]
mov dword [esp + 0x18], ecx
cmp ebp, edx
jbe 0x54544e
mov ebp, edx
test ebp, ebp
jne 0x54544e
mov ebx, dword [esp + 0x14]
jmp 0x5454a0
sub eax, ebp
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0x1c]
mov eax, dword [eax + 0x18]
cmp eax, 1
jne 0x54546b
mov edx, dword [ebx]
mov ecx, dword [ebx + 0x30]
push ebp
call fcn.005434b0
jmp 0x545483
cmp eax, 2
jne 0x545489
mov edx, dword [ebx]
test edx, edx
jne 0x54547a
xor eax, eax
jmp 0x545486
mov ecx, dword [ebx + 0x30]
push ebp
call fcn.00544180
add esp, 4
mov dword [ebx + 0x30], eax
push ebp
push dword [ebx]
push dword [esp + 0x20]
call fcn.005854c0
add dword [ebx], ebp
add esp, 0xc
add dword [ebx + 8], ebp
mov ebx, dword [edi + 0x3c]
add ebp, dword [edi + 0x74]
mov ecx, dword [edi + 0x6c]
mov eax, dword [esp + 0x10]
mov dword [edi + 0x74], ebp
cmp ebp, 3
jb 0x54551d
mov eax, dword [eax]
movzx edx, byte [eax + ecx]
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x48], edx
shl edx, cl
mov ecx, dword [edi + 0x6c]
movzx eax, byte [eax + ecx + 1]
xor edx, eax
mov eax, dword [esp + 0x10]
and edx, dword [edi + 0x54]
mov dword [edi + 0x48], edx
mov ecx, dword [eax]
cmp ebp, 0x106
jb 0x54551f
mov edx, dword [edi + 0x16c0]
cmp edx, ebx
jae 0x54555e
mov esi, dword [edi + 0x6c]
add esi, ebp
cmp edx, esi
jae 0x545530
mov eax, 0x102
sub ebx, esi
cmp ebx, eax
cmova ebx, eax
lea eax, [ecx + esi]
push ebx
push 0
push eax
call fcn.00585a40
add esp, 0xc
lea eax, [ebx + esi]
mov dword [edi + 0x16c0], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [eax]
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x5454de
mov ebp, dword [esp + 0x10]
jmp 0x545370
lea eax, [esi + 0x102]
cmp edx, eax
jae 0x54555e
sub esi, edx
sub ebx, edx
lea eax, [esi + 0x102]
cmp eax, ebx
cmovbe ebx, eax
lea eax, [edx + ecx]
push ebx
push 0
push eax
call fcn.00585a40
add esp, 0xc
add dword [edi + 0x16c0], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret