Function at 0x4a2730
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
mov esi, 0x51dfb8
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x32ac]
shl eax, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
cmp byte [eax + 0x31e4], 0xa
jne 0x4a2774
mov ebx, dword [0x51e014]
mov dword [0x51dffc], 0x39
jmp 0x4a2786
mov eax, dword [0x51e014]
lea ebx, [eax + 1]
mov dword [0x51dffc], 0x2d
mov eax, dword [0x51dffc]
movzx eax, byte [esi + eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x40]
test al, al
je 0x4a27a5
xor eax, eax
jmp 0x4a2958
push ebp
mov edx, dword [0x51dffc]
mov eax, ebx
call fcn.004a26f4
pop ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
add dword [eax], edx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [0x51dffc]
jne 0x4a27ea
mov eax, dword [ebp - 8]
cmp byte [eax + 0x31e4], 0xa
je 0x4a27ea
mov al, byte [ebp - 0x14]
mov edx, dword [0x51e014]
mov byte [edx], al
mov dword [ebp - 0x10], 0x3c
jmp 0x4a283e
mov eax, dword [ebp - 8]
cmp byte [eax + 0x31e4], 0xa
je 0x4a2804
mov eax, dword [ebp - 0x1c]
mov al, byte [esi + eax]
mov edx, dword [0x51e014]
mov byte [edx], al
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x51dffc]
dec edx
sub edx, eax
jl 0x4a281b
inc edx
mov byte [ebx + eax], 0
inc eax
dec edx
jne 0x4a2813
mov eax, dword [ebp - 0x1c]
add eax, 2
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
shl eax, 2
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*2]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
sub eax, 3
mov edx, dword [ebp - 0x10]
sub edx, 4
test eax, eax
jl 0x4a28b6
mov cl, byte [ebx + eax + 2]
and cl, 0x3f
and ecx, 0xff
mov cl, byte [esi + ecx]
mov byte [ebx + edx + 3], cl
xor ecx, ecx
mov cl, byte [ebx + eax + 1]
shl ecx, 2
movzx edi, byte [ebx + eax + 2]
shr edi, 6
add ecx, edi
and ecx, 0x3f
mov cl, byte [esi + ecx]
mov byte [ebx + edx + 2], cl
xor ecx, ecx
mov cl, byte [ebx + eax]
shl ecx, 4
movzx edi, byte [ebx + eax + 1]
shr edi, 4
add ecx, edi
and ecx, 0x3f
mov cl, byte [esi + ecx]
mov byte [ebx + edx + 1], cl
xor ecx, ecx
mov cl, byte [ebx + eax]
shr ecx, 2
and ecx, 0x3f
mov cl, byte [esi + ecx]
mov byte [ebx + edx], cl
sub eax, 3
sub edx, 4
test eax, eax
jge 0x4a284e
mov eax, dword [ebp - 0x10]
mov byte [ebx + eax], 0xd
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov byte [ebx + eax], 0xa
inc dword [ebp - 0x10]
mov eax, dword [ebp - 8]
cmp byte [eax + 0x31e4], 0xa
jne 0x4a28e7
push ebp
mov edx, dword [ebp - 0x10]
mov eax, dword [0x51e014]
call fcn.004a24ec
pop ecx
jmp 0x4a28f7
push ebp
mov edx, dword [ebp - 0x10]
inc edx
mov eax, dword [0x51e014]
call fcn.004a24ec
pop ecx
inc dword [0x51e010]
cmp dword [ebp - 0x1c], 0
jle 0x4a2911
mov eax, dword [0x51e010]
cmp eax, dword [ebp - 0x18]
jne 0x4a2792
cmp dword [0x51e00c], 0
jle 0x4a2955
push 0
push 0
mov eax, dword [0x51e00c]
push eax
push 1
mov ecx, dword [0x51e01c]
lea edx, [ebp - 4]
mov ebx, dword [ebp - 8]
mov eax, dword [ebx + 0x49c]
call dword [ebx + 0x498]
cmp eax, dword [0x51e00c]
je 0x4a294e
mov eax, dword [ebp - 8]
call fcn.0049c51c
xor eax, eax
mov dword [0x51e00c], eax
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4