Function at 0x40a008
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
sub esp, 0x5c
mov eax, dword [esp + 0x6c]
add eax, dword [ecx + 0x60]
mov dword [esp + 0x14], 0xe0503
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
cmp edx, 3
ja 0x40a06d
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]
add edx, 0x213443fd
xor edx, esi
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x18]
add dl, 0xf
mov esi, dword [esp + 8]
mov byte [esp + esi + 0x14], dl
inc dword [esp + 8]
mov edx, dword [esp + 8]
cmp edx, 4
jb 0x40a038
mov dword [esp + 8], 0xeee4e09e
mov word [esp + 0xc], 0xf3ea
mov dword [esp + 0xe], 0
mov byte [esp + 0x12], 0
mov dword [esp], 0
mov edx, dword [esp]
cmp edx, 0xa
ja 0x40a0df
mov edx, dword [esp]
mov esi, dword [esp]
movzx esi, byte [esp + esi + 8]
lea edi, [edx + esi]
add edi, 0x8bcbb9d5
add edx, 0x8bcbb9d5
and edx, esi
mov esi, edi
xor esi, edx
add esi, edx
not edx
and edx, edi
add edx, edx
sub edx, esi
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x18]
add dl, 0xd7
mov esi, dword [esp]
mov byte [esp + esi + 8], dl
inc dword [esp]
mov edx, dword [esp]
cmp edx, 0xb
jb 0x40a098
mov dword [esp + 0x18], 0xfaf83c3d
mov dword [esp + 0x1c], 0xfefe282c
mov dword [esp + 0x20], 0xf3eef82d
mov dword [esp + 0x24], 0xf6f3f2ef
mov dword [esp + 0x28], 0xd60be7e6
mov dword [esp + 0x2c], 0x10edb3b1
mov dword [esp + 0x30], 0x1d031d12
mov dword [esp + 0x34], 0x2e6d810
mov dword [esp + 0x38], 0x8051917
mov dword [esp + 0x3c], 0x1b091d
mov dword [esp + 0x40], 0x15def702
mov dword [esp + 0x44], 0xce0f030f
mov dword [esp + 0x48], 0x263a1814
mov dword [esp + 0x4c], 0x2230e5c3
mov dword [esp + 0x50], 0xe1cb2c35
mov byte [esp + 0x54], 0x8c
mov dword [esp + 0x55], 0
mov dword [esp + 0x58], 0
mov dword [esp + 4], 0
mov edx, dword [esp + 4]
cmp edx, 0x43
ja 0x40a1bb
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 + 0x18]
add edx, 0x2af0696e
xor edx, esi
mov dword [esp], edx
mov edx, dword [esp]
add dl, 0xda
mov esi, dword [esp + 4]
mov byte [esp + esi + 0x18], dl
inc dword [esp + 4]
mov edx, dword [esp + 4]
cmp edx, 0x44
jb 0x40a188
mov esi, dword [esp + 0x70]
movzx ebx, byte [esp + 0x18]
mov edx, eax
test bl, bl
je 0x40a1e3
lea edi, [esp + 0x19]
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 0x40a1d8
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40a203
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 0x40a1f8
mov esi, dword [esp + 0x74]
mov byte [edx], 0
movzx ebx, byte [esp + 8]
test bl, bl
je 0x40a223
lea edi, [esp + 9]
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x40a218
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40a243
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 0x40a238
mov byte [edx], 0
movzx ebx, byte [esp + 0x14]
test bl, bl
je 0x40a263
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 0x40a258
mov byte [edx], 0
sub edx, eax
mov eax, dword [ecx + 0x60]
mov esi, eax
and esi, edx
xor edx, eax
lea eax, [edx + esi*2]
mov dword [ecx + 0x60], eax
add esp, 0x5c
pop esi
pop edi
pop ebx
ret 0xc