Function at 0x4b91b8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov ecx, 4
push 0
push 0
dec ecx
jne 0x4b91c0
push ecx
push ebx
push esi
push edi
mov esi, edx
mov edi, eax
xor eax, eax
push ebp
push 0x4b94ae
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
mov eax, esi
mov ecx, 1
mov edx, dword [0x49985c]
call fcn.00407034
add esp, 4
mov eax, edi
call fcn.00405afc
cmp eax, 4
jle 0x4b948b
mov eax, edi
call fcn.00405afc
mov al, byte [edi + eax - 1]
cmp al, 0x30
je 0x4b9305
and eax, 0xff
sub eax, 0x40
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, esi
mov ecx, 1
mov edx, dword [0x49985c]
call fcn.00407034
add esp, 4
mov eax, dword [ebp - 0xc]
dec eax
test eax, eax
jl 0x4b947a
inc eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
push 1
lea eax, [ebp - 4]
push eax
mov ecx, 0x4b94bc
lea eax, [ebx + ebx*2]
inc eax
mov edx, edi
call fcn.0057b824
mov eax, dword [ebp - 4]
call fcn.0040c9e8
imul edx, ebx, 0xb
mov ecx, dword [esi]
mov dword [ecx + edx + 6], eax
push 1
lea eax, [ebp - 0x14]
push eax
mov ecx, 0x4b94bc
lea eax, [ebx + ebx*2]
add eax, 2
mov edx, edi
call fcn.0057b824
mov eax, dword [ebp - 0x14]
call fcn.0040c974
mov edx, eax
mov eax, 0x64
call fcn.0043a5dc
mov edx, eax
xor eax, eax
call fcn.0043a6a0
imul edx, ebx, 0xb
mov ecx, dword [esi]
mov byte [ecx + edx + 0xa], al
push 1
lea eax, [ebp - 0x18]
push eax
mov ecx, 0x4b94bc
lea eax, [ebx + ebx*2]
add eax, 3
mov edx, edi
call fcn.0057b824
mov eax, dword [ebp - 0x18]
call fcn.0040c9e8
imul edx, ebx, 0xb
mov ecx, dword [esi]
mov dword [ecx + edx + 2], eax
imul eax, ebx, 0xb
mov edx, dword [esi]
mov word [edx + eax], bx
imul eax, ebx, 0xb
mov edx, dword [esi]
test byte [edx + eax + 2], 0x10
je 0x4b92f6
mov eax, dword [esi]
or dword [eax + 2], 0x20
inc ebx
dec dword [ebp - 0x10]
jne 0x4b924d
jmp 0x4b947a
mov edx, 0x4b94bc
mov eax, edi
call fcn.0057b9b0
mov ecx, 5
cdq
idiv ecx
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, esi
mov ecx, 1
mov edx, dword [0x49985c]
call fcn.00407034
add esp, 4
mov eax, dword [ebp - 0xc]
dec eax
test eax, eax
jl 0x4b9414
inc eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
push 1
lea eax, [ebp - 0x1c]
push eax
mov ecx, 0x4b94bc
lea eax, [ebx + ebx*4]
inc eax
mov edx, edi
call fcn.0057b824
mov eax, dword [ebp - 0x1c]
call fcn.0040c9e8
and eax, 0xffffffff
imul edx, ebx, 0xb
mov ecx, dword [esi]
mov dword [ecx + edx + 6], eax
mov edx, dword [ebp - 8]
mov eax, 0x64
call fcn.0043a5dc
imul edx, ebx, 0xb
mov ecx, dword [esi]
mov byte [ecx + edx + 0xa], al
push 1
lea eax, [ebp - 0x20]
push eax
mov ecx, 0x4b94bc
lea eax, [ebx + ebx*4]
add eax, 4
mov edx, edi
call fcn.0057b824
mov eax, dword [ebp - 0x20]
call fcn.0040c9e8
imul edx, ebx, 0xb
mov ecx, dword [esi]
mov dword [ecx + edx + 2], eax
imul eax, ebx, 0xb
mov edx, dword [esi]
mov word [edx + eax], bx
push 1
lea eax, [ebp - 0x24]
push eax
mov ecx, 0x4b94bc
lea eax, [ebx + ebx*4]
add eax, 3
mov edx, edi
call fcn.0057b824
mov eax, dword [ebp - 0x24]
call fcn.0040c974
mov edx, eax
mov eax, 0x64
call fcn.0043a5dc
mov edx, eax
xor eax, eax
call fcn.0043a6a0
add dword [ebp - 8], eax
imul eax, ebx, 0xb
mov edx, dword [esi]
mov byte [edx + eax + 9], 0xff
imul eax, ebx, 0xb
mov edx, dword [esi]
and dword [edx + eax + 2], 0xffffffef
inc ebx
dec dword [ebp - 0x10]
jne 0x4b934c
cmp dword [ebp - 0xc], 0
jle 0x4b947a
mov eax, dword [esi]
mov eax, dword [eax + 2]
and eax, 3
cmp eax, 2
jne 0x4b947a
xor ebx, ebx
mov eax, dword [esi]
call fcn.00406e58
lea edi, [ebx + 1]
cmp eax, edi
jge 0x4b9474
push edi
mov eax, esi
mov ecx, 1
mov edx, dword [0x49985c]
call fcn.00407034
add esp, 4
imul eax, ebx, 0xb
mov edx, dword [esi]
mov ecx, dword [esi]
lea edi, [edx + eax]
mov edx, dword [ecx + eax - 0xb]
mov dword [edi], edx
mov edx, dword [ecx + eax - 7]
mov dword [edi + 4], edx
mov dx, word [ecx + eax - 3]
mov word [edi + 8], dx
mov dl, byte [ecx + eax - 1]
mov byte [edi + 0xa], dl
inc ebx
cmp ebx, 5
jne 0x4b9429
mov eax, dword [esi]
call fcn.00406e58
imul eax, eax, 0xb
mov edx, dword [esi]
mov byte [edx + eax - 1], 0x64
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b94b5
lea eax, [ebp - 0x24]
mov edx, 5
call fcn.00405844
lea eax, [ebp - 4]
call fcn.00405820
ret