Function at 0x40d53a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0x10]
push edi
mov edx, dword [eax + 0x100]
mov edi, edx
shl edi, 4
add edi, eax
test byte [eax + 0x104], 2
jne 0x40d561
xor eax, eax
jmp 0x40d859
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
push esi
mov ch, byte [eax + 3]
mov cl, byte [eax + 2]
movzx esi, byte [eax + 1]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax]
shl ecx, 8
or ecx, esi
xor ecx, dword [edi]
movzx esi, byte [eax + 5]
mov dword [ebp - 0x20], ecx
xor ecx, ecx
mov ch, byte [eax + 7]
mov cl, byte [eax + 6]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 4]
shl ecx, 8
or ecx, esi
xor ecx, dword [edi + 4]
movzx esi, byte [eax + 9]
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
mov ch, byte [eax + 0xb]
mov cl, byte [eax + 0xa]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 8]
shl ecx, 8
or ecx, esi
xor ecx, dword [edi + 8]
movzx esi, byte [eax + 0xd]
mov dword [ebp - 0x18], ecx
xor ecx, ecx
mov ch, byte [eax + 0xf]
mov cl, byte [eax + 0xe]
movzx eax, byte [eax + 0xc]
shl ecx, 8
or ecx, esi
shl ecx, 8
or ecx, eax
lea eax, [ebp - 0x20]
xor ecx, dword [edi + 0xc]
dec edx
test edx, edx
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x10]
jbe 0x40d6f5
mov ebx, dword [eax + 8]
mov esi, dword [eax + 4]
shr ebx, 0x10
shr esi, 0x18
movzx ebx, bl
mov esi, dword [esi*4 + 0x42a4c0]
sub edi, 0x10
xor esi, dword [ebx*4 + 0x42a0c0]
mov ebx, dword [eax + 0xc]
shr ebx, 8
movzx ebx, bl
xor esi, dword [ebx*4 + 0x429cc0]
movzx ebx, byte [eax]
xor esi, dword [ebx*4 + 0x4298c0]
xor esi, dword [edi]
mov dword [ecx], esi
mov ebx, dword [eax + 0xc]
mov esi, dword [eax + 8]
shr ebx, 0x10
shr esi, 0x18
movzx ebx, bl
mov esi, dword [esi*4 + 0x42a4c0]
xor esi, dword [ebx*4 + 0x42a0c0]
mov ebx, dword [eax]
shr ebx, 8
movzx ebx, bl
xor esi, dword [ebx*4 + 0x429cc0]
movzx ebx, byte [eax + 4]
xor esi, dword [ebx*4 + 0x4298c0]
xor esi, dword [edi + 4]
mov dword [ecx + 4], esi
mov ebx, dword [eax + 4]
shr ebx, 8
movzx esi, bl
mov ebx, dword [eax + 0xc]
mov esi, dword [esi*4 + 0x429cc0]
shr ebx, 0x18
xor esi, dword [ebx*4 + 0x42a4c0]
mov ebx, dword [eax]
shr ebx, 0x10
movzx ebx, bl
xor esi, dword [ebx*4 + 0x42a0c0]
movzx ebx, byte [eax + 8]
xor esi, dword [ebx*4 + 0x4298c0]
xor esi, dword [edi + 8]
mov dword [ecx + 8], esi
mov ebx, dword [eax + 4]
shr ebx, 0x10
movzx esi, bl
mov ebx, dword [eax + 8]
mov esi, dword [esi*4 + 0x42a0c0]
shr ebx, 8
movzx ebx, bl
xor esi, dword [ebx*4 + 0x429cc0]
mov ebx, dword [eax]
shr ebx, 0x18
xor esi, dword [ebx*4 + 0x42a4c0]
movzx ebx, byte [eax + 0xc]
xor esi, dword [ebx*4 + 0x4298c0]
xor esi, dword [edi + 0xc]
dec edx
mov dword [ecx + 0xc], esi
mov esi, eax
mov eax, ecx
mov ecx, esi
jne 0x40d5f3
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
shr eax, 0x18
shr ecx, 0x10
movzx edx, cl
mov ecx, dword [eax*4 + 0x429440]
mov eax, dword [ebp - 4]
xor ecx, dword [edx*4 + 0x429040]
mov ebx, dword [ebp - 4]
shr eax, 8
movzx eax, al
shr ebx, 0x10
xor ecx, dword [eax*4 + 0x428c40]
mov eax, dword [ebp - 0x10]
movzx edx, al
movzx esi, bl
xor ecx, dword [edx*4 + 0x428840]
mov edx, dword [ebp - 8]
shr edx, 0x18
mov ebx, eax
sub edi, 0x10
mov edx, dword [edx*4 + 0x429440]
xor edx, dword [esi*4 + 0x429040]
xor ecx, dword [edi]
shr ebx, 8
movzx esi, bl
mov ebx, dword [ebp - 0xc]
xor edx, dword [esi*4 + 0x428c40]
movzx esi, byte [ebp - 0xc]
shr ebx, 8
xor edx, dword [esi*4 + 0x428840]
movzx esi, bl
mov ebx, dword [ebp - 4]
xor edx, dword [edi + 4]
mov esi, dword [esi*4 + 0x428c40]
shr ebx, 0x18
xor esi, dword [ebx*4 + 0x429440]
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
shr eax, 0x18
xor esi, dword [ebx*4 + 0x429040]
mov dword [ebp + 0x10], eax
movzx ebx, byte [ebp - 8]
xor esi, dword [ebx*4 + 0x428840]
mov ebx, dword [ebp - 0xc]
shr ebx, 0x10
xor esi, dword [edi + 8]
mov dword [ebp - 0x18], esi
movzx esi, bl
mov ebx, dword [ebp - 8]
mov esi, dword [esi*4 + 0x429040]
shr ebx, 8
movzx ebx, bl
xor esi, dword [ebx*4 + 0x428c40]
mov ebx, ecx
shr ebx, 8
xor esi, dword [eax*4 + 0x429440]
movzx eax, byte [ebp - 4]
xor esi, dword [eax*4 + 0x428840]
mov eax, dword [ebp + 0xc]
xor esi, dword [edi + 0xc]
mov byte [eax + 1], bl
mov byte [eax], cl
mov ebx, ecx
shr ecx, 0x18
mov byte [eax + 3], cl
mov ecx, edx
shr ecx, 8
mov byte [eax + 5], cl
mov ecx, edx
shr ecx, 0x10
shr ebx, 0x10
mov byte [eax + 4], dl
mov byte [eax + 6], cl
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], esi
shr edx, 0x18
mov byte [eax + 2], bl
mov byte [eax + 7], dl
mov byte [eax + 8], cl
mov edx, ecx
push 1
shr edx, 8
mov byte [eax + 9], dl
mov edx, ecx
shr ecx, 0x18
shr edx, 0x10
mov byte [eax + 0xb], cl
mov ecx, esi
mov byte [eax + 0xa], dl
mov edx, ecx
shr edx, 8
mov byte [eax + 0xd], dl
mov edx, ecx
mov byte [eax + 0xc], cl
shr edx, 0x10
shr ecx, 0x18
mov byte [eax + 0xe], dl
mov byte [eax + 0xf], cl
pop eax
pop esi
pop ebx
pop edi
leave
ret 0xc