Function at 0x409560
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 4], eax
mov word [esp + 8], 0x9d93
mov byte [esp + 0xa], 0x66
mov dword [esp + 0xb], 0
mov ebx, 0xeec5be7
mov ebp, 0x19
nop
nop
nop
nop
nop
movzx edi, byte [esp + ebp - 0x11]
mov eax, ebp
and eax, edi
mov ecx, eax
and ecx, 0x3d
mov edx, eax
and edx, 2
or eax, 2
imul eax, edx
xor edx, 2
imul edx, ecx
add eax, edx
lea ecx, [ebx + eax]
xor ecx, edi
not eax
add eax, ebp
and eax, edi
add eax, eax
sub eax, ecx
add al, 0x83
mov byte [esp + ebp - 0x11], al
dec ebx
inc ebp
cmp ebp, 0x20
jne 0x4095a0
mov dword [esp + 0x14], 0xf2f0f4ee
mov dword [esp + 0x18], 0xcdf2
mov byte [esp + 0x1c], 0
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + ebx + 0x14]
lea eax, [ebx + 0x193d74d2]
lea edx, [ebx*2 + 0x327ae9a4]
mov esi, ebx
sub esi, edx
neg edx
add edx, ebx
add edx, 0x193d74d1
not edx
or edx, 0x1c393357
add edx, esi
add edx, 0x193d74d2
and eax, 0x10444a8
or eax, edx
xor eax, ecx
lea edx, [eax + eax]
mov ecx, edx
and ecx, 0xca
mov esi, eax
xor esi, 0xb2
and edx, 2
and eax, 1
xor ecx, 0x75
sub ecx, esi
and ecx, 0xfe
or ecx, eax
not ecx
add ecx, edx
mov byte [esp + ebx + 0x14], cl
mov eax, ebx
and eax, 1
xor ebx, 1
lea ebx, [ebx + eax*2]
cmp ebx, 9
jb 0x409600
mov dword [esp + 0x24], 0x103bfdf3
mov dword [esp + 0x28], 0xb1d6f16
mov dword [esp + 0x2c], 0x222c870
mov dword [esp + 0x30], 0x780b0b75
mov dword [esp + 0x34], 0xd7b0f
mov dword [esp + 0x38], 0x73d23906
mov dword [esp + 0x3c], 0xbe797d7d
mov dword [esp + 0x40], 0x66066874
mov dword [esp + 0x44], 0x6270a741
mov dword [esp + 0x48], 0xbf457c77
mov byte [esp + 0x4c], 0x9c
mov word [esp + 0x4d], 0
mov byte [esp + 0x4f], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0x29
xor cl, byte [esp + eax + 0x24]
add cl, 0x33
mov byte [esp + eax + 0x24], cl
inc eax
cmp eax, 0x2c
jne 0x4096e0
mov eax, dword [esp + 4]
add dword [esp + 0x10], eax
mov dword [esp], 0x5a6877
mov edi, 0xea735c0f
mov ebx, 0x158ca3f0
mov ebp, 0x6a735c10
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + edi + 0x158ca3f1]
lea eax, [edi + 0x158ca400]
mov dword [esp + 4], eax
lea esi, [ebx - 0x158ca300]
mov ecx, edi
or ecx, edx
mov eax, edx
not eax
or eax, esi
and eax, ecx
not eax
or eax, ebx
add eax, ebp
add eax, eax
mov ecx, eax
not ecx
and ecx, dword [esp + 4]
and eax, esi
sub ecx, eax
add cl, dl
add cl, 0xb5
mov byte [esp + edi + 0x158ca3f1], cl
inc edi
dec ebx
inc ebp
cmp edi, 0xea735c13
jne 0x409720
movzx eax, byte [esp]
mov esi, dword [esp + 0x10]
mov edi, esi
test al, al
je 0x40979b
lea ecx, [esp + 1]
mov edi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409790
mov byte [edi], 0
mov edx, dword [esp + 0x20]
movzx eax, byte [edx + 0x60]
test al, al
je 0x4097bb
lea ecx, [edx + 0x61]
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x4097b0
mov byte [edi], 0
movzx eax, byte [esp + 0x24]
test al, al
je 0x4097db
lea ecx, [esp + 0x25]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x4097d0
mov byte [edi], 0
mov ecx, dword [esp + 0x68]
movzx eax, byte [ecx]
test al, al
je 0x4097fb
inc ecx
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x4097f0
mov byte [edi], 0
movzx eax, byte [esp + 0x14]
test al, al
je 0x40981b
lea ecx, [esp + 0x15]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409810
mov byte [edi], 0
mov ecx, dword [esp + 0x6c]
movzx eax, byte [ecx]
test al, al
je 0x40983b
inc ecx
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409830
mov byte [edi], 0
movzx eax, byte [esp + 8]
test al, al
je 0x40985b
lea ecx, [esp + 9]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409850
mov byte [edi], 0
sub edi, esi
add dword [edx + 0x80], edi
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret 0xc