Function at 0x40dee0
Capabilities:
Check if file exists
Get common file path
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x566261
mov eax, dword fs:[0]
push eax
sub esp, 0x4d4
mov eax, dword [0x5d51c0]
xor eax, esp
mov dword [esp + 0x4cc], eax
push esi
push edi
mov eax, dword [0x5d51c0]
xor eax, esp
push eax
lea eax, [esp + 0x4e0]
mov dword fs:[0], eax
mov edi, ecx
call fcn.004248f0
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.00429e63
push 0xffffff
mov eax, dword [eax + 0x2b60]
mov dword [edi + 0x4ec], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
lea ecx, [edi + 0x10c]
call fcn.004303b3
xor eax, eax
mov dword [esp + 0x20], 1
push 0x206
push eax
mov word [esp + 0x2d4], ax
lea eax, [esp + 0x2d6]
push eax
mov dword [esp + 0x28], 0x104
call fcn.0054cbf0
add esp, 0xc
xor eax, eax
mov word [esp + 0xc4], ax
push 0x206
push eax
lea eax, [esp + 0xce]
push eax
call fcn.0054cbf0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push str.SOFTWAREHNCSharedInstall_InformationHCell96
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40e111
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x2d0]
push eax
lea eax, [esp + 0x28]
push eax
push 0
push str.Path
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x2cc]
push eax
lea eax, [esp + 0xc8]
push 0x104
push eax
call fcn.0054b04d
add esp, 0xc
lea eax, [esp + 0xc4]
push str.HOffice96Bin_
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0xc4]
push str.HCellCtrl.Ocx
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0xc4]
push eax
push 0xa5
call fcn.00407d80
lea eax, [esp + 0x2cc]
push eax
lea eax, [esp + 0xc8]
push 0x104
push eax
call fcn.0054b04d
add esp, 0xc
lea eax, [esp + 0xc4]
push str.HOffice96Bin_
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0xc4]
push str.HCell.exe
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0xc4]
push eax
push 0xa8
call fcn.00407d80
lea eax, [esp + 0x2cc]
push eax
lea eax, [esp + 0xc8]
push 0x104
push eax
call fcn.0054b04d
add esp, 0xc
lea eax, [esp + 0xc4]
push str.HOffice96Bin_
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0xc4]
push str.HCell.exe
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0xc4]
push eax
push 0xaa
call fcn.00407d80
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x5adca8
lea esi, [edi + 0x2e4]
mov dword [esp + 0x14], 0
push 0x104
push esi
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0x104
call fcn.0054b04d
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push str.SoftwareHNCHCell9.6HCellFrameAppState
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40e18b
lea eax, [esp + 0x20]
push eax
push esi
lea eax, [esp + 0x24]
push eax
push 0
push str.StartFileFolder
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e190
sub ecx, edx
sar ecx, 1
jne 0x40e1e2
lea eax, [esp + 0x14]
mov dword [esp + 0x2c], 2
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push SysReAllocString
mov dword [esp + 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
lea eax, [esp + 0x30]
push eax
push esi
lea eax, [esp + 0x34]
push eax
push 0
push str.Personal
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [edi + 0x188]
call fcn.0042eea0
mov esi, dword [sym.imp.UxTheme.dll_SetWindowTheme]
push 0x5adca8
push 0x5adca8
push dword [edi + 0x21c]
call esi
push 0x5adca8
push 0x5adca8
push dword [edi + 0x290]
call esi
call fcn.0040e8e0
cmp al, 1
jne 0x40e2ce
xor eax, eax
push 0x206
push eax
mov word [esp + 0x2d4], ax
lea eax, [esp + 0x2d6]
push eax
call fcn.0054cbf0
add esp, 0xc
lea eax, [esp + 0x2cc]
push eax
push 1
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.HNCUserHCellAutomation_backup.dat
lea eax, [esp + 0x2d0]
push 0x104
push eax
call fcn.0054b5e8
add esp, 0xc
lea eax, [esp + 0x2cc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, edi
cmp eax, 1
jne 0x40e2a1
push 0
push 0x2767
call fcn.0042e5d4
mov ecx, eax
call fcn.0042e4a6
push 1
jmp 0x40e2b6
push 1
push 0x2767
call fcn.0042e5d4
mov ecx, eax
call fcn.0042e4a6
push 0
push 0x2768
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042e4a6
jmp 0x40e364
push 0
push 0x274b
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042e4a6
push 0
push 0x2767
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042e4a6
push 0
push 0x2768
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042e4a6
push 1
push 0
push 0
push 0
push 0
push 0x274b
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042ec68
push 1
push 0
push 0
push 0
push 0
push 0x2767
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042ec68
push 1
push 0
push 0
push 0
push 0
push 0x2768
mov ecx, edi
call fcn.0042e5d4
mov ecx, eax
call fcn.0042ec68
push 0x5ad394
lea ecx, [esp + 0x1c]
call fcn.004058d0
mov dword [esp + 0x4e8], 0
mov eax, dword [esp + 0x18]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.004092f0
add eax, 0x10
add esp, 4
mov dword [esi], eax
lea eax, [esp + 0x18]
push eax
call fcn.00408c80
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x4ec], 1
call fcn.00409360
mov byte [esp + 0x4e8], 0
or eax, 0xffffffff
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40e3d7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
movdqa xmm0, xmmword [0x5b2670]
xor esi, esi
paddd xmm0, xmmword [0x5b2660]
paddd xmm0, xmmword [0x5b2780]
movdqu xmmword [esp + 0x98], xmm0
mov dword [esp + 0xb8], 0x274b
movdqa xmm0, xmmword [0x5b26c0]
movdqu xmmword [esp + 0xa8], xmm0
mov dword [esp + 0xbc], 0x2767
mov dword [esp + 0xc0], 0x2768
mov dword [esp + 0x10], esi
push 0x5c
lea eax, [esp + 0x38]
push 0
push eax
call fcn.0054cbf0
mov esi, dword [esp + esi*4 + 0xa4]
add esp, 0xc
mov ecx, edi
push esi
call fcn.0042e5d4
push 0
push 0
push 0x31
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
call fcn.0043062c
lea ecx, [esp + 0x34]
push ecx
push 0x5c
push dword [eax + 4]
call dword [sym.imp.GDI32.dll_GetObjectW]
push dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], vtable.CFont.0
lea eax, [esp + 0x34]
mov byte [esp + 0x4e8], 2
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
push eax
lea ecx, [esp + 0x28]
call fcn.004303b3
push esi
mov ecx, edi
call fcn.0042e5d4
push 1
push dword [esp + 0x2c]
push 0x30
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x24]
call fcn.0043052e
mov byte [esp + 0x4e8], 0
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], vtable.CFont.0
call fcn.00409160
mov esi, dword [esp + 0x10]
inc esi
mov dword [esp + 0x10], esi
cmp esi, 0xb
jl 0x40e430
mov dword [esp + 0x4e8], 0xffffffff
or ecx, 0xffffffff
mov edx, dword [esp + 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40e527
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [esp + 0x4e0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x4cc]
xor ecx, esp
call fcn.0054a22c
mov esp, ebp
pop ebp
ret