Function at 0x409470
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x74
mov eax, dword [esp + 0x88]
mov dword [esp + 0x34], ecx
mov ecx, dword [ecx + 0x80]
mov dword [esp + 8], ecx
mov dword [esp + 0xe], 0x80688716
mov dword [esp + 0x12], 0x791c8672
mov dword [esp + 0x16], 0xb11a8d7d
mov dword [esp + 0x1a], 0x800d7461
mov dword [esp + 0x1e], 0xbc0db519
mov dword [esp + 0x22], 0x801eb112
mov dword [esp + 0x26], 0x875f8c5e
mov dword [esp + 0x2a], 0xb301ba01
mov dword [esp + 0x2e], 0x18bc1911
mov word [esp + 0x32], 0x17bd
xor ebp, ebp
nop
nop
nop
lea ebx, [ebp + 0x263d]
xor bx, word [esp + ebp*2 + 0xe]
add ebx, 0xffffce18
mov word [esp + ebp*2 + 0xe], bx
mov ebx, ebp
not ebx
or ebx, 1
mov esi, ebp
and esi, 0x1e
mov edi, ebp
xor edi, 1
add edi, ebx
sub edi, esi
lea ebp, [edi + ebp*2]
inc ebp
cmp ebp, 0x13
jb 0x4094e0
mov dword [esp + 4], 0xa276b769
xor edi, edi
nop
nop
movzx esi, word [esp + edi*2 + 4]
lea ebx, [edi + 0x84d3]
mov ebp, 0x7b2c
sub ebp, edi
xor ebp, ebx
and ebp, esi
xor ebp, ebx
add ebp, 0xffffd968
mov word [esp + edi*2 + 4], bp
lea edi, [edi + edi*2]
xor edi, 1
cmp edi, 2
jb 0x409520
mov dword [esp + 0x3a], 0x7e8be5aa
mov dword [esp + 0x3e], 0x41ef7bd7
mov dword [esp + 0x42], 0x448800df
mov dword [esp + 0x46], 0x7ad17fde
mov dword [esp + 0x4a], 0x7ed97bd6
mov dword [esp + 0x4e], 0x49a235df
mov dword [esp + 0x52], 0xd97ddc
mov dword [esp + 0x56], 0x4cd24ce1
mov dword [esp + 0x5a], 0x4ca60f8c
mov dword [esp + 0x5e], 0xdf748a4
mov dword [esp + 0x62], 0x48a0449d
mov dword [esp + 0x66], 0x49de32df
mov dword [esp + 0x6a], 0x419543a6
mov dword [esp + 0x6e], 0x30974090
mov word [esp + 0x72], 0xefd1
xor edi, edi
mov ecx, eax
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [esp + edi*2 + 0x3a]
lea esi, [edi + 0x1e2f]
and esi, ebx
mov edx, esi
and edx, 0x1e7d
mov eax, esi
and eax, 2
mov ebp, esi
or ebp, 0xfffd
inc ebp
imul ebp, edx
or esi, 2
imul esi, eax
sub ebp, esi
lea eax, [edi + ebp]
add eax, 0x1e2f
add eax, ebx
add eax, 0xe88
mov word [esp + edi*2 + 0x3a], ax
lea eax, [edi + edi]
and eax, 2
xor edi, 1
add edi, eax
cmp edi, 0x1d
jb 0x4095d0
add ecx, dword [esp + 8]
mov dword [esp], 0xf953a47f
xor edx, edx
nop
movzx ebx, word [esp + edx*2]
mov edi, edx
or edi, 0xe342
and edi, ebx
mov eax, 0xa5401cbd
sub eax, edx
not ebx
and ebx, eax
not edi
lea ebp, [ebx + ebx]
not ebp
add ebp, ebx
and ebp, edi
mov eax, ebp
or eax, 0xe5ef
add eax, ebp
not ebp
or ebp, 0xe5ef
add eax, ebp
add eax, 2
mov word [esp + edx*2], ax
mov eax, edx
xor eax, 0xfffffffd
lea edx, [eax + edx*2]
add edx, 4
cmp edx, 2
jb 0x409630
movzx ebx, byte [esp]
mov edx, ecx
test bl, bl
je 0x40969b
lea edi, [esp + 1]
mov edx, ecx
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x409690
mov byte [edx], 0
mov ebp, dword [esp + 0x34]
movzx ebx, byte [ebp + 0x60]
test bl, bl
mov eax, dword [esp + 0x8c]
je 0x4096cb
lea edi, [ebp + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x4096c0
mov byte [edx], 0
movzx ebx, byte [esp + 0x3a]
test bl, bl
je 0x4096eb
lea edi, [esp + 0x3b]
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x4096e0
mov byte [edx], 0
movzx ebx, byte [eax]
test bl, bl
mov dword [esp + 8], ecx
je 0x40970b
inc eax
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x409700
mov byte [edx], 0
movzx ecx, byte [esp + 4]
test cl, cl
je 0x40972b
lea edi, [esp + 5]
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [edi]
inc edi
test cl, cl
jne 0x409720
mov byte [edx], 0
movzx ecx, byte [esp + 0xe]
test cl, cl
je 0x40974b
lea edi, [esp + 0xf]
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [edi]
inc edi
test cl, cl
jne 0x409740
mov byte [edx], 0
mov eax, dword [esp + 0x94]
mov ecx, eax
mov ebx, eax
shr ecx, 2
mov esi, dword [esp + 0x90]
mov eax, esi
mov edi, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, ebx
and ebx, 0xfffffffc
add edx, ebx
add ebx, esi
mov ecx, eax
mov esi, eax
shr ecx, 1
and ecx, 1
mov eax, ebx
mov edi, edx
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
mov eax, esi
mov ecx, esi
and ecx, 2
add edx, ecx
test al, 1
je 0x40979a
movzx eax, byte [ebx + ecx]
mov byte [edx], al
inc edx
mov dword [esp + 0x3a], 0x703a703b
mov word [esp + 0x3e], 0x7a38
mov ecx, 0x2a06
nop
nop
movzx edi, word [esp + ecx*2 - 0x53d2]
mov eax, ecx
and eax, edi
add edi, ecx
add eax, eax
lea esi, [edi*2 - 2]
sub edi, eax
add edi, 0x9e09afcf
and esi, 2
xor edi, 1
add edi, esi
mov word [esp + ecx*2 - 0x53d2], di
inc ecx
cmp ecx, 0x2a09
jne 0x4097b0
mov dword [esp + 0xe], 0x9fceb2ef
mov word [esp + 0x12], 0xcce4
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
lea eax, [ecx + 0x7772]
xor ax, word [esp + ecx*2 + 0xe]
add eax, 0x4470
mov word [esp + ecx*2 + 0xe], ax
inc ecx
cmp ecx, 3
jne 0x409800
movzx ecx, byte [esp + 0xe]
test cl, cl
je 0x40983b
lea edi, [esp + 0xf]
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [edi]
inc edi
test cl, cl
jne 0x409830
mov byte [edx], 0
movzx ecx, byte [ebp + 0x60]
test cl, cl
je 0x40985b
lea edi, [ebp + 0x61]
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [edi]
inc edi
test cl, cl
jne 0x409850
mov byte [edx], 0
movzx ecx, byte [esp + 0x3a]
test cl, cl
je 0x40987b
lea edi, [esp + 0x3b]
nop
nop
nop
nop
nop
mov byte [edx], cl
inc edx
movzx ecx, byte [edi]
inc edi
test cl, cl
jne 0x409870
mov byte [edx], 0
sub edx, dword [esp + 8]
add dword [ebp + 0x80], edx
add esp, 0x74
pop esi
pop edi
pop ebx
pop ebp
ret 0x10