Function at 0x404130
Capabilities:
Access peb ldr_data
Get common file path
Get program files directory
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4574c9
mov eax, dword fs:[0]
push eax
sub esp, 0xc1c
mov eax, dword [0x470004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xc24], edi
mov dword [ebp - 0xc28], edi
call fcn.0040e829
lea esi, [edi + 0x10]
lea ecx, [esi + 4]
mov dword [esi], vtable.DuiLib::CNotifyPump.0
push 0x53
mov dword [ebp - 0xc24], esi
call fcn.0040dd09
mov dword [ebp - 4], 0
lea ecx, [edi + 0x2c]
mov dword [edi + 0x20], vtable.DuiLib::INotifyUI.0
mov dword [edi + 0x24], vtable.DuiLib::IMessageFilterUI.0
mov dword [edi + 0x28], vtable.DuiLib::IDialogBuilderCallback.0
mov dword [edi], vtable.DuiLib::WindowImplBase.3.0
mov dword [esi], vtable.DuiLib::WindowImplBase.4.0
mov dword [edi + 0x20], vtable.DuiLib::WindowImplBase.2.0
mov dword [edi + 0x24], vtable.DuiLib::WindowImplBase.1.0
mov dword [edi + 0x28], vtable.DuiLib::WindowImplBase.0
call fcn.00406aa7
mov dword [ebp - 4], 1
lea eax, [ebp - 0xc10]
mov dword [edi + method.DuiLib::CDelegateBase.virtual_4], vtable.ProgressBar.0
mov dword [esi], vtable.CFrameWindowWnd.5.0
lea esi, [edi + 0x3c0]
mov dword [edi], vtable.CFrameWindowWnd.4.0
mov dword [edi + 0x20], vtable.CFrameWindowWnd.3.0
mov dword [edi + 0x24], vtable.CFrameWindowWnd.0
mov dword [edi + 0x28], vtable.CFrameWindowWnd.2.0
mov dword [edi + method.CFrameWindowWnd.1.virtual_0], vtable.CFrameWindowWnd.1.0
push 0x800
push 0
push eax
mov dword [esi], 0x46955b
mov dword [esi + 4], 0x46955b
mov dword [esi + 8], 0x46955b
mov dword [esi + 0xc], 0x46955b
mov dword [esi + 0x10], 0x46955b
mov dword [esi + 0x14], 0x46955b
mov dword [esi + 0x18], 0x46955b
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov byte [esi + 0x28], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x3c], 0
call fcn.0043e460
add esp, 0xc
lea eax, [ebp - 0xc10]
push 0x7d0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0xc10]
mov ecx, esi
push eax
call fcn.00403070
lea eax, [ebp - 0xc20]
mov word [edi + 0x3a4], 0x101
push eax
push dword [edi + 0x3cc]
mov dword [edi + 0x3ac], 0
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [edi + 0x3b8], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4043a3
push 0x200
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0043e460
add esp, 0xc
mov dword [ebp - 0xc18], 1
lea eax, [ebp - 0xc14]
mov dword [ebp - 0xc14], 0x200
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xc18]
push eax
push 0
push str.InstallLocation
push dword [ebp - 0xc20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xc20]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4043a3
cmp dword [ebp - 0xc14], esi
jbe 0x4043a3
lea eax, [ebp - 0x210]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404360
sub eax, edx
test eax, eax
jle 0x4043a3
cmp byte [ebp + eax - 0x211], 0x5c
je 0x404390
cmp eax, 1
jle 0x404390
cmp byte [ebp + eax - 0x212], 0x3a
je 0x404390
mov word [ebp + eax - 0x210], 0x5c
lea eax, [ebp - 0x210]
push eax
call fcn.00443fea
add esp, 4
test eax, eax
jne 0x404408
lea eax, [ebp - 0xc1c]
mov dword [ebp - 0xc1c], 0
push eax
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4043e1
lea eax, [ebp - 0x410]
push eax
push dword [ebp - 0xc1c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 0xc1c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x610]
push 0x46955c
push eax
call fcn.00404010
lea eax, [ebp - 0x610]
push eax
call fcn.00443fea
add esp, 0x10
mov dword [edi + 0x3a8], eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405b44
mov esp, ebp
pop ebp
ret