Function at 0x40cdb0
Capabilities:
Get common file path
Get disk information
Get program files directory

Disassembly:
sub esp, 0x24c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x5e]
mov word [esp + 0x5c], 0
mov dword [esp + 0x4c], esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x5c]
lea edi, [esp + 0x5c]
push eax
push 0xff
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov ecx, dword [esi + 4]
push 0x3ea
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
lea edx, [esp + 0x38]
mov dword [esp + 0x3c], eax
push edx
call fcn.0048b750
add esp, 4
cmp word [esp + 0x5c], 0
je 0x40d1c6
jmp 0x40ce20
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov esi, eax
cmp esi, 2
jne 0x40ce53
mov ax, word [edi]
cmp ax, 0x41
je 0x40ce3d
cmp ax, 0x42
jne 0x40ce53
push edi
call fcn.004c5da8
lea eax, [edi + eax*2 + 2]
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x40d1b8
mov eax, dword [0x4d9540]
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x48], eax
call fcn.004c5da8
add esp, 4
cmp esi, 3
mov dword [esp + 0x54], eax
je 0x40ce85
cmp esi, 4
je 0x40ce85
cmp esi, 2
je 0x40ce85
cmp esi, 6
jne 0x40d156
xor ecx, ecx
lea edx, [esp + 0x1c]
mov cx, word [edi]
mov word [edi + 2], 0
push ecx
push str._C:_
push edx
call fcn.00401a70
mov eax, dword [esp + 0x48]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
add esp, 0xc
push 0
push 0
push 0x146
push eax
call edi
mov ecx, dword [0x4d9540]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x30], ecx
push eax
lea ecx, [esp + 0x34]
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x20]
push edx
push eax
mov eax, dword [eax - 8]
push eax
call fcn.004017b0
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x14]
call fcn.00401200
lea ecx, [esp + 0x30]
call fcn.004014c0
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov edx, dword [eax - 0xc]
lea ebx, [eax - 0xc]
cmp edx, 1
jg 0x40cf11
mov edx, dword [eax - 4]
test edx, edx
jge 0x40cf58
mov ebp, dword [eax - 8]
test ebp, ebp
jle 0x40cf1a
mov ecx, ebp
push ecx
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x40cf58
mov edi, dword [esp + 0x10]
lea ecx, [ebp + ebp + 2]
mov edx, ecx
lea esi, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
mov dword [eax - 8], ebp
call fcn.00401350
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x3c]
push eax
push ecx
push 0x14a
push edx
call edi
mov eax, dword [0x4d9540]
mov ecx, str.SoftwareOK_
test ecx, ecx
mov dword [esp + 0x30], eax
jne 0x40cf80
xor eax, eax
jmp 0x40cf8b
push str.SoftwareOK_
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push str.SoftwareOK_
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x38]
push eax
mov edx, dword [eax - 8]
push edx
call fcn.004017b0
lea eax, [esp + 0x30]
lea ecx, [esp + 0x28]
push eax
call fcn.00401200
lea ecx, [esp + 0x30]
call fcn.004014c0
mov ecx, dword [0x4d9540]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x2c], ecx
push eax
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x2c]
push edx
push eax
mov eax, dword [eax - 8]
lea ecx, [esp + 0x38]
push eax
call fcn.004017b0
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x38]
call fcn.00401200
lea ecx, [esp + 0x2c]
call fcn.004014c0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
cmp ecx, eax
je 0x40d04c
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x40d016
mov edx, dword [0x4d9544]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x40d01d
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x40d02d
mov edx, dword [eax - 8]
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.00401630
jmp 0x40d048
lea ecx, [esp + 0x10]
call fcn.0040e950
mov eax, dword [esp + 0x34]
mov dword [esp + 0x10], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x34]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d077
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d077
mov edx, dword [esp + 0x34]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x28]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d0a6
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d0a6
mov edx, dword [esp + 0x28]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov ecx, dword [esp + 0x10]
xor eax, eax
mov edx, dword [ecx - 0xc]
lea ebp, [ecx - 0xc]
cmp edx, 1
jg 0x40d0be
mov edx, dword [ecx - 4]
test edx, edx
jge 0x40d101
mov ebx, dword [ecx - 8]
test ebx, ebx
jle 0x40d0c7
mov eax, ebx
push eax
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x40d105
mov edi, dword [esp + 0x10]
lea ecx, [ebx + ebx + 2]
mov eax, ecx
lea esi, [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov dword [ecx - 8], ebx
call fcn.00401350
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x50]
mov esi, dword [esp + 0x3c]
push eax
push edx
push 0x14a
push esi
call edi
push 0
push 0
push 0x146
push esi
call edi
mov eax, dword [esp + 0x10]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d152
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d152
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x44]
lea ecx, [edi + eax*2 + 2]
mov eax, dword [0x4d9544]
lea edx, [esi - 0xc]
mov dword [esp + 0x14], ecx
cmp edx, eax
je 0x40d189
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d189
push esi
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x1c]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d1b8
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d1b8
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x14]
cmp word [eax], 0
jne 0x40ce1c
mov eax, dword [0x4d9540]
mov ecx, 0x400
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov edx, dword [eax - 0xc]
lea ebx, [eax - 0xc]
cmp edx, 1
jg 0x40d1e8
cmp dword [eax - 4], ecx
jge 0x40d229
mov ebp, dword [eax - 8]
cmp ebp, ecx
jle 0x40d1f1
mov ecx, ebp
push ecx
lea ecx, [esp + 0x24]
call fcn.004012f0
test eax, eax
je 0x40d229
mov edi, dword [esp + 0x20]
lea ecx, [ebp + ebp + 2]
mov edx, ecx
lea esi, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x24]
mov dword [eax - 8], ebp
call fcn.00401350
mov eax, dword [esp + 0x20]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [esp + 0x20]
call fcn.00401380
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x20]
mov dword [edx - 8], eax
mov ecx, dword [esp + 0x20]
mov word [ecx + eax*2], 0
mov edx, dword [0x4d9540]
mov eax, 0x4da060
mov dword [esp + 0x14], edx
test eax, eax
je 0x40d2a8
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x40d2a8
push esi
lea ecx, [esp + 0x18]
call fcn.004012f0
test eax, eax
je 0x40d2a8
mov ecx, dword [esp + 0x14]
inc esi
push esi
push 0x4da060
push ecx
call fcn.004011c0
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00401970
mov edx, dword [0x4d9540]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], edx
push eax
mov eax, dword [eax - 8]
push eax
mov eax, dword [esp + 0x1c]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x38]
call fcn.004017b0
lea edx, [esp + 0x28]
lea ecx, [esp + 0x2c]
push edx
call fcn.00401200
lea ecx, [esp + 0x28]
call fcn.004014c0
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x20]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00401850
mov eax, dword [esp + 0x2c]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d325
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d325
mov edx, dword [esp + 0x2c]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40d354
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40d354
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, 0x400
mov edx, dword [eax - 0xc]
lea ebp, [eax - 0xc]
cmp edx, 1
jg 0x40d36d
cmp dword [eax - 4], ecx
jge 0x40d3ae
mov ebx, dword [eax - 8]
cmp ebx, ecx
jle 0x40d376
mov ecx, ebx
push ecx
lea ecx, [esp + 0x1c]
call fcn.004012f0
test eax, eax
je 0x40d3ae
mov edi, dword [esp + 0x18]
lea ecx, [ebx + ebx + 2]
mov eax, ecx
lea esi, [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov dword [ecx - 8], ebx
call fcn.00401350
mov eax, dword [esp + 0x18]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [esp + 0x18]
call fcn.00401380
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x18]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x18]
mov ecx, 0x4da060
mov word [edx + eax*2], 0
mov eax, dword [0x4d9540]
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x40d42c
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x40d42c
push esi
lea ecx, [esp + 0x20]
call fcn.004012f0
test eax, eax
je 0x40d42c
mov edx, dword [esp + 0x1c]
inc esi
push esi
push 0x4da060
push edx
call fcn.004011c0
add esp, 0xc
lea ecx, [esp + 0x1c]
push 0xffffffffffffffff
call fcn.00401970
lea eax, [esp + 0x38]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x48]
push ecx
push edx
call fcn.0040f0a0
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00401850
lea ecx, [esp + 0x44]
call fcn.004014c0
lea ecx, [esp + 0x1c]
call fcn.004014c0
push 0
lea ecx, [esp + 0x1c]
call fcn.0040f900
mov edi, dword [esp + 0x3c]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 0
push 0x14a
push edi
call esi
push 0
lea ecx, [esp + 0x24]
call fcn.0040f900
push eax
push 0
push 0x14a
push edi
call esi
mov ebx, dword [esp + 0x4c]
mov ebp, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x4b1
mov ecx, dword [ebx + 4]
push ecx
call ebp
push 0
push 0
push 0xf0
push eax
call esi
push 0
push eax
push 0x14e
push edi
mov dword [0x4e3cb8], eax
call esi
mov edx, dword [ebx + 4]
push 0x4b1
push edx
call ebp
push 0
push 0
push 0xf0
push eax
call esi
test eax, eax
mov dword [0x4e3cb8], eax
mov edi, reloc.SHELL32.dll_SHChangeNotifyRegister
jne 0x40d4f3
mov edi, SHChangeNotifyDeregister
push 0x4ecd48
lea eax, [esp + 0x50]
push 0x4e3ca8
push eax
mov dword [esp + 0x54], 0
call fcn.0040f0a0
mov eax, dword [eax]
push 0x20019
push eax
push edi
lea ecx, [esp + 0x54]
call fcn.00405b50
lea ecx, [esp + 0x4c]
call fcn.004014c0
mov ecx, dword [0x4d9540]
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0x44], ecx
push str.UninstallString
push 0x400
lea ecx, [esp + 0x4c]
mov dword [esp + 0x64], 0x400
call fcn.0040f900
push eax
lea ecx, [esp + 0x54]
call fcn.0040d690
push 0xffffffffffffffff
lea ecx, [esp + 0x44]
call fcn.00401970
push ecx
lea eax, [esp + 0x44]
mov ecx, esp
push eax
call fcn.00401200
lea ecx, [esp + 0x28]
push ecx
call fcn.0048c1c0
mov edx, dword [esp + 0x2c]
mov edi, 1
add esp, 8
cmp dword [edx - 8], edi
jle 0x40d5dc
push 0x100
lea ecx, [esp + 0x28]
call fcn.0040f900
push eax
mov ecx, ebx
call fcn.0040d660
push 0xffffffffffffffff
lea ecx, [esp + 0x28]
call fcn.00401970
mov eax, dword [esp + 0x24]
cmp dword [eax - 8], edi
jle 0x40d5dc
push 0x100
lea ecx, [esp + 0x28]
call fcn.0040f900
push eax
mov ecx, ebx
call fcn.0040d660
push 0xffffffffffffffff
lea ecx, [esp + 0x28]
call fcn.00401970
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx - 8]
test eax, eax
je 0x40d619
mov ebx, dword [esp + 0x3c]
push 0
push 0
push 0x146
push ebx
call esi
push 0
lea ecx, [esp + 0x28]
mov edi, eax
call fcn.0040f900
push eax
push edi
push 0x14a
push ebx
call esi
push 0
push edi
push 0x14e
push ebx
call esi
lea ecx, [esp + 0x24]
call fcn.004014c0
lea ecx, [esp + 0x40]
call fcn.004014c0
lea ecx, [esp + 0x48]
call fcn.00405b30
lea ecx, [esp + 0x18]
call fcn.004014c0
lea ecx, [esp + 0x20]
call fcn.004014c0
lea ecx, [esp + 0x38]
call fcn.004014c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24c
ret