Function at 0x40656f
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor esi, esi
push edi
cmp dword [0x40d670], esi
jne 0x40658f
call fcn.0040633e
mov dword [0x40d670], 1
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea eax, [edx + 0x18]
mov dword [edx], 0xe
mov dword [edx + 4], eax
add ecx, 2
movzx edi, byte [ecx + 1]
movzx ebx, byte [ecx]
shl edi, 8
or edi, ebx
movzx ebx, byte [ecx - 1]
shl edi, 8
or edi, ebx
movzx ebx, byte [ecx - 2]
shl edi, 8
or edi, ebx
mov dword [eax + esi*4], edi
inc esi
add ecx, 4
cmp esi, 8
jb 0x4065a4
mov ecx, dword [edx]
sub ecx, 0xa
je 0x40673f
dec ecx
dec ecx
je 0x4066be
dec ecx
dec ecx
jne 0x4067b1
and dword [ebp - 4], ecx
mov esi, 0xff
mov ecx, dword [eax + 0x1c]
movzx edx, byte [eax + 0x1f]
movzx edx, byte [edx + 0x40b448]
and ecx, esi
movzx ecx, byte [ecx + 0x40b448]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0x1e]
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0x1d]
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
mov edx, dword [ebp - 4]
xor ecx, dword [edx + 0x40bd48]
mov edx, dword [eax + 4]
xor ecx, dword [eax]
add dword [ebp - 4], 4
xor edx, ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [eax + 8]
xor ecx, edx
mov dword [eax + 0x28], ecx
mov dword [eax + 0x24], edx
mov edx, dword [eax + 0xc]
xor edx, ecx
mov dword [eax + 0x2c], edx
movzx ecx, byte [eax + 0x2f]
movzx ecx, byte [ecx + 0x40b448]
movzx ebx, byte [eax + 0x2e]
movzx ebx, byte [ebx + 0x40b448]
shl ecx, 8
xor ecx, ebx
movzx ebx, byte [eax + 0x2d]
movzx ebx, byte [ebx + 0x40b448]
shl ecx, 8
xor ecx, ebx
and edx, esi
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
xor ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
xor edx, ecx
mov dword [eax + 0x30], ecx
mov ecx, dword [eax + 0x18]
xor ecx, edx
mov dword [eax + 0x38], ecx
xor ecx, dword [eax + 0x1c]
mov dword [eax + 0x34], edx
mov dword [eax + 0x3c], ecx
add eax, 0x20
cmp dword [ebp - 4], 0x1c
jb 0x4065f1
jmp 0x4067ae
xor ebx, ebx
mov esi, 0xff
mov ecx, dword [eax + 0x14]
movzx edx, byte [eax + 0x17]
movzx edx, byte [edx + 0x40b448]
and ecx, esi
movzx ecx, byte [ecx + 0x40b448]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0x16]
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0x15]
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
xor ecx, dword [ebx + 0x40bd48]
mov edx, dword [eax + 4]
xor ecx, dword [eax]
add ebx, 4
xor edx, ecx
mov dword [eax + 0x18], ecx
mov ecx, dword [eax + 8]
xor ecx, edx
mov dword [eax + 0x1c], edx
mov edx, dword [eax + 0xc]
xor edx, ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [eax + 0x10]
xor ecx, edx
mov dword [eax + 0x28], ecx
xor ecx, dword [eax + 0x14]
mov dword [eax + 0x24], edx
mov dword [eax + 0x2c], ecx
add eax, 0x18
cmp ebx, 0x20
jb 0x4066c5
jmp 0x4067ae
xor ebx, ebx
mov esi, 0xff
mov ecx, dword [eax + 0xc]
movzx edx, byte [eax + 0xf]
movzx edx, byte [edx + 0x40b448]
and ecx, esi
movzx ecx, byte [ecx + 0x40b448]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0xe]
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
movzx edx, byte [eax + 0xd]
movzx edx, byte [edx + 0x40b448]
shl ecx, 8
xor ecx, edx
xor ecx, dword [ebx + 0x40bd48]
mov edx, dword [eax + 4]
xor ecx, dword [eax]
add ebx, 4
xor edx, ecx
mov dword [eax + 0x10], ecx
mov ecx, dword [eax + 8]
xor ecx, edx
mov dword [eax + 0x18], ecx
xor ecx, dword [eax + 0xc]
mov dword [eax + 0x14], edx
mov dword [eax + 0x1c], ecx
add eax, 0x10
cmp ebx, 0x28
jb 0x406746
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
lea edi, [edx + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret