Function at 0x409670
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov edx, dword [esp + 0x70]
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp + 8], 0x7d73
mov byte [esp + 0xa], 0x66
mov word [esp + 0xb], 0
mov ebx, 0xa9bfd5e9
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [esp + ebx + 0x56402a1f]
xor edi, ebx
mov eax, edi
and eax, 0xa900d072
mov ebp, eax
not ebp
add edi, ebp
add edi, 0xaf40d273
mov ebp, edi
and ebp, eax
xor eax, edi
lea eax, [eax + ebp*2]
inc al
mov byte [esp + ebx + 0x56402a1f], al
inc ebx
cmp ebx, 0xa9bfd5ee
jne 0x4096b0
mov dword [esp + 0x10], 0x8e888ce2
mov word [esp + 0x14], 0x858e
mov dword [esp + 0x16], 0
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + ebx + 0x10]
mov edi, ebx
or edi, 0xf33d0420
xor edi, eax
mov eax, edi
and eax, 0x5f
xor edi, 0x5f
lea eax, [edi + eax*2]
inc al
mov byte [esp + ebx + 0x10], al
mov eax, ebx
xor eax, 0xfffffffe
mov ebp, ebx
or ebp, 1
and ebp, eax
mov eax, ebp
and eax, 0xd
mov edi, ebp
and edi, 2
or ebp, 2
imul ebp, edi
xor edi, 2
imul edi, eax
xor ebx, 1
add ebx, ebp
add ebx, edi
cmp ebx, 0xa
jb 0x409710
mov dword [esp + 0x24], 0xe4195f5d
mov dword [esp + 0x28], 0xe1ffe9e6
mov dword [esp + 0x2c], 0xf61224ec
mov dword [esp + 0x30], 0xe4e9ede3
mov dword [esp + 0x34], 0x140fe5f1
mov dword [esp + 0x38], 0x9c2e316
mov dword [esp + 0x3c], 0xda1b1f13
mov dword [esp + 0x40], 0xa160c00
mov dword [esp + 0x44], 0x1604c9ef
mov dword [esp + 0x48], 0xddf71801
mov byte [esp + 0x4c], 0xb0
mov dword [esp + 0x4d], 0
mov dword [esp + 0x50], 0
xor ebx, ebx
mov ecx, dword [esp + 0x68]
nop
nop
nop
nop
nop
nop
nop
mov eax, ebx
add al, 0xee
xor al, byte [esp + ebx + 0x24]
add al, 0x5a
mov byte [esp + ebx + 0x24], al
inc ebx
cmp ebx, 0x30
jne 0x4097d0
add ecx, dword [esp + 0x1c]
mov word [esp], 0x4c4d
mov byte [esp + 2], 0x96
mov word [esp + 3], 0
mov byte [esp + 5], 0
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, edi
and ebx, 4
mov eax, edi
and eax, 2
mov ebp, eax
xor ebp, 2
imul ebp, ebx
or ebx, 2
imul ebx, eax
mov eax, edi
xor eax, 0x66
add eax, ebp
add eax, ebx
xor al, byte [esp + edi]
add al, 2
mov byte [esp + edi], al
inc edi
cmp edi, 6
jne 0x409810
movzx ebx, byte [esp]
mov edi, ecx
test bl, bl
je 0x40985c
lea ebp, [esp + 1]
mov edi, ecx
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ebp]
inc ebp
test bl, bl
jne 0x409850
mov byte [edi], 0
mov eax, dword [esp + 0x20]
movzx ebx, byte [eax + 0x60]
test bl, bl
je 0x40987c
lea ebp, [eax + 0x61]
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ebp]
inc ebp
test bl, bl
jne 0x409870
mov byte [edi], 0
movzx ebx, byte [esp + 0x24]
test bl, bl
je 0x40989c
lea ebp, [esp + 0x25]
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ebp]
inc ebp
test bl, bl
jne 0x409890
mov byte [edi], 0
movzx ebx, byte [esi]
test bl, bl
je 0x4098bb
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x4098b0
mov byte [edi], 0
movzx ebx, byte [esp + 0x10]
test bl, bl
je 0x4098db
lea esi, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x4098d0
mov byte [edi], 0
movzx ebx, byte [edx]
test bl, bl
je 0x4098fb
inc edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [edx]
inc edx
test bl, bl
jne 0x4098f0
mov byte [edi], 0
movzx edx, byte [esp + 8]
test dl, dl
je 0x40991b
lea esi, [esp + 9]
nop
nop
nop
nop
nop
mov byte [edi], dl
inc edi
movzx edx, byte [esi]
inc esi
test dl, dl
jne 0x409910
mov byte [edi], 0
sub edi, ecx
add dword [eax + 0x80], edi
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc