Function at 0x49bf48
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 ebx, edx
mov dword [ebp - 4], eax
cmp dword [ebp - 8], 0
je 0x49bf82
mov edx, dword [ebp - 8]
cmp byte [edx], 0
jne 0x49bf82
mov eax, dword [ebp - 8]
mov eax, dword [eax + 1]
cmp eax, 0x80
je 0x49bf8c
cmp eax, 0xc0
je 0x49bf8c
cmp eax, 0x100
je 0x49bf8c
mov eax, 0xfffffffe
jmp 0x49c22a
test ebx, ebx
je 0x49bfb9
mov al, byte [ebx]
cmp al, 1
je 0x49bf9e
cmp al, 2
je 0x49bf9e
cmp al, 3
jne 0x49bfb9
mov edx, dword [ebx + 0x11]
cmp edx, 0x80
je 0x49bfc3
cmp edx, 0xc0
je 0x49bfc3
cmp edx, 0x100
je 0x49bfc3
mov eax, 0xfffffffb
jmp 0x49c22a
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 0x49bfe2
dec al
je 0x49c0df
jmp 0x49c21d
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x49c224
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49c003
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49c055
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 0x49c028
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 + 0x10]
mov cl, byte [edi + ecx]
and cl, 0xff
mov byte [esi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49c01e
inc edx
inc dword [ebp - 0x1c]
dec dword [ebp - 0x18]
jne 0x49c017
mov eax, dword [ebx + 0x11]
push eax
mov eax, dword [ebp - 8]
add eax, 0x4a
push eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 1]
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 4]
call fcn.0049ab94
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49c07b
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49c0ce
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 0x49c0a0
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 0x49c096
inc edx
inc dword [ebp - 0x20]
dec dword [ebp - 0x18]
jne 0x49c08f
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x49bff9
jmp 0x49c224
test ecx, ecx
jns 0x49c0e6
add ecx, 0x1f
sar ecx, 5
dec ecx
test ecx, ecx
jl 0x49c123
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 0x49c101
inc edx
inc dword [ebp - 0x24]
dec dword [ebp - 0x14]
jne 0x49c0fa
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x49c224
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49c144
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49c196
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 0x49c169
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 + 0x10]
mov cl, byte [edi + ecx]
and cl, 0xff
xor byte [esi], cl
inc eax
add esi, 8
cmp eax, 4
jne 0x49c15f
inc edx
inc dword [ebp - 0x28]
dec dword [ebp - 0x18]
jne 0x49c158
mov eax, dword [ebx + 0x11]
push eax
mov eax, dword [ebp - 8]
add eax, 0x4a
push eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 1]
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 4]
call fcn.0049ab94
mov eax, dword [ebx + 0x11]
test eax, eax
jns 0x49c1bc
add eax, 0x1f
sar eax, 5
dec eax
test eax, eax
jl 0x49c20f
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 0x49c1e1
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 0x49c1d7
inc edx
inc dword [ebp - 0x2c]
dec dword [ebp - 0x18]
jne 0x49c1d0
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x49c13a
jmp 0x49c224
mov eax, 0xfffffffb
jmp 0x49c22a
mov eax, dword [ebx + 0x11]
imul dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc