Function at 0x41c87f
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
push 1
mov dword [esi + 0x4dc], eax
lea eax, [ebp - 1]
push eax
mov dword [esi + 0x4d4], 0x41d8e8
call fcn.004186a8
movzx eax, byte [ebp - 1]
inc eax
cmp eax, 2
mov dword [esi + 0x4e0], eax
jge 0x41c8bd
xor eax, eax
jmp 0x41cc24
cmp byte [esi + 0x3a5f], 0x18
push ebx
push edi
jne 0x41c96d
mov ecx, 0xff
cmp word [esi + 0x3a61], cx
jne 0x41c96d
cmp word [esi + 0x3a63], cx
jne 0x41c96d
cmp word [esi + 0x3a65], cx
jne 0x41c96d
lea eax, [eax + eax*2]
mov ecx, esi
push eax
call fcn.00418776
mov eax, dword [esi + 0x4e0]
mov ecx, esi
lea eax, [eax + eax*2]
push eax
push dword [esi + 0xbc]
call fcn.004186a8
and dword [ebp + 8], 0
cmp dword [esi + 0x4e0], 0
jle 0x41cc10
xor edx, edx
lea ecx, [esi + 0x4e4]
mov eax, dword [esi + 0xbc]
add eax, edx
add edx, 3
movzx edi, byte [eax + 2]
movzx ebx, byte [eax + 1]
movzx eax, byte [eax]
or edi, 0x200
shl edi, 8
or edi, ebx
shl edi, 8
or edi, eax
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
mov dword [ecx], edi
add ecx, 4
cmp eax, dword [esi + 0x4e0]
jl 0x41c92f
jmp 0x41cc10
movzx ecx, byte [esi + 0x3a5e]
shr ecx, 3
imul ecx, eax
push ecx
mov ecx, esi
call fcn.00418776
movzx eax, byte [esi + 0x3a5e]
shr eax, 3
imul eax, dword [esi + 0x4e0]
push eax
mov ecx, esi
push dword [esi + 0xbc]
call fcn.004186a8
mov bl, byte [esi + 0x3a69]
mov al, byte [esi + 0x3a67]
mov cx, word [esi + 0x3a61]
mov dl, byte [esi + 0x3a68]
mov di, word [esi + 0x3a63]
mov byte [ebp + 0xb], bl
mov bl, byte [esi + 0x3a5e]
cmp bl, 8
je 0x41cb58
cmp bl, 0x10
je 0x41ca9b
and dword [ebp - 8], 0
cmp dword [esi + 0x4e0], 0
jle 0x41cc10
movzx ebx, byte [ebp + 0xb]
movzx edx, dl
movzx eax, al
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edx
movzx ebx, word [esi + 0x3a65]
mov dword [ebp - 0x1c], eax
mov dword [ebp + 8], ebx
movzx edx, di
movzx eax, cx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], eax
lea edi, [esi + 0x4e4]
mov eax, dword [esi + 0xbc]
mov ecx, dword [ebp - 8]
xor edx, edx
mov ebx, dword [eax + ecx*4]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
mov dword [ebp - 0x24], ebx
shr eax, cl
mov ecx, dword [ebp - 0x18]
and eax, dword [ebp + 8]
imul eax, eax, 0xff
div dword [ebp + 8]
movzx edx, al
mov eax, ebx
or dh, 2
shr eax, cl
shl edx, 8
mov ebx, edx
xor edx, edx
mov ecx, dword [ebp - 0x1c]
and eax, dword [ebp - 0xc]
imul eax, eax, 0xff
div dword [ebp - 0xc]
xor edx, edx
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x24]
shr eax, cl
shl ebx, 8
and eax, dword [ebp - 0x10]
imul eax, eax, 0xff
div dword [ebp - 0x10]
movzx eax, al
or ebx, eax
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [edi], ebx
add edi, 4
cmp eax, dword [esi + 0x4e0]
jl 0x41ca1c
jmp 0x41cc10
and dword [ebp - 8], 0
cmp dword [esi + 0x4e0], 0
jle 0x41cc10
movzx ebx, byte [ebp + 0xb]
movzx edx, dl
movzx eax, al
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edx
movzx ebx, word [esi + 0x3a65]
mov dword [ebp - 0x1c], eax
mov dword [ebp + 8], ebx
movzx edx, di
movzx eax, cx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], eax
lea edi, [esi + 0x4e4]
mov eax, dword [esi + 0xbc]
mov ecx, dword [ebp - 8]
movzx ebx, word [eax + ecx*2]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
shr eax, cl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
and eax, dword [ebp + 8]
imul eax, eax, 0xff
cdq
idiv dword [ebp + 8]
movzx edx, al
mov eax, ebx
or dh, 2
shr eax, cl
shl edx, 8
mov ebx, edx
mov ecx, dword [ebp - 0x1c]
and eax, dword [ebp - 0xc]
imul eax, eax, 0xff
cdq
idiv dword [ebp - 0xc]
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x20]
shr eax, cl
shl ebx, 8
and eax, dword [ebp - 0x10]
imul eax, eax, 0xff
cdq
idiv dword [ebp - 0x10]
movzx eax, al
or ebx, eax
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [edi], ebx
add edi, 4
cmp eax, dword [esi + 0x4e0]
jl 0x41cadb
jmp 0x41cc10
and dword [ebp - 8], 0
cmp dword [esi + 0x4e0], 0
jle 0x41cc10
movzx ebx, byte [ebp + 0xb]
movzx edx, dl
movzx eax, al
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edx
movzx ebx, word [esi + 0x3a65]
mov dword [ebp - 0x1c], eax
mov dword [ebp + 8], ebx
movzx edx, di
movzx eax, cx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], eax
lea edi, [esi + 0x4e4]
mov eax, dword [esi + 0xbc]
mov ecx, dword [ebp - 8]
movzx ebx, byte [eax + ecx]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
shr eax, cl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
and eax, dword [ebp + 8]
imul eax, eax, 0xff
cdq
idiv dword [ebp + 8]
movzx edx, al
mov eax, ebx
or dh, 2
shr eax, cl
shl edx, 8
mov ebx, edx
mov ecx, dword [ebp - 0x1c]
and eax, dword [ebp - 0xc]
imul eax, eax, 0xff
cdq
idiv dword [ebp - 0xc]
movzx eax, al
or ebx, eax
mov eax, dword [ebp - 0x20]
shr eax, cl
shl ebx, 8
and eax, dword [ebp - 0x10]
imul eax, eax, 0xff
cdq
idiv dword [ebp - 0x10]
movzx eax, al
or ebx, eax
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [edi], ebx
add edi, 4
cmp eax, dword [esi + 0x4e0]
jl 0x41cb98
xor eax, eax
cmp dword [esi + 0x4e0], 2
pop edi
pop ebx
setne al
dec eax
and al, 0xf9
add eax, 8
pop esi
leave
ret 8