Function at 0x10049f00
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, ecx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 0xc]
cmp esi, edx
je 0x1004a2d7
cmp esi, 1
jl 0x10049f2c
cmp esi, 4
jle 0x10049f4b
push 0x6a4
push 0x1014f070
push 0x1014f0d4
call fcn.100e7dd8
add esp, 0xc
test esi, esi
js 0x1004a2b1
test edi, edi
js 0x1004a2b1
je 0x10049f66
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp esi, eax
jg 0x1004a2b1
mov ecx, esi
imul ecx, edi
mov dword [ebp - 0x18], ecx
test ecx, ecx
js 0x1004a2b1
test ebx, ebx
js 0x1004a2b1
je 0x10049f91
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp ecx, eax
jg 0x1004a2b1
mov eax, ecx
imul eax, ebx
push eax
call fcn.100e7eda
mov edx, eax
mov dword [ebp + 8], eax
add esp, 4
test edx, edx
je 0x1004a2b1
mov dword [ebp - 0xc], 0
test ebx, ebx
jle 0x1004a253
mov eax, dword [ebp - 8]
lea ecx, [esi - 0xa]
mov esi, dword [ebp - 4]
lea ebx, [edi - 1]
mov dword [ebp - 0x10], esi
mov dword [ebp + 8], edx
lea ecx, [ecx + eax*8]
imul eax, edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], eax
mov eax, edx
mov dword [ebp - 0x14], eax
nop
cmp ecx, 0x19
ja case.0x10049ff0.3
movzx ecx, byte [ecx + 0x1004a314]
jmp dword [ecx*4 + 0x1004a2e0]
mov edx, ebx
test edx, edx
js 0x1004a22e
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 1]
mov byte [eax + 1], 0xff
lea eax, [eax + 2]
jns 0x1004a001
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x1004a023
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
mov byte [eax - 1], 0xff
jns 0x1004a048
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 2]
lea eax, [eax + 1]
jns 0x1004a071
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
nop
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x1004a090
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x1004a0b5
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 3]
movzx ecx, byte [esi - 2]
lea eax, [eax + 4]
mov byte [eax - 3], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 2], cl
mov byte [eax - 1], 0xff
jns 0x1004a0e1
jmp 0x1004a22e
mov edi, ebx
test edi, edi
js 0x1004a22e
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x1004a112
jmp 0x1004a22e
mov edi, ebx
test edi, edi
js 0x1004a22e
nop
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
mov byte [eax - 1], 0xff
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
jns 0x1004a150
jmp 0x1004a22e
mov edi, ebx
test edi, edi
js 0x1004a22e
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x1004a190
jmp 0x1004a22e
mov edi, ebx
test edi, edi
js 0x1004a22e
nop dword [eax]
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
mov cl, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x1004a1d0
jmp 0x1004a22e
mov edx, ebx
test edx, edx
js 0x1004a22e
nop dword [eax + eax]
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 4]
movzx ecx, byte [esi - 3]
lea eax, [eax + 3]
mov byte [eax - 2], cl
movzx ecx, byte [esi - 2]
mov byte [eax - 1], cl
jns 0x1004a210
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x10]
inc ecx
mov eax, dword [ebp - 0x14]
add esi, dword [ebp - 8]
add eax, dword [ebp - 0x18]
cmp ecx, dword [ebp + 0x10]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], eax
jl 0x10049fe0
push dword [ebp - 4]
call fcn.100e25fa
mov eax, dword [ebp + 8]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x6c1
push 0x1014f120
push 0x1014f184
call fcn.100e7dd8
push dword [ebp - 4]
call fcn.100e25fa
push dword [ebp + 8]
call fcn.100e25fa
mov ecx, dword [0x10194d48]
add esp, 0x14
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop esi
pop ebx
mov dword [eax + 0x10], 0x1014f188
xor eax, eax
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call fcn.100e25fa
mov ecx, dword [0x10194d48]
add esp, 4
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x1014f114
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret