Function at 0x4066aa
Capabilities:
Check if file exists
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
xor eax, eax
push esi
mov ebx, eax
mov esi, ecx
push edi
mov dword [ebp - 0x20], ebx
call fcn.00413d6a
cmp eax, 0x60001
jb 0x4069c5
cmp eax, 0x60002
je 0x4069c5
call fcn.00405967
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x4066ef
call fcn.0041390d
mov ebx, eax
jmp 0x4069b9
test esi, esi
jne 0x406726
push str.WinRE_Request_Restart
mov edx, 0x47e730
lea ecx, [ebp - 0x1c]
call fcn.00401ec9
mov ecx, dword [reloc.OLEAUT32.dll_SysReAllocString]
xor ebx, ebx
inc ebx
mov dword [esp], 0x200
mov edx, dword [eax]
call fcn.00414956
pop ecx
test eax, eax
je 0x406726
mov byte [ebp - 1], bl
jmp 0x40672a
mov byte [ebp - 1], 0
test bl, 1
je 0x40673a
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.004025d7
cmp byte [ebp - 1], 0
je 0x40674a
mov ebx, 0x80070bc3
jmp 0x4069b9
call fcn.00402506
push eax
lea ecx, [ebp - 0x14]
call fcn.00402331
lea edx, [ebp - 0x14]
mov ecx, str._SystemDrive_360SysRt_
call fcn.00414098
mov ebx, eax
test ebx, ebx
je 0x40677f
jle 0x4069ae
movzx ebx, bx
or ebx, 0x80070000
jmp 0x4069ae
push str.360ldMount
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x1c]
call fcn.00401ec9
mov esi, dword [ebp - 0x1c]
pop ecx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4067da
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
test eax, eax
jne 0x4067da
mov ecx, str.wimgapi.dll
call fcn.00413bc1
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4067d2
push str.WIMUnmountImage
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4067d2
xor ecx, ecx
push ecx
push ecx
push ecx
push esi
call eax
lea ecx, [ebp - 0x1c]
call fcn.00411b4e
mov ecx, dword [ebp - 0x14]
call fcn.00414ef8
lea ecx, [ebp - 0x30]
call fcn.0040460f
mov ebx, eax
test ebx, ebx
jne 0x4069a6
and dword [ebp - 8], eax
lea edx, [ebp - 0x30]
push str.Elements14000008
lea ecx, [ebp - 0x10]
call fcn.00414cd0
push eax
mov edx, str.BCD00000000Objects_
lea ecx, [ebp - 0x18]
call fcn.0040cb4e
pop ecx
mov edx, eax
lea ecx, [ebp - 0x1c]
call fcn.00401ec9
pop ecx
lea ecx, [ebp - 8]
push ecx
push 0x2001f
push 4
push dword [eax]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [ebp - 0x1c]
mov ebx, eax
lea ecx, [ecx - 0x10]
call fcn.004025d7
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.004025d7
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.004025d7
test ebx, ebx
je 0x406874
jle 0x406990
movzx ebx, bx
or ebx, 0x80070000
jmp 0x406990
call fcn.00402506
push eax
lea ecx, [ebp - 0x10]
call fcn.00402331
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
mov edx, str.Element
call fcn.00414467
mov ebx, eax
pop ecx
test ebx, ebx
je 0x4068ad
jle 0x4068a5
movzx ebx, bx
or ebx, 0x80070000
mov edi, dword [ebp - 0x10]
jmp 0x406988
push 0
lea ecx, [ebp - 0x10]
call fcn.00401c04
mov edx, 0x454658
lea ecx, [ebp - 0x1c]
call fcn.00414cd0
call fcn.00402506
push eax
lea ecx, [ebp - 0xc]
call fcn.00402331
mov edi, dword [ebp - 0x10]
xor eax, eax
mov dword [ebp - 0x18], eax
mov ebx, edi
cmp word [edi], ax
je 0x406927
push ebx
lea ecx, [ebp - 0x1c]
call fcn.00401831
test eax, eax
je 0x40690c
mov ecx, ebx
call fcn.00401f04
push eax
push ebx
lea ecx, [ebp - 0xc]
call fcn.0040173d
xor eax, eax
lea ecx, [ebp - 0xc]
push eax
call fcn.00401c04
jmp 0x406913
mov dword [ebp - 0x18], 1
mov ecx, ebx
call fcn.004017c9
lea ebx, [ebx + eax*2]
xor eax, eax
add ebx, 2
cmp word [ebx], ax
jne 0x4068e1
xor ebx, ebx
lea ecx, [ebp - 0xc]
push ebx
call fcn.00401c04
cmp dword [ebp - 0x18], ebx
je 0x406972
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax - 0xc]
add ecx, ecx
push ecx
push eax
push 7
push ebx
push str.Element
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test ebx, ebx
je 0x406965
jle 0x406972
movzx ebx, bx
or ebx, 0x80070000
jmp 0x406972
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
xor eax, eax
mov ebx, eax
mov ecx, dword [ebp - 0xc]
lea ecx, [ecx - 0x10]
call fcn.004025d7
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.004025d7
lea ecx, [edi - 0x10]
call fcn.004025d7
cmp dword [ebp - 8], 0
je 0x4069a6
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
neg eax
sbb eax, eax
and dword [ebp - 8], eax
lea ecx, [esi - 0x10]
call fcn.004025d7
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.004025d7
lea ecx, [ebp - 0x20]
call fcn.0041136e
mov eax, ebx
jmp 0x4069ca
mov eax, 0x80004001
pop edi
pop esi
pop ebx
leave
ret