Function at 0x4b1d40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffff40
mov dword [esp + 4], ecx
mov dword [esp], edx
lea eax, [esp + 0xa0]
mov edx, 0x20
call fcn.00407378
mov dword [esp + 0xa0], 0x20
lea eax, [esp + 0xa0]
push eax
mov eax, dword [esp + 4]
mov eax, dword [eax]
push eax
mov eax, dword [eax]
call dword [eax + 0x54]
lea eax, [esp + 0x24]
mov edx, 0x7c
call fcn.00407378
mov dword [esp + 0x24], 0x7c
push 0
push 1
lea eax, [esp + 0x2c]
push eax
push 0
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
push eax
mov eax, dword [eax]
call dword [eax + 0x64]
mov eax, dword [esp + 0xac]
sub eax, 0x10
je 0x4b2015
sub eax, 8
je 0x4b1ef3
sub eax, 8
jne 0x4b20d7
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 4]
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4b20d7
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.0041d860
mov dword [esp + 0x18], eax
mov eax, dword [esp + 4]
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x4b1ec3
inc eax
mov dword [esp + 0x20], eax
xor eax, eax
lea esi, [eax + eax*2]
mov edx, dword [esp + 0x18]
mov dl, byte [edx + esi + 2]
mov ecx, dword [esp + 0x18]
mov cl, byte [ecx + esi + 1]
mov ebx, dword [esp + 0x18]
mov bl, byte [ebx + esi]
mov esi, edx
and esi, 0xff
shl esi, 0x10
mov edi, edx
and edi, 0xff
shl edi, 8
add esi, edi
and edx, 0xff
add esi, edx
and esi, dword [esp + 0xb0]
xor edx, edx
mov dl, cl
shl edx, 0x10
mov edi, ecx
and edi, 0xff
shl edi, 8
add edx, edi
and ecx, 0xff
add edx, ecx
and edx, dword [esp + 0xb4]
add esi, edx
xor edx, edx
mov dl, bl
shl edx, 0x10
xor ecx, ecx
mov cl, bl
shl ecx, 8
add edx, ecx
xor ecx, ecx
mov cl, bl
add edx, ecx
and edx, dword [esp + 0xb8]
add esi, edx
mov edx, dword [esp + 0xc]
mov dword [edx], esi
add dword [esp + 0xc], 4
inc eax
dec dword [esp + 0x20]
jne 0x4b1e28
mov eax, dword [esp + 0x34]
test eax, eax
jns 0x4b1ece
add eax, 3
sar eax, 2
shl eax, 2
add dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], eax
inc dword [esp + 8]
dec dword [esp + 0x1c]
jne 0x4b1dfe
jmp 0x4b20d7
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 4]
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4b20d7
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.0041d860
mov dword [esp + 0x18], eax
mov eax, dword [esp + 4]
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x4b1fe7
inc eax
mov dword [esp + 0x20], eax
xor eax, eax
lea esi, [eax + eax*2]
mov edx, dword [esp + 0x18]
mov dl, byte [edx + esi + 2]
mov ecx, dword [esp + 0x18]
mov cl, byte [ecx + esi + 1]
mov ebx, dword [esp + 0x18]
mov bl, byte [ebx + esi]
mov esi, edx
and esi, 0xff
shl esi, 0x10
mov edi, edx
and edi, 0xff
shl edi, 8
add esi, edi
and edx, 0xff
add esi, edx
and esi, dword [esp + 0xb0]
xor edx, edx
mov dl, cl
shl edx, 0x10
mov edi, ecx
and edi, 0xff
shl edi, 8
add edx, edi
and ecx, 0xff
add edx, ecx
and edx, dword [esp + 0xb4]
add esi, edx
xor edx, edx
mov dl, bl
shl edx, 0x10
xor ecx, ecx
mov cl, bl
shl ecx, 8
add edx, ecx
xor ecx, ecx
mov cl, bl
add edx, ecx
and edx, dword [esp + 0xb8]
add esi, edx
mov edx, dword [esp + 0xc]
mov dword [edx], esi
add dword [esp + 0xc], 4
inc eax
dec dword [esp + 0x20]
jne 0x4b1f4c
mov eax, dword [esp + 0x34]
mov ecx, 3
cdq
idiv ecx
shl eax, 2
add dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], eax
inc dword [esp + 8]
dec dword [esp + 0x1c]
jne 0x4b1f22
jmp 0x4b20d7
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 4]
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4b20d7
inc eax
mov dword [esp + 0x1c], eax
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.0041d860
mov dword [esp + 0x18], eax
mov eax, dword [esp + 4]
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x4b20b6
inc eax
mov dword [esp + 0x20], eax
xor eax, eax
lea esi, [eax + eax*2]
mov edx, dword [esp + 0x18]
mov dl, byte [edx + esi + 2]
mov ecx, dword [esp + 0x18]
mov cl, byte [ecx + esi + 1]
mov ebx, dword [esp + 0x18]
mov bl, byte [ebx + esi]
and ebx, 0xff
shr ebx, 3
and ecx, 0xff
shr ecx, 3
shl ecx, 6
add bx, cx
and edx, 0xff
shr edx, 3
shl edx, 0xb
add bx, dx
mov edx, dword [esp + 0x14]
mov word [edx], bx
add dword [esp + 0x14], 2
inc eax
dec dword [esp + 0x20]
jne 0x4b2062
mov edx, dword [esp + 8]
imul edx, dword [esp + 0x34]
add edx, dword [esp + 0x48]
mov eax, edx
mov dword [esp + 0x14], eax
inc dword [esp + 8]
dec dword [esp + 0x1c]
jne 0x4b203c
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 4]
mov eax, dword [eax]
push eax
mov eax, dword [eax]
call dword [eax + 0x80]
mov al, 1
add esp, 0xc0
pop edi
pop esi
pop ebx
ret