Function at 0x41f981
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov esi, ecx
mov dword [ebp - 8], esi
mov al, byte [esi + 0x14]
test al, al
jne 0x41fb6c
mov eax, dword [ebp + 0xc]
push ebx
push edi
add eax, 0xa
push 8
cdq
pop ecx
idiv ecx
mov ebx, edx
test ebx, ebx
je 0x41f9b2
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 - 0x14], al
mov eax, ebx
dec ebx
test eax, eax
je 0x41f9d6
inc ebx
call edi
mov byte [ebp + esi - 0x14], al
inc esi
dec ebx
jne 0x41f9cc
xor eax, eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 0x14]
lea ebx, [ebp - 0x1c]
lea edi, [ebp - 0x1c]
mov dword [ebp - 4], 1
and dword [eax], 0
sub ebx, dword [ebp + 0x10]
cmp esi, 8
jge 0x41fa09
call dword [sym.imp.MSVCRT.dll_rand]
mov byte [ebp + esi - 0x14], al
inc esi
inc dword [ebp - 4]
cmp esi, 8
jne 0x41fa62
lea eax, [ebp - 0x14]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x14]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 8
jl 0x41fa12
mov eax, dword [ebp - 8]
push dword [ebp + 0x10]
add eax, 4
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041fba0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [ebp - 0xc], ebx
push 8
pop esi
mov al, byte [ebx + ecx]
xor byte [ecx], al
inc ecx
dec esi
jne 0x41fa40
mov eax, dword [ebp + 0x14]
lea esi, [ebp - 0x14]
lea edi, [ebp - 0x1c]
add dword [eax], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp + 0x10], ecx
sub ebx, 8
cmp dword [ebp - 4], 2
jle 0x41f9f3
cmp dword [ebp + 0xc], 0
je 0x41faeb
lea ebx, [ebp - 0x1c]
sub ebx, dword [ebp + 0x10]
cmp esi, 8
jge 0x41fa8c
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 - 0x15], al
jne 0x41fae5
lea eax, [ebp - 0x14]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x14]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 8
jl 0x41fa95
mov eax, dword [ebp - 8]
push dword [ebp + 0x10]
add eax, 4
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041fba0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [ebp - 0xc], ebx
push 8
pop esi
mov al, byte [ebx + ecx]
xor byte [ecx], al
inc ecx
dec esi
jne 0x41fac3
mov eax, dword [ebp + 0x14]
lea esi, [ebp - 0x14]
lea edi, [ebp - 0x1c]
add dword [eax], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp + 0x10], ecx
sub ebx, 8
cmp dword [ebp + 0xc], 0
jne 0x41fa74
lea ebx, [ebp - 0x1c]
mov dword [ebp - 4], 1
sub ebx, dword [ebp + 0x10]
cmp esi, 8
jge 0x41fb09
and byte [ebp + esi - 0x14], 0
inc esi
inc dword [ebp - 4]
cmp esi, 8
jne 0x41fb62
lea eax, [ebp - 0x14]
xor esi, esi
sub edi, eax
lea eax, [ebp + esi - 0x14]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 8
jl 0x41fb12
mov eax, dword [ebp - 8]
push dword [ebp + 0x10]
add eax, 4
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041fba0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [ebp - 0xc], ebx
push 8
pop esi
mov al, byte [ebx + ecx]
xor byte [ecx], al
inc ecx
dec esi
jne 0x41fb40
mov eax, dword [ebp + 0x14]
lea esi, [ebp - 0x14]
lea edi, [ebp - 0x1c]
add dword [eax], 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp + 0x10], ecx
sub ebx, 8
cmp dword [ebp - 4], 7
jle 0x41faf8
pop edi
pop ebx
jmp 0x41fb9b
cmp al, 1
jne 0x41fb9b
push dword [ebp + 0x14]
lea eax, [esi + 4]
mov ecx, esi
push dword [ebp + 0x10]
push eax
push dword [esi + 0x18]
call fcn.004212d5
push eax
mov ecx, esi
call fcn.004212d2
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041fc48
add esp, 0x20
pop esi
leave
ret 0x10