Function at 0x56e1bc
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, edx
mov byte [ebp - 5], 1
mov dword [ebp - 0x20], 0x54
mov dword [ebp - 0x24], 0x181
mov dl, 1
mov eax, dword [0x4f77a4]
call fcn.004fc41c
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x56e20d
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, ebx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x54]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x56e21b
mov dl, 1
mov eax, dword [0x42ae2c]
call fcn.004318b0
mov dword [ebp - 0x14], eax
cmp byte [ebp - 5], 0
je 0x56e442
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [ebp - 0xc]
call fcn.004fc6bc
cmp byte [eax + 0x461], 6
je 0x56e260
mov eax, dword [ebp - 0xc]
call fcn.004fc6bc
cmp byte [eax + 0x461], 4
jne 0x56e2c3
mov dl, 7
mov eax, dword [ebp - 0x14]
call fcn.00432f58
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x56e2c3
inc eax
mov dword [ebp - 0x28], eax
xor edi, edi
mov edx, edi
mov eax, dword [ebp - 0x14]
call fcn.00431ff4
mov ebx, eax
mov edx, edi
mov eax, dword [ebp - 0xc]
call fcn.004fda50
mov esi, eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ecx, eax
dec ecx
test ecx, ecx
jl 0x56e2bd
inc ecx
mov eax, dword [ebx]
and eax, 0xffffff
movzx edx, byte [esi]
shl edx, 0x18
or eax, edx
mov dword [ebx], eax
add ebx, 4
inc esi
dec ecx
jne 0x56e2a5
inc edi
dec dword [ebp - 0x28]
jne 0x56e27d
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp ebx, eax
jle 0x56e442
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x20]
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x20]
cmp ebx, eax
jle 0x56e442
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x2c]
sub ebx, eax
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x20]
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x20]
sub ebx, eax
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jl 0x56e341
cmp dword [ebp - 0x20], 0
jle 0x56e341
mov eax, dword [ebp - 0x20]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jl 0x56e355
cmp dword [ebp - 0x24], 0
jle 0x56e355
mov eax, dword [ebp - 0x24]
sub dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x56e442
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
call fcn.00431ff4
mov ebx, eax
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00431ff4
mov esi, eax
mov eax, dword [ebp - 0x18]
add eax, eax
add eax, eax
add esi, eax
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ecx, eax
dec ecx
test ecx, ecx
jl 0x56e436
inc ecx
movzx eax, byte [ebx]
movzx edx, byte [ebx + 3]
imul edx
movzx edx, byte [ebx + 3]
mov edi, 0xff
sub edi, edx
movzx edx, byte [esi]
imul edi, edx
add eax, edi
mov edi, 0xff
cdq
idiv edi
mov byte [esi], al
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 3]
imul edx
movzx edx, byte [ebx + 3]
mov edi, 0xff
sub edi, edx
movzx edx, byte [esi + 1]
imul edi, edx
add eax, edi
mov edi, 0xff
cdq
idiv edi
mov byte [esi + 1], al
movzx eax, byte [ebx + 2]
movzx edx, byte [ebx + 3]
imul edx
movzx edx, byte [ebx + 3]
mov edi, 0xff
sub edi, edx
movzx edx, byte [esi + 2]
imul edi, edx
add eax, edi
mov edi, 0xff
cdq
idiv edi
mov byte [esi + 2], al
mov byte [esi + 3], 0xff
add ebx, 4
add esi, 4
dec ecx
jne 0x56e3ad
inc dword [ebp - 0x10]
dec dword [ebp - 0x28]
jne 0x56e371
mov eax, dword [ebp - 0xc]
call fcn.004043d0
mov eax, dword [ebp - 0x14]
call fcn.004043d0
movzx eax, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret