Function at 0x10021800
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
push 0xd
pop ecx
mov esi, str.Element_of_show_space_array_must_be_number_or_string
mov ebx, dword [0x100407ac]
lea edi, [ebp - 0x58]
mov dword [ebp - 8], edx
rep movsd dword es:[edi], dword [esi]
xor edx, edx
mov eax, edx
movsb byte es:[edi], byte [esi]
cmp byte [ebp - 0x58], 0x6f
jne 0x10021850
mov cl, 0x6f
test cl, cl
je 0x10021843
cmp byte [ebp + eax - 0x58], dl
je 0x10021843
mov cl, byte [eax + 0x10038121]
inc eax
cmp cl, byte [ebp + eax - 0x58]
je 0x1002182c
cmp dword [ebp + 8], eax
jae 0x10021850
imul eax, ebx, 0x60469bed
jmp 0x10021855
mov eax, dword [0x10040734]
mov dword [ebp - 0x10], eax
lea edi, [ebp - 0x44]
mov eax, dword [ebp - 8]
mov esi, str.AvastCefToaster
push 8
mov dword [ebp - 0xc], edx
movzx eax, word [eax]
mov ecx, eax
mov dword [ebp - 0x14], ecx
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp ax, word [ebp - 0x44]
jne 0x100218a7
mov edi, dword [ebp - 8]
mov ebx, edx
movzx ecx, ax
mov eax, edx
test cx, cx
je 0x1002189e
cmp word [ebp + eax - 0x44], dx
je 0x1002189e
inc ebx
lea eax, [ebx + ebx]
movzx ecx, word [eax + edi]
cmp cx, word [ebp + eax - 0x44]
je 0x10021883
mov dword [ebp - 0xc], ebx
mov ebx, dword [0x100407ac]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx + eax*2]
movzx eax, byte [ebp + eax*2 - 0x44]
sub ecx, eax
cmp ecx, 0x15d1
jae 0x100218ca
mov eax, dword [ebp - 0x10]
xor eax, 0x24319335
jmp 0x100218d1
mov eax, ebx
and eax, 0x9a195271
lea ecx, [ebx + 0x1cd6f417]
mov dword [0x10040734], eax
mov eax, edx
mov dword [ebp - 0xc], ecx
inc eax
cmp byte [eax + str.avcfg:__Firewall_Policies_NotificationNewBlockRule], dl
jne 0x100218e1
cmp eax, 0x241a
je 0x100218fa
lea eax, [ebx - 0x405be80]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
lea edi, [ebp - 0x3c]
push 6
pop ecx
mov esi, str.defsVersion
mov al, byte [eax]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 1], al
mov eax, edx
cmp cx, word [ebp - 0x3c]
jne 0x1002195f
mov edi, dword [ebp - 8]
movzx esi, cx
mov ecx, edx
test si, si
je 0x1002193d
cmp word [ebp + ecx - 0x3c], dx
je 0x1002193d
inc eax
lea ecx, [eax + eax]
movzx esi, word [ecx + edi]
cmp si, word [ebp + ecx - 0x3c]
je 0x10021922
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jae 0x1002195f
mov esi, dword [ebp - 0xc]
cmp eax, 0x2434
jne 0x1002195a
or esi, 0x5bf89990
inc eax
cmp eax, ecx
jb 0x1002194d
mov cl, byte [ebp - 1]
lea edi, [ebp - 0x20]
mov esi, str.afii57841
mov eax, edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
cmp cl, byte [ebp - 0x20]
jne 0x1002198c
mov esi, dword [ebp + 8]
test cl, cl
je 0x1002198c
cmp byte [ebp + eax - 0x20], dl
je 0x1002198c
inc eax
mov cl, byte [esi + eax]
cmp cl, byte [ebp + eax - 0x20]
je 0x10021978
mov edi, dword [ebp + 8]
lea esi, [ebx - 0x28326198]
movzx ecx, byte [eax + edi]
movzx eax, byte [ebp + eax - 0x20]
sub ecx, eax
cmp ecx, 0x20e5
jb 0x100219ae
lea esi, [ebx + 0xca0159f]
cmp byte [ebp - 1], dl
je 0x100219e2
lea eax, [ebx + 0x3191406d]
inc edx
cmp byte [edx + edi], 0
jne 0x100219b9
mov ecx, dword [ebp + 8]
jmp 0x100219de
cmp ecx, 0x130a
jne 0x100219d7
add eax, 0x8ddfa20e
mov dword [0x10040734], eax
lea eax, [esi + 0x365cf47b]
inc ecx
cmp ecx, edx
jb 0x100219c5
imul eax, ebx, 0x606d9e21
and ebx, 0x6cee8731
pop edi
pop esi
mov dword [0x10040834], ebx
pop ebx
mov dword [0x1004077c], eax
leave
ret