Function at 0x4b815c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
push edi
push ebp
push eax
mov eax, 0x30
add esp, 0xfffff004
push eax
dec eax
jne 0x4b8166
mov eax, dword [esp + 0x30000]
add esp, 0xfffff9cc
mov dword [esp + 4], edx
mov dword [esp], eax
xor eax, eax
lea esi, [esp + 0x20038]
lea edi, [esp + 0x10038]
lea edx, [esp + 0x38]
mov ecx, dword [esp]
mov cl, byte [ecx + 0x457]
mov ebx, eax
shl bl, cl
mov byte [esi], bl
mov ecx, dword [esp]
mov cl, byte [ecx + 0x45b]
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp]
mov cl, byte [ecx + 0x458]
shl bl, cl
mov byte [edi], bl
mov ecx, dword [esp]
mov cl, byte [ecx + 0x45c]
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp]
mov cl, byte [ecx + 0x459]
shl bl, cl
mov byte [edx], bl
inc eax
inc edx
inc edi
inc esi
cmp eax, 0x10000
jne 0x4b8198
xor eax, eax
lea ebx, [esp + 0x30438]
lea esi, [esp + 0x30238]
lea edx, [esp + 0x30038]
mov ecx, dword [esp + 4]
mov cl, byte [ecx + 0x457]
mov edi, eax
shr edi, cl
mov word [ebx], di
mov ecx, dword [esp + 4]
mov cl, byte [ecx + 0x458]
mov edi, eax
shr edi, cl
mov ecx, dword [esp + 4]
mov cl, byte [ecx + 0x45b]
shl di, cl
mov word [esi], di
mov ecx, dword [esp + 4]
mov cl, byte [ecx + 0x459]
mov edi, eax
shr edi, cl
mov ecx, dword [esp + 4]
mov cl, byte [ecx + 0x45c]
shl di, cl
mov word [edx], di
inc eax
add edx, 2
add esi, 2
add ebx, 2
cmp eax, 0x100
jne 0x4b81fd
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [esp]
mov eax, dword [eax + 0x30]
dec eax
shl eax, 0x10
mov edx, dword [esp + 4]
mov ecx, dword [edx + 0x30]
cdq
idiv ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp]
mov eax, dword [eax + 0x1c]
dec eax
shl eax, 0x10
mov edx, dword [esp + 4]
mov ecx, dword [edx + 0x1c]
cdq
idiv ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x2c], eax
dec ecx
test ecx, ecx
jl 0x4b8490
inc ecx
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0xc]
shr eax, 0x10
mov dword [esp + 8], eax
mov eax, dword [esp]
mov eax, dword [eax + 0x460]
mov edx, dword [esp + 8]
mov edx, dword [eax + edx*4]
mov eax, dword [esp]
mov eax, dword [eax + 0x1c]
dec eax
cmp eax, dword [esp + 8]
jle 0x4b82d6
inc dword [esp + 8]
mov eax, dword [esp]
mov eax, dword [eax + 0x460]
mov ecx, dword [esp + 8]
mov ecx, dword [eax + ecx*4]
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0xc]
and eax, 0xffff
inc eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xc]
not eax
and eax, 0xffff
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x30]
dec eax
test eax, eax
jl 0x4b846f
inc eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 8]
shr eax, 0x10
mov esi, dword [esp + 8]
and esi, 0xffff
mov ebx, dword [esp + 0x1c]
imul ebx, esi
shr ebx, 0x10
mov edi, dword [esp + 0x1c]
sub edi, ebx
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x18]
imul edi, esi
shr edi, 0x10
mov dword [esp + 0x28], edi
mov esi, dword [esp + 0x18]
sub esi, dword [esp + 0x28]
mov dword [esp + 0x24], esi
movzx esi, word [edx + eax*2]
movzx esi, byte [esp + esi + 0x20038]
imul esi, dword [esp + 0x20]
movzx edi, word [edx + eax*2 + 2]
movzx edi, byte [esp + edi + 0x20038]
imul edi, ebx
add esi, edi
movzx edi, word [ecx + eax*2]
movzx edi, byte [esp + edi + 0x20038]
imul edi, dword [esp + 0x24]
add esi, edi
movzx edi, word [ecx + eax*2 + 2]
movzx edi, byte [esp + edi + 0x20038]
imul edi, dword [esp + 0x28]
add esi, edi
shr esi, 0x10
mov si, word [esp + esi*2 + 0x30438]
movzx edi, word [edx + eax*2]
movzx edi, byte [esp + edi + 0x10038]
imul edi, dword [esp + 0x20]
movzx ebp, word [edx + eax*2 + 2]
movzx ebp, byte [esp + ebp + 0x10038]
imul ebp, ebx
add edi, ebp
movzx ebp, word [ecx + eax*2]
movzx ebp, byte [esp + ebp + 0x10038]
imul ebp, dword [esp + 0x24]
add edi, ebp
movzx ebp, word [ecx + eax*2 + 2]
movzx ebp, byte [esp + ebp + 0x10038]
imul ebp, dword [esp + 0x28]
add edi, ebp
shr edi, 0x10
or si, word [esp + edi*2 + 0x30238]
movzx edi, word [edx + eax*2]
movzx edi, byte [esp + edi + 0x38]
imul edi, dword [esp + 0x20]
movzx ebp, word [edx + eax*2 + 2]
movzx ebp, byte [esp + ebp + 0x38]
imul ebp, ebx
add edi, ebp
movzx ebx, word [ecx + eax*2]
movzx ebx, byte [esp + ebx + 0x38]
imul ebx, dword [esp + 0x24]
add edi, ebx
movzx eax, word [ecx + eax*2 + 2]
movzx eax, byte [esp + eax + 0x38]
imul eax, dword [esp + 0x28]
add edi, eax
shr edi, 0x10
or si, word [esp + edi*2 + 0x30038]
mov eax, dword [esp + 0x2c]
mov word [eax], si
mov eax, dword [esp + 0x14]
add dword [esp + 8], eax
add dword [esp + 0x2c], 2
dec dword [esp + 0x34]
jne 0x4b831f
mov eax, dword [esp + 0x10]
add dword [esp + 0xc], eax
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x20]
add eax, dword [esp + 0x2c]
mov dword [esp + 0x2c], eax
dec dword [esp + 0x30]
jne 0x4b82aa
add esp, 0x30638
pop ebp
pop edi
pop esi
pop ebx
ret