Function at 0x40d280
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 + 8], 0xba85b7
mov dword [esp + 0xc], 0
mov edx, dword [esp + 0xc]
cmp edx, 3
ja 0x40d2f0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 0xc]
mov esi, dword [esp + 0xc]
movzx esi, byte [esp + esi + 8]
mov edi, edx
xor edi, 0xea9b419f
and edx, 0xea9b419f
lea edx, [edi + edx*2]
xor edx, esi
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x18]
add dl, 0xe5
mov esi, dword [esp + 0xc]
mov byte [esp + esi + 8], dl
inc dword [esp + 0xc]
mov edx, dword [esp + 0xc]
cmp edx, 4
jb 0x40d2b0
mov dword [esp + 0xc], 0xc6c8c4d2
mov dword [esp + 0x10], 0xedd6
mov byte [esp + 0x14], 0
mov dword [esp], 0
mov edx, dword [esp]
cmp edx, 8
ja 0x40d375
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 + 0xc]
mov edi, edx
xor edi, 0xad5607ac
and edx, 0x2d5607ac
lea edx, [edi + edx*2]
lea edi, [edx + esi]
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]
mov esi, edx
xor esi, 0x5c
and edx, 0x23
add edx, edx
sub edx, esi
mov esi, dword [esp]
mov byte [esp + esi + 0xc], dl
inc dword [esp]
mov edx, dword [esp]
cmp edx, 9
jb 0x40d320
mov dword [esp + 0x18], 0xa2bce8f7
mov dword [esp + 0x1c], 0xa6ba9490
mov dword [esp + 0x20], 0xb5a2ac97
mov dword [esp + 0x24], 0xaea9b2a1
mov dword [esp + 0x28], 0xde919da2
mov dword [esp + 0x2c], 0x9cabf1fb
mov dword [esp + 0x30], 0x9399979e
mov dword [esp + 0x34], 0x9aa2d494
mov dword [esp + 0x38], 0x8c8b8b91
mov dword [esp + 0x3c], 0x8c818b87
mov dword [esp + 0x40], 0x8bd2bd8e
mov dword [esp + 0x44], 0xc6858181
mov dword [esp + 0x48], 0x6e7e6c90
mov dword [esp + 0x4c], 0x6a7c2f45
mov dword [esp + 0x50], 0x2741787f
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 4], 0
mov edx, dword [esp + 4]
cmp edx, 0x43
ja 0x40d443
nop
nop
mov edx, dword [esp + 4]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x18]
add edx, 0xf62fc1cf
xor edx, esi
mov dword [esp], edx
mov edx, dword [esp]
add dl, 0xf5
mov esi, dword [esp + 4]
mov byte [esp + esi + 0x18], dl
inc dword [esp + 4]
mov edx, dword [esp + 4]
cmp edx, 0x44
jb 0x40d410
mov esi, dword [esp + 0x70]
movzx ebx, byte [esp + 0x18]
mov edx, eax
test bl, bl
je 0x40d46b
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 0x40d460
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40d48b
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 0x40d480
mov esi, dword [esp + 0x74]
mov byte [edx], 0
movzx ebx, byte [esp + 0xc]
test bl, bl
je 0x40d4ab
lea edi, [esp + 0xd]
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x40d4a0
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40d4cb
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 0x40d4c0
mov byte [edx], 0
movzx ebx, byte [esp + 8]
test bl, bl
je 0x40d4eb
lea esi, [esp + 9]
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x40d4e0
mov byte [edx], 0
sub edx, eax
add dword [ecx + 0x60], edx
add esp, 0x5c
pop esi
pop edi
pop ebx
ret 0xc