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

Disassembly:
mov eax, dword [edi + 8]
sub esp, 0x1c
push ebx
push ebp
push esi
xor esi, esi
cmp eax, esi
jne 0x408cf8
cmp dword [esp + 0x30], esi
je 0x408cc8
mov eax, dword [edi + 0x10]
mov byte [edi + 4], 6
mov dword [edi + 8], 0x40
mov ecx, dword [eax]
push pe_nt_image_headers32
call ecx
add esp, 4
cmp eax, esi
mov dword [edi], eax
jne 0x408cd1
mov dword [edi + 8], esi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret
push pe_nt_image_headers32
push esi
push eax
call sub.MSVCR80.dll_memset
mov edx, dword [esp + 0x38]
add esp, 0xc
call fcn.00408c60
mov edx, dword [edi + 8]
mov esi, eax
sub edx, 1
and esi, edx
jmp 0x408f2e
mov ebp, dword [esp + 0x2c]
movzx ebx, word [ebp]
cmp bx, si
mov ecx, ebp
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebx
je 0x408d31
movzx eax, bx
mov edx, dword [esp + 0x10]
imul edx, edx, 0xf4243
movzx eax, ax
xor edx, eax
movzx eax, word [ecx + 2]
add ecx, 2
cmp ax, si
mov dword [esp + 0x10], edx
jne 0x408d12
mov eax, dword [edi + 8]
mov esi, dword [esp + 0x10]
add eax, 0xffffffff
and esi, eax
mov eax, dword [edi]
xor dl, dl
cmp dword [eax + esi*4], 0
mov dword [esp + 0x18], eax
je 0x408dd3
nop
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx]
cmp bx, word [eax]
jne 0x408d79
movzx ebx, bx
sub ebp, eax
nop
test bx, bx
je 0x408dc5
movzx ecx, word [eax + ebp + 2]
add eax, 2
cmp cx, word [eax]
movzx ebx, cx
je 0x408d60
mov ebx, dword [esp + 0x14]
test dl, dl
jne 0x408da1
mov eax, dword [edi + 8]
movzx ecx, byte [edi + 4]
mov ebx, dword [esp + 0x14]
lea edx, [eax - 1]
not edx
and edx, dword [esp + 0x10]
sub ecx, 1
shr edx, cl
add eax, 0xffffffff
shr eax, 2
and dl, al
or dl, 1
movzx eax, dl
cmp esi, eax
jae 0x408db1
mov ecx, dword [edi + 8]
sub ecx, eax
add esi, ecx
jmp 0x408db3
sub esi, eax
mov eax, dword [edi]
cmp dword [eax + esi*4], 0
je 0x408dd3
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x2c]
jmp 0x408d50
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + esi*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
cmp dword [esp + 0x30], 0
je 0x408cc8
mov al, byte [edi + 4]
mov edx, dword [edi + 0xc]
movzx ecx, al
sub ecx, 1
shr edx, cl
test edx, edx
je 0x408f2e
add al, 1
movzx ecx, al
mov esi, 1
shl esi, cl
mov byte [esp + 0xf], al
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x10]
mov edx, dword [ecx]
lea eax, [esi*4]
push eax
mov dword [esp + 0x18], esi
lea ebp, [esi - 1]
call edx
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408cc8
lea eax, [esi*4]
push eax
push 0
push ebx
call sub.MSVCR80.dll_memset
xor ecx, ecx
add esp, 0xc
cmp dword [edi + 8], ecx
mov dword [esp + 0x18], ecx
jbe 0x408ecd
lea ecx, [ecx]
mov eax, dword [edi]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
je 0x408ec1
mov eax, dword [eax]
mov edx, dword [eax]
mov dword [esp + 0x24], eax
call fcn.00408c60
mov esi, eax
and esi, ebp
xor dl, dl
cmp dword [ebx + esi*4], 0
mov dword [esp + 0x20], eax
je 0x408eb2
test dl, dl
jne 0x408e95
mov ecx, dword [esp + 0x1c]
mov edx, ebp
not edx
add ecx, 0xffffffff
and edx, eax
shr edx, cl
mov ecx, ebp
shr ecx, 2
and dl, cl
or dl, 1
movzx ecx, dl
cmp esi, ecx
jae 0x408eaa
mov eax, dword [esp + 0x14]
sub eax, ecx
add esi, eax
mov eax, dword [esp + 0x20]
jmp 0x408eac
sub esi, ecx
cmp dword [ebx + esi*4], 0
jne 0x408e78
mov ecx, dword [esp + 0x24]
mov dword [ebx + esi*4], ecx
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
add ecx, 1
cmp ecx, dword [edi + 8]
mov dword [esp + 0x18], ecx
jb 0x408e50
mov edx, dword [edi + 0x10]
mov eax, dword [edi]
mov ecx, dword [edx + 8]
push eax
call ecx
mov dl, byte [esp + 0x13]
mov byte [edi + 4], dl
mov edx, dword [esp + 0x14]
mov dword [edi + 8], esi
mov esi, edx
and esi, ebp
add esp, 4
mov dword [edi], ebx
xor al, al
cmp dword [ebx + esi*4], 0
je 0x408f2e
test al, al
jne 0x408f13
mov ecx, dword [esp + 0x1c]
mov eax, ebp
not eax
add ecx, 0xffffffff
and eax, edx
shr eax, cl
mov ecx, ebp
shr ecx, 2
and al, cl
or al, 1
movzx ecx, al
cmp esi, ecx
jae 0x408f24
mov ebx, dword [esp + 0x14]
sub ebx, ecx
add esi, ebx
jmp 0x408f26
sub esi, ecx
mov ecx, dword [edi]
cmp dword [ecx + esi*4], 0
jne 0x408ef7
mov edx, dword [edi + 0x10]
mov ebx, dword [esp + 0x30]
mov eax, dword [edx]
push ebx
call eax
mov ecx, dword [edi]
mov dword [ecx + esi*4], eax
mov edx, dword [edi]
lea eax, [edx + esi*4]
add esp, 4
cmp dword [eax], 0
je 0x408cc8
mov eax, dword [eax]
push ebx
push 0
push eax
call sub.MSVCR80.dll_memset
mov ecx, dword [edi]
mov edx, dword [ecx + esi*4]
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [edx], eax
mov ecx, dword [edi]
add dword [edi + 0xc], 1
mov eax, dword [ecx + esi*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret