Function at 0x40fcf8
Capabilities:
Encode data using xor
Set registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6dc
mov eax, dword [0x517490]
xor eax, esp
mov dword [esp + 0x6d8], eax
push ebx
push esi
push edi
xor ebx, ebx
lea eax, [esp + 0x51]
push 0x3f
push ebx
push eax
mov byte [esp + 0x5c], bl
call fcn.004bea90
add esp, 0xc
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov edi, 0x80000001
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
mov dword [esp + 0x24], 0xc
push 0x16
pop esi
push esi
lea eax, [esp + 0x154]
push str.SoftwareCyberLinkPowerDVD_d
push eax
call ebx
add esp, 0xc
lea edx, [esp + 0x150]
mov ecx, edi
call fcn.0040fa63
cmp al, 1
je 0x40fd79
dec esi
cmp esi, 0xb
jge 0x40fd49
jmp 0x41004f
push 0x23
lea edx, [esp + 0x1d4]
pop ecx
call fcn.0040fa27
mov ecx, dword [ebp + 8]
xor esi, esi
add ecx, 9
mov dword [esp + 0x50], 0x47524442
mov eax, ecx
mov dword [esp + 0x58], 0x30
imul eax, ecx
inc esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x8c], 0x4f464e49
add eax, 0x19
cdq
mov dword [esp + 0x18], eax
imul eax, ecx, 5
mov dword [esp + 0x1c], edx
cdq
mov dword [esp + 0x10], eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], edx
push eax
call fcn.0041074b
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x14]
push eax
call fcn.0041074b
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x118]
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.0041011c
lea eax, [esp + 0x10]
mov dword [esp + 0x18], 5
push eax
push str.SoftwareCyberLinkCommon
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40fe4b
push 4
lea eax, [esp + 0x1c]
push eax
push 4
push 0
push str.PBRCT
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x33
mov edx, 0xedce1291
mov ecx, 0x51d536
call fcn.004015c4
pop ecx
push 0
lea ecx, [esp + 0x2c]
push ecx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorA]
lea eax, [esp + 0x1d0]
push eax
lea eax, [esp + 0x4dc]
push str._sCyberLinkBDNAV_ris.ifo
push eax
call ebx
add esp, 0xc
lea eax, [esp + 0x24]
push 0
push 2
push 2
push eax
push 0
push 0xc0000000
lea eax, [esp + 0x4f0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
cmp esi, 0xffffffff
je 0x40ff05
xor eax, eax
push eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x40
lea eax, [esp + 0x11c]
push eax
push esi
call edi
push 0
lea eax, [esp + 0x1c]
push eax
push 0x10
lea eax, [esp + 0xa0]
push eax
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea eax, [esp + 0x30]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
lea esi, [esp + 0x110]
push 0x10
pop ecx
lea edi, [esp + 0xb8]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x38]
lea edi, [esp + 0xf8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x10c], eax
lea eax, [esp + 0xa4]
push eax
lea eax, [esp + 0xbc]
push 0x58
push eax
call fcn.004720e5
add esp, 0xc
lea eax, [esp + 0x1d0]
push eax
call fcn.0041082d
xor eax, eax
mov byte [esp + 0x38], 0
lea edi, [esp + 0x39]
xor ecx, ecx
stosd dword es:[edi], eax
lea edx, [esp + 0x3d8]
mov dword [esp + 0x10], edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
mov al, byte [esp + ecx + 0xa4]
xor al, byte [ecx + 0x4eea40]
mov byte [esp + ecx + 0x38], al
inc ecx
cmp ecx, 0x14
jl 0x40ff82
xor esi, esi
movzx eax, byte [esp + esi + 0x38]
push eax
push str._02X
push edx
call ebx
mov edx, dword [esp + 0x1c]
add esp, 0xc
add edx, 4
inc esi
mov dword [esp + 0x10], edx
cmp esi, 0xa
jl 0x40ff9b
xor eax, eax
mov word [edx], ax
lea eax, [esp + 0x3d8]
push eax
lea eax, [esp + 0x1d4]
push eax
lea eax, [esp + 0x4e0]
push str._sPDVD_s.ve2
push eax
call ebx
add esp, 0x10
lea eax, [esp + 0x24]
xor ebx, ebx
push ebx
push 2
push 2
push eax
push ebx
push 0xc0000000
lea eax, [esp + 0x4f0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x41004f
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x18]
push ebx
push eax
push 0x10
lea eax, [esp + 0xa0]
push eax
push esi
call edi
push ebx
lea eax, [esp + 0x1c]
push eax
push 0x14
lea eax, [esp + 0xb0]
push eax
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x6e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b94b6
mov esp, ebp
pop ebp
ret 4