Function at 0x407054
Capabilities:
Get common file path
Get disk information
Get program files directory
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
push ebx
push esi
push edi
mov esi, ecx
push 0x7f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x23e]
mov word [ebp - 0x240], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x28], esi
push eax
push 0xff
lea edi, [ebp - 0x240]
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
push 0x3ea
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x20]
push eax
call fcn.0044ade5
cmp word [ebp - 0x240], bx
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
pop ecx
je 0x4071f5
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
mov dword [ebp - 4], eax
jne 0x4070f1
mov ax, word [edi]
cmp ax, 0x41
je 0x4070e1
cmp ax, 0x42
jne 0x4070f1
push edi
call fcn.0046b7a1
pop ecx
lea edi, [edi + eax*2 + 2]
jmp 0x4071ec
mov eax, dword [0x47e520]
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.0046b7a1
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 4]
cmp eax, 3
pop ecx
je 0x407121
cmp eax, 4
je 0x407121
cmp eax, 2
je 0x407121
cmp eax, 6
jne 0x4071d5
movzx eax, word [edi]
push eax
lea eax, [ebp - 0x14]
push str._C:_
push eax
mov word [edi + 2], bx
call fcn.004017cc
add esp, 0xc
push ebx
push ebx
push 0x146
push dword [ebp - 8]
call esi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004015b6
push ebx
lea ecx, [ebp - 0x30]
call fcn.004016d4
push eax
push dword [ebp - 4]
push 0x14a
push dword [ebp - 8]
call esi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push str.SoftwareOK_
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00408569
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004015b6
push eax
lea ecx, [ebp - 0x30]
call fcn.00401522
lea ecx, [ebp - 0x40]
call fcn.0040139c
lea ecx, [ebp - 0x38]
call fcn.0040139c
push ebx
lea ecx, [ebp - 0x30]
call fcn.004016d4
push eax
push dword [ebp - 4]
push 0x14a
push dword [ebp - 8]
call esi
push ebx
push ebx
push 0x146
push dword [ebp - 8]
call esi
lea ecx, [ebp - 0x30]
call fcn.0040139c
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0xc]
lea edi, [edi + eax*2 + 2]
call fcn.0040139c
lea ecx, [ebp - 0x14]
call fcn.0040139c
cmp word [edi], bx
jne 0x4070c3
mov eax, dword [0x47e520]
push ebx
mov edi, 0x400
push 0x1a
push edi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], eax
call fcn.004016d4
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.0040173c
push 0x47f070
lea ecx, [ebp - 4]
call fcn.004013c8
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.004015b6
mov eax, dword [eax]
lea ecx, [ebp - 0x1c]
push eax
push dword [eax - 8]
call fcn.00401658
lea ecx, [ebp - 0xc]
call fcn.0040139c
lea ecx, [ebp - 4]
call fcn.0040139c
push ebx
push 0x26
push edi
lea ecx, [ebp - 0x24]
call fcn.004016d4
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x24]
call fcn.0040173c
push 0x47f070
lea ecx, [ebp - 4]
call fcn.004013c8
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.004015b6
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
push eax
push dword [eax - 8]
call fcn.00401658
lea ecx, [ebp - 0xc]
call fcn.0040139c
lea ecx, [ebp - 4]
call fcn.0040139c
push ebx
lea ecx, [ebp - 0x24]
call fcn.004016d4
push eax
push ebx
push 0x14a
push dword [ebp - 8]
call esi
push ebx
lea ecx, [ebp - 0x1c]
call fcn.004016d4
push eax
push ebx
push 0x14a
push dword [ebp - 8]
call esi
push 0x4b1
mov eax, dword [ebp - 0x28]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
push ebx
push ebx
push 0xf0
push eax
call esi
push ebx
push eax
push 0x14e
mov dword [0x488df8], eax
push dword [ebp - 8]
call esi
mov eax, dword [ebp - 0x28]
push 0x4b1
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetDlgItem]
push ebx
push ebx
push 0xf0
push eax
call esi
cmp eax, ebx
mov dword [0x488df8], eax
mov dword [ebp - 4], reloc.SHELL32.dll_SHChangeNotifyRegister
jne 0x407341
mov dword [ebp - 4], SHChangeNotifyDeregister
push 0x491d58
lea eax, [ebp - 0xc]
push 0x488de8
push eax
mov dword [ebp - 0x2c], ebx
call fcn.004015b6
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
push ecx
push 0x20019
push ebx
push eax
push dword [ebp - 4]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407382
lea ecx, [ebp - 0x2c]
call fcn.0040372e
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0xc]
call fcn.0040139c
mov eax, dword [0x47e520]
push edi
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x18], eax
call fcn.004016d4
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0xc], ebx
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.UninstallString
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0040173c
mov eax, dword [ebp - 0x18]
push ecx
mov ecx, esp
cmp dword [eax - 0xc], ebx
jl 0x4073df
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x4073ee
mov eax, dword [0x47e520]
mov dword [ecx], eax
push dword [ebp - 0x18]
call fcn.0040833f
lea eax, [ebp - 0x10]
push eax
call fcn.0044b056
mov eax, dword [ebp - 0x10]
pop ecx
pop ecx
cmp dword [eax - 8], 1
jle 0x407448
mov edi, 0x100
lea ecx, [ebp - 0x10]
push edi
call fcn.004016d4
mov ecx, dword [ebp - 0x28]
push eax
call fcn.004074b4
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
call fcn.0040173c
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], 1
jle 0x407448
push edi
lea ecx, [ebp - 0x10]
call fcn.004016d4
mov ecx, dword [ebp - 0x28]
push eax
call fcn.004074b4
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
call fcn.0040173c
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x40747f
push ebx
push ebx
push 0x146
push dword [ebp - 8]
call esi
push ebx
lea ecx, [ebp - 0x10]
mov edi, eax
call fcn.004016d4
push eax
push edi
push 0x14a
push dword [ebp - 8]
call esi
push ebx
push edi
push 0x14e
push dword [ebp - 8]
call esi
lea ecx, [ebp - 0x10]
call fcn.0040139c
lea ecx, [ebp - 0x18]
call fcn.0040139c
lea ecx, [ebp - 0x2c]
call fcn.0040372e
lea ecx, [ebp - 0x24]
call fcn.0040139c
lea ecx, [ebp - 0x1c]
call fcn.0040139c
lea ecx, [ebp - 0x20]
call fcn.0040139c
pop edi
pop esi
pop ebx
leave
ret