Function at 0x404008
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ebx
push esi
mov ebx, dword [ebp + 8]
push 0x22
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.00462f98
mov word [ebp - 4], 8
add esp, 0xc
lea eax, [ebx + 0x1c]
mov edx, dword [eax]
sub dword [eax + 4], edx
dec word [ebp - 4]
add eax, 0xfffffffc
cmp word [ebp - 4], 2
jae 0x40402c
mov word [ebp - 6], 0
mov word [ebp - 4], 0
mov si, 8
mov eax, ebx
mov dword [ebp - 0xc], eax
mov ebx, SysReAllocStringLen
mov eax, dword [ebp - 0xc]
test dword [eax], ebx
je 0x404064
mov dl, 1
jmp 0x404066
xor edx, edx
xor eax, eax
mov ecx, dword [ebp - 0xc]
test dword [ecx], ebx
je 0x404073
test dl, dl
je 0x404084
test dword [ecx], ebx
jne 0x40407b
test dl, dl
jne 0x404084
shr ebx, 1
inc eax
cmp ax, 0x20
jb 0x40406b
movzx eax, ax
test eax, eax
jns 0x40408e
add eax, 3
sar eax, 2
mov cl, 7
sub cl, al
mov byte [ebp - 7], cl
xor eax, eax
mov al, byte [ebp - 7]
shl eax, 2
add ax, 4
mov word [ebp - 2], ax
mov al, byte [ebp - 7]
add eax, eax
add dl, al
mov byte [ebp - 7], dl
xor eax, eax
movzx edx, word [ebp - 6]
lea edx, [ebp + edx - 0x34]
movzx ecx, ax
push ecx
mov ecx, 3
pop ebx
sub ecx, ebx
xor ebx, ebx
mov bl, byte [ebp - 7]
sar ebx, cl
movzx ecx, si
dec ecx
and bl, 1
shl bl, cl
or byte [edx], bl
dec esi
test si, si
jne 0x4040e9
inc word [ebp - 6]
inc edx
mov si, 8
inc eax
cmp ax, 4
jb 0x4040bc
movzx edx, word [ebp - 6]
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword [ebp - 0x10], ecx
lea edx, [ebp + edx - 0x34]
cmp ax, word [ebp - 2]
jae 0x404138
movzx ecx, word [ebp - 2]
movzx ebx, ax
sub ecx, ebx
mov ebx, dword [ebp - 0x10]
dec ecx
mov ebx, dword [ebx]
shr ebx, cl
movzx ecx, si
dec ecx
and bl, 1
shl bl, cl
or byte [edx], bl
dec esi
test si, si
jne 0x404131
inc word [ebp - 6]
inc edx
mov si, 8
inc eax
cmp ax, word [ebp - 2]
jb 0x404106
inc word [ebp - 4]
add dword [ebp - 0xc], 4
cmp word [ebp - 4], 9
jb 0x404054
cmp si, 8
je 0x404155
inc word [ebp - 6]
push 0x28
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00462f98
add esp, 0xc
call fcn.00403fe8
mov edx, dword [ebp + 0xc]
mov byte [edx], al
call fcn.00403fe8
movzx edx, word [ebp - 6]
mov ecx, 0x26
and eax, 0xff
sub ecx, edx
cdq
idiv ecx
add dl, 2
mov byte [ebp - 7], dl
xor edx, edx
mov eax, dword [ebp + 0xc]
mov cl, byte [eax]
mov eax, dword [ebp + 0xc]
sub cl, byte [ebp - 7]
mov byte [eax + 1], cl
mov dl, byte [ebp - 7]
mov word [ebp - 4], dx
movzx ecx, word [ebp - 4]
mov eax, dword [ebp + 0xc]
add eax, ecx
jmp 0x4041b7
mov byte [eax], 1
inc word [ebp - 4]
inc eax
xor edx, edx
mov dl, byte [ebp - 7]
movzx ecx, word [ebp - 6]
add edx, ecx
movzx ecx, word [ebp - 4]
cmp edx, ecx
jg 0x4041af
mov word [ebp - 4], 2
mov eax, dword [ebp + 0xc]
lea ebx, [eax + 2]
cmp byte [ebx], 0
jne 0x4041e2
call fcn.00403fe8
mov byte [ebx], al
inc word [ebp - 4]
inc ebx
cmp word [ebp - 4], 0x28
jb 0x4041d6
movzx eax, word [ebp - 6]
push eax
lea edx, [ebp - 0x34]
push edx
xor ecx, ecx
mov cl, byte [ebp - 7]
add ecx, dword [ebp + 0xc]
push ecx
call fcn.00462f28
mov word [ebp - 4], 1
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dl, byte [eax]
xor byte [eax + 1], dl
inc word [ebp - 4]
inc eax
cmp word [ebp - 4], 0x28
jb 0x404211
pop esi
pop ebx
mov esp, ebp
pop ebp
ret