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

Disassembly:
push ebx
push edi
push esi
sub esp, 0x5c
mov eax, dword [esp + 0x6c]
add eax, dword [ecx + 0x60]
mov word [esp + 0x14], 0x3735
mov byte [esp + 0x16], 0x3e
mov dword [esp + 0x17], 0
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
cmp edx, 6
ja 0x409a0f
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 8]
mov esi, dword [esp + 8]
movzx esi, byte [esp + esi + 0x14]
lea edi, [edx + esi]
add edx, 0x4a
and edx, esi
add edx, edx
sub edi, edx
add edi, 0xbe070d4a
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x1c]
add dl, 0x8e
mov esi, dword [esp + 8]
mov byte [esp + esi + 0x14], dl
inc dword [esp + 8]
mov edx, dword [esp + 8]
cmp edx, 7
jb 0x4099d0
mov dword [esp + 8], 0xbe8480ae
mov word [esp + 0xc], 0xb3ba
mov dword [esp + 0xe], 0
mov dword [esp], 0
mov edx, dword [esp]
cmp edx, 9
ja 0x409a7d
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp]
mov esi, dword [esp]
movzx esi, byte [esp + esi + 8]
lea edi, [edx + esi]
add edx, 0x9d
and edx, esi
add edx, edx
sub edi, edx
add edi, 0x7902d49d
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x1c]
add dl, 0xef
mov esi, dword [esp]
mov byte [esp + esi + 8], dl
inc dword [esp]
mov edx, dword [esp]
cmp edx, 0xa
jb 0x409a40
mov dword [esp + 0x1c], 0xc6c0bcbd
mov dword [esp + 0x20], 0xc2c2b0ac
mov dword [esp + 0x24], 0xffcac08d
mov dword [esp + 0x28], 0xfac7fec3
mov dword [esp + 0x2c], 0x82f7c3c2
mov dword [esp + 0x30], 0xc895afa9
mov dword [esp + 0x34], 0xd5efddd6
mov dword [esp + 0x38], 0xd68a90d8
mov dword [esp + 0x3c], 0xd0ddd1d3
mov dword [esp + 0x40], 0xd8dfd1dd
mov dword [esp + 0x44], 0x9ddaf3a6
mov dword [esp + 0x48], 0xe2a3afa3
mov dword [esp + 0x4c], 0x92a69094
mov dword [esp + 0x50], 0x96a8d5ff
mov dword [esp + 0x54], 0xc9e78cb5
mov byte [esp + 0x58], 0x2c
mov word [esp + 0x59], 0
mov byte [esp + 0x5b], 0
mov dword [esp + 4], 0
mov edx, dword [esp + 4]
cmp edx, 0x3f
ja 0x409b53
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 4]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x1c]
add edx, 0x8ca11f98
xor edx, esi
mov dword [esp], edx
mov edx, dword [esp]
add dl, 8
mov esi, dword [esp + 4]
mov byte [esp + esi + 0x1c], dl
inc dword [esp + 4]
mov edx, dword [esp + 4]
cmp edx, 0x40
jb 0x409b20
mov esi, dword [esp + 0x70]
movzx ebx, byte [esp + 0x1c]
mov edx, eax
test bl, bl
je 0x409b7b
lea edi, [esp + 0x1d]
mov edx, eax
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x409b70
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x409b9b
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409b90
mov esi, dword [esp + 0x74]
mov byte [edx], 0
movzx ebx, byte [esp + 8]
test bl, bl
je 0x409bbb
lea edi, [esp + 9]
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x409bb0
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x409bdb
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409bd0
mov byte [edx], 0
movzx ebx, byte [esp + 0x14]
test bl, bl
je 0x409bfb
lea esi, [esp + 0x15]
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409bf0
mov byte [edx], 0
sub edx, eax
add dword [ecx + 0x60], edx
add esp, 0x5c
pop esi
pop edi
pop ebx
ret 0xc