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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov eax, dword [ebp + 8]
add eax, dword [ecx + 0x60]
mov word [esp + 0x18], 0x5b51
mov byte [esp + 0x1a], 0x40
mov dword [esp + 0x1b], 0
mov dword [esp + 0x1f], 0
mov word [esp + 0x23], 0
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
cmp edx, 0xc
ja 0x40981c
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 + 0x18]
lea edi, [edx + 0x26f5ed4b]
add edx, 0x4b
and edx, esi
or edi, esi
sub edi, edx
mov dword [esp + 0x28], edi
mov edx, dword [esp + 0x28]
add dl, 0xf3
mov esi, dword [esp + 8]
mov byte [esp + esi + 0x18], dl
inc dword [esp + 8]
mov edx, dword [esp + 8]
cmp edx, 0xd
jb 0x4097e0
mov dword [esp + 8], 0x6e686c02
mov word [esp + 0xc], 0x656e
mov dword [esp + 0xe], 0
mov dword [esp], 0
mov edx, dword [esp]
cmp edx, 9
ja 0x409887
nop
nop
nop
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 - 0x3fb89db0]
add edx, 0x50
and edx, esi
or edi, esi
sub edi, edx
mov dword [esp + 0x28], edi
mov edx, dword [esp + 0x28]
add dl, 0xd0
mov esi, dword [esp]
mov byte [esp + esi + 8], dl
inc dword [esp]
mov edx, dword [esp]
cmp edx, 0xa
jb 0x409850
mov dword [esp + 0x28], 0xe0e2d6d5
mov dword [esp + 0x2c], 0xe4ecd2d2
mov dword [esp + 0x30], 0xd79ce2d5
mov dword [esp + 0x34], 0xdcdfd4a3
mov dword [esp + 0x38], 0xecdfa3a0
mov dword [esp + 0x3c], 0xaefd3709
mov dword [esp + 0x40], 0xb1d7a9ac
mov dword [esp + 0x44], 0xc8e4f2b6
mov dword [esp + 0x48], 0xbeb5b5b3
mov dword [esp + 0x4c], 0xbec7bdc5
mov dword [esp + 0x50], 0x390cf3bc
mov dword [esp + 0x54], 0x4434743
mov dword [esp + 0x58], 0x3c403232
mov dword [esp + 0x5c], 0x384af907
mov dword [esp + 0x60], 0xe51f364d
mov byte [esp + 0x64], 0xc2
mov dword [esp + 0x65], 0
mov word [esp + 0x69], 0
mov dword [esp + 4], 0
mov edx, dword [esp + 4]
cmp edx, 0x42
ja 0x40997c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 4]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x28]
lea edi, [edx + 0xc794bd5]
add edx, 0xd5
and edx, esi
or edi, esi
sub edi, edx
mov dword [esp], edi
mov edx, dword [esp]
add dl, 0x2d
mov esi, dword [esp + 4]
mov byte [esp + esi + 0x28], dl
mov edx, dword [esp + 4]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + 4], edx
mov edx, dword [esp + 4]
cmp edx, 0x43
jb 0x409930
mov esi, dword [ebp + 0xc]
movzx ebx, byte [esp + 0x28]
mov edx, eax
test bl, bl
je 0x40999b
lea edi, [esp + 0x29]
mov edx, eax
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x409990
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x4099bb
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 0x4099b0
mov esi, dword [ebp + 0x10]
mov byte [edx], 0
movzx ebx, byte [esp + 8]
test bl, bl
je 0x4099db
lea edi, [esp + 9]
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x4099d0
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x4099fb
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 0x4099f0
mov byte [edx], 0
movzx ebx, byte [esp + 0x18]
test bl, bl
je 0x409a1b
lea esi, [esp + 0x19]
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409a10
mov byte [edx], 0
sub edx, eax
add dword [ecx + 0x60], edx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0xc