Function at 0x40a110
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
sub esp, 0x54
mov eax, dword [esp + 0x64]
add eax, dword [ecx + 0x60]
mov dword [esp + 0x10], 0xf58282
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
cmp edx, 3
ja 0x40a182
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 + 0x10]
lea edi, [edx + esi]
add edx, 0xc9
and edx, esi
add edx, edx
sub edi, edx
add edi, 0xf79afbc9
mov dword [esp + 0x14], edi
mov edx, dword [esp + 0x14]
add dl, 0xc2
mov esi, dword [esp + 8]
mov byte [esp + esi + 0x10], dl
inc dword [esp + 8]
mov edx, dword [esp + 8]
cmp edx, 4
jb 0x40a140
mov dword [esp + 8], 0xd8dedef0
mov dword [esp + 0xc], 0xd7dc
mov dword [esp], 0
mov edx, dword [esp]
cmp edx, 7
ja 0x40a1e0
nop
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]
add edx, 0x2ef5992
xor edx, esi
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x14]
add dl, 0xc0
mov esi, dword [esp]
mov byte [esp + esi + 8], dl
inc dword [esp]
mov edx, dword [esp]
cmp edx, 8
jb 0x40a1b0
mov dword [esp + 0x14], 0x7773bdbc
mov dword [esp + 0x18], 0x7375a1a3
mov dword [esp + 0x1c], 0x787571ac
mov dword [esp + 0x20], 0x7b767f72
mov dword [esp + 0x24], 0x53869091
mov dword [esp + 0x28], 0x89642c28
mov dword [esp + 0x2c], 0x868e9a85
mov dword [esp + 0x30], 0x876d419f
mov dword [esp + 0x34], 0x819c9e82
mov dword [esp + 0x38], 0x999e869c
mov dword [esp + 0x3c], 0x9e254095
mov dword [esp + 0x40], 0x53928c92
mov dword [esp + 0x44], 0xa3b1a1a3
mov dword [esp + 0x48], 0xa7ab1a7e
mov dword [esp + 0x4c], 0x6a76ada4
mov byte [esp + 0x50], 0x33
mov word [esp + 0x51], 0
mov byte [esp + 0x53], 0
mov dword [esp + 4], 0
mov edx, dword [esp + 4]
cmp edx, 0x3f
ja 0x40a2b3
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 4]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x14]
add edx, 0xfe0c4df0
xor edx, esi
mov dword [esp], edx
mov edx, dword [esp]
add dl, 0xe1
mov esi, dword [esp + 4]
mov byte [esp + esi + 0x14], dl
inc dword [esp + 4]
mov edx, dword [esp + 4]
cmp edx, 0x40
jb 0x40a280
mov esi, dword [esp + 0x68]
movzx ebx, byte [esp + 0x14]
mov edx, eax
test bl, bl
je 0x40a2db
lea edi, [esp + 0x15]
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 0x40a2d0
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40a2fb
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 0x40a2f0
mov esi, dword [esp + 0x6c]
mov byte [edx], 0
movzx ebx, byte [esp + 8]
test bl, bl
je 0x40a31b
lea edi, [esp + 9]
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x40a310
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40a33b
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 0x40a330
mov byte [edx], 0
movzx ebx, byte [esp + 0x10]
test bl, bl
je 0x40a35b
lea esi, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x40a350
mov byte [edx], 0
sub edx, eax
add dword [ecx + 0x60], edx
add esp, 0x54
pop esi
pop edi
pop ebx
ret 0xc