Function at 0x49bc64
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x49bc9e
mov edx, dword [ebp - 4]
cmp byte [edx], 0
jne 0x49bc9e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 1]
cmp eax, 0x80
je 0x49bca8
cmp eax, 0xc0
je 0x49bca8
cmp eax, 0x100
je 0x49bca8
mov eax, 0xfffffffe
jmp 0x49bf3e
test ebx, ebx
je 0x49bcd5
mov al, byte [ebx]
cmp al, 1
je 0x49bcba
cmp al, 2
je 0x49bcba
cmp al, 3
jne 0x49bcd5
mov edx, dword [ebx + 0x11]
cmp edx, 0x80
je 0x49bcdf
cmp edx, 0xc0
je 0x49bcdf
cmp edx, 0x100
je 0x49bcdf
mov eax, 0xfffffffb
jmp 0x49bf3e
mov ecx, dword [ebx + 0x11]
mov eax, dword [ebp + 0xc]
cdq
idiv ecx
mov dword [ebp - 0x10], eax
mov al, byte [ebx]
dec al
je 0x49bcfe
dec al
je 0x49bdf7
jmp 0x49bf31
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x49bf38
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49bd1f
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49bd71
inc eax
mov dword [ebp - 0x18], eax
xor edx, edx
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov ecx, dword [ebp - 0x1c]
mov esi, ecx
mov ecx, dword [ebx + 0x11]
test ecx, ecx
jns 0x49bd44
add ecx, 7
sar ecx, 3
imul ecx, dword [ebp - 0xc]
mov edi, edx
shl edi, 2
add ecx, edi
add ecx, eax
mov edi, dword [ebp - 8]
mov cl, byte [edi + ecx]
and cl, 0xff
mov byte [esi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49bd3a
inc edx
inc dword [ebp - 0x1c]
dec dword [ebp - 0x18]
jne 0x49bd33
mov eax, dword [ebp - 4]
add eax, 0x4a
push eax
mov ecx, dword [ebx + 0x11]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 1]
lea eax, [ebp - 0x4c]
call fcn.0049a70c
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49bd93
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49bde6
inc eax
mov dword [ebp - 0x18], eax
xor edx, edx
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x20], eax
xor eax, eax
mov ecx, dword [ebp - 0x20]
mov esi, ecx
mov ecx, dword [ebx + 0x11]
test ecx, ecx
jns 0x49bdb8
add ecx, 7
sar ecx, 3
imul ecx, dword [ebp - 0xc]
mov edi, edx
shl edi, 2
add ecx, edi
add ecx, eax
mov edi, dword [ebp + 8]
lea ecx, [edi + ecx]
push ecx
mov cl, byte [esi]
pop edi
mov byte [edi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49bdae
inc edx
inc dword [ebp - 0x20]
dec dword [ebp - 0x18]
jne 0x49bda7
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x49bd15
jmp 0x49bf38
test ecx, ecx
jns 0x49bdfe
add ecx, 0x1f
sar ecx, 5
dec ecx
test ecx, ecx
jl 0x49be3b
inc ecx
mov dword [ebp - 0x14], ecx
xor edx, edx
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x24], eax
xor eax, eax
mov ecx, dword [ebp - 0x24]
mov esi, ecx
mov ecx, edx
shl ecx, 2
add ecx, eax
mov cl, byte [ebx + ecx + 1]
and cl, 0xff
mov byte [esi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49be19
inc edx
inc dword [ebp - 0x24]
dec dword [ebp - 0x14]
jne 0x49be12
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x49bf38
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49be5c
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49beae
inc eax
mov dword [ebp - 0x18], eax
xor edx, edx
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x28], eax
xor eax, eax
mov ecx, dword [ebp - 0x28]
mov esi, ecx
mov ecx, dword [ebx + 0x11]
test ecx, ecx
jns 0x49be81
add ecx, 7
sar ecx, 3
imul ecx, dword [ebp - 0xc]
mov edi, edx
shl edi, 2
add ecx, edi
add ecx, eax
mov edi, dword [ebp - 8]
mov cl, byte [edi + ecx]
and cl, 0xff
xor byte [esi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49be77
inc edx
inc dword [ebp - 0x28]
dec dword [ebp - 0x18]
jne 0x49be70
mov eax, dword [ebp - 4]
add eax, 0x4a
push eax
mov ecx, dword [ebx + 0x11]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 1]
lea eax, [ebp - 0x4c]
call fcn.0049a70c
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49bed0
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49bf23
inc eax
mov dword [ebp - 0x18], eax
xor edx, edx
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x2c], eax
xor eax, eax
mov ecx, dword [ebp - 0x2c]
mov esi, ecx
mov ecx, dword [ebx + 0x11]
test ecx, ecx
jns 0x49bef5
add ecx, 7
sar ecx, 3
imul ecx, dword [ebp - 0xc]
mov edi, edx
shl edi, 2
add ecx, edi
add ecx, eax
mov edi, dword [ebp + 8]
lea ecx, [edi + ecx]
push ecx
mov cl, byte [esi]
pop edi
mov byte [edi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49beeb
inc edx
inc dword [ebp - 0x2c]
dec dword [ebp - 0x18]
jne 0x49bee4
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x49be52
jmp 0x49bf38
mov eax, 0xfffffffb
jmp 0x49bf3e
mov eax, dword [ebx + 0x11]
imul dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8