Function at 0x5afc20
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 esi, edx
mov byte [ebp - 5], 1
mov dword [ebp - 0x20], 0x54
mov dword [ebp - 0x24], 0x181
mov dl, 1
mov eax, dword [0x4fa644]
call fcn.004fecc0
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x5afc71
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, esi
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 0x5afc7f
mov dl, 1
mov eax, dword [0x42b684]
call fcn.00432120
mov dword [ebp - 0x14], eax
cmp byte [ebp - 5], 0
je 0x5afea6
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [ebp - 0xc]
call fcn.004fef58
cmp byte [eax + 0x45d], 6
je 0x5afcc4
mov eax, dword [ebp - 0xc]
call fcn.004fef58
cmp byte [eax + 0x45d], 4
jne 0x5afd27
mov dl, 7
mov eax, dword [ebp - 0x14]
call fcn.004337c8
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x5afd27
inc eax
mov dword [ebp - 0x28], eax
xor edi, edi
mov edx, edi
mov eax, dword [ebp - 0x14]
call fcn.00432864
mov ebx, eax
mov edx, edi
mov eax, dword [ebp - 0xc]
call fcn.004ff9f4
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 0x5afd21
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 0x5afd09
inc edi
dec dword [ebp - 0x28]
jne 0x5afce1
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 0x5afea6
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 0x5afea6
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 0x5afda5
cmp dword [ebp - 0x20], 0
jle 0x5afda5
mov eax, dword [ebp - 0x20]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jl 0x5afdb9
cmp dword [ebp - 0x24], 0
jle 0x5afdb9
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 0x5afea6
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
call fcn.00432864
mov ebx, eax
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00432864
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 0x5afe9a
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 0x5afe11
inc dword [ebp - 0x10]
dec dword [ebp - 0x28]
jne 0x5afdd5
mov eax, dword [ebp - 0xc]
call fcn.004043dc
mov eax, dword [ebp - 0x14]
call fcn.004043dc
movzx eax, byte [ebp - 5]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret