Function at 0x40ff43
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
add eax, 0xa
push 8
cdq
pop ecx
idiv ecx
mov ebx, edx
test ebx, ebx
je 0x40ff64
push ecx
pop eax
sub eax, ebx
mov ebx, eax
mov edi, dword [sym.imp.MSVCRT.dll_rand]
call edi
and al, 0xf8
push 1
or al, bl
pop esi
mov byte [ebp - 0x10], al
mov eax, ebx
dec ebx
test eax, eax
je 0x40ff88
inc ebx
call edi
mov byte [ebp + esi - 0x10], al
inc esi
dec ebx
jne 0x40ff7e
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 0x18]
lea ebx, [ebp - 0x18]
lea edi, [ebp - 0x18]
mov dword [ebp - 4], 1
and dword [eax], 0
sub ebx, dword [ebp + 0x14]
cmp esi, 8
jge 0x40ffbb
call dword [sym.imp.MSVCRT.dll_rand]
mov byte [ebp + esi - 0x10], al
inc esi
inc dword [ebp - 4]
cmp esi, 8
jne 0x410010
lea eax, [ebp - 0x10]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x10]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 8
jl 0x40ffc4
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push dword [ebp + 0x10]
push eax
call fcn.0040fdfa
mov ecx, dword [ebp + 0x14]
add esp, 0xc
mov dword [ebp - 8], ebx
push 8
pop esi
mov al, byte [ebx + ecx]
xor byte [ecx], al
inc ecx
dec esi
jne 0x40ffee
mov eax, dword [ebp + 0x18]
lea esi, [ebp - 0x10]
lea edi, [ebp - 0x18]
add dword [eax], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x14]
xor esi, esi
mov dword [ebp + 0x14], ecx
sub ebx, 8
cmp dword [ebp - 4], 2
jle 0x40ffa5
cmp dword [ebp + 0xc], 0
je 0x410095
lea ebx, [ebp - 0x18]
sub ebx, dword [ebp + 0x14]
cmp esi, 8
jge 0x41003a
mov eax, dword [ebp + 8]
inc esi
inc dword [ebp + 8]
dec dword [ebp + 0xc]
mov al, byte [eax]
cmp esi, 8
mov byte [ebp + esi - 0x11], al
jne 0x41008f
lea eax, [ebp - 0x10]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x10]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 8
jl 0x410043
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push dword [ebp + 0x10]
push eax
call fcn.0040fdfa
mov ecx, dword [ebp + 0x14]
add esp, 0xc
mov dword [ebp - 8], ebx
push 8
pop esi
mov al, byte [ebx + ecx]
xor byte [ecx], al
inc ecx
dec esi
jne 0x41006d
mov eax, dword [ebp + 0x18]
lea esi, [ebp - 0x10]
lea edi, [ebp - 0x18]
add dword [eax], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x14]
xor esi, esi
mov dword [ebp + 0x14], ecx
sub ebx, 8
cmp dword [ebp + 0xc], 0
jne 0x410022
lea ebx, [ebp - 0x18]
mov dword [ebp - 4], 1
sub ebx, dword [ebp + 0x14]
cmp esi, 8
jge 0x4100b3
and byte [ebp + esi - 0x10], 0
inc esi
inc dword [ebp - 4]
cmp esi, 8
jne 0x410108
lea eax, [ebp - 0x10]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x10]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 8
jl 0x4100bc
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push dword [ebp + 0x10]
push eax
call fcn.0040fdfa
mov ecx, dword [ebp + 0x14]
add esp, 0xc
mov dword [ebp - 8], ebx
push 8
pop esi
mov al, byte [ebx + ecx]
xor byte [ecx], al
inc ecx
dec esi
jne 0x4100e6
mov eax, dword [ebp + 0x18]
lea esi, [ebp - 0x10]
lea edi, [ebp - 0x18]
add dword [eax], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x14]
xor esi, esi
mov dword [ebp + 0x14], ecx
sub ebx, 8
cmp dword [ebp - 4], 7
jle 0x4100a2
pop edi
pop esi
pop ebx
leave
ret