Function at 0x404575
Capabilities:
Get common file path

Disassembly:
mov eax, 0x418b08
call fcn.00416550
push ecx
mov eax, 0x1410
call fcn.004165f0
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
push 0x12
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0xb4]
mov dword [ebp - 0xb8], ebx
mov edx, 0x81
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [ebp - 0x8f2]
mov word [ebp - 0x8f4], bx
mov word [ebp - 0xafc], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0xafa]
mov word [ebp - 0x6ec], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x6ea]
push ebx
rep stosd dword es:[edi], eax
push 0x80
push 3
push ebx
push 1
lea ecx, [esi + 0x3c]
push SysReAllocString
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x24], ebx
stosw word es:[edi], ax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x50], ebx
call fcn.0040dffa
push eax
call fcn.004050de
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x404f9b
lea eax, [ebp - 0xb8]
push 0x4c
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f0f
cmp dword [ebp - 0xb8], 0x4c
jne 0x404efa
lea eax, [ebp - 0xb4]
push 0x41b1b4
push eax
call fcn.00404fb3
pop ecx
test eax, eax
pop ecx
jne 0x404efa
mov eax, dword [ebp - 0x8c]
test byte [ebp - 0xa3], 0x10
mov dword [esi + 0x40], eax
mov eax, dword [ebp - 0x88]
mov dword [esi + 0x44], eax
je 0x40469d
mov dword [esi + 0x24], 1
test byte [ebp - 0xa4], 1
je 0x40470e
lea eax, [ebp - 0x12]
push 2
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f0f
movzx eax, word [ebp - 0x12]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edi, eax
cmp edi, ebx
je 0x4046f5
movzx eax, word [ebp - 0x12]
push eax
push edi
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f0f
mov dword [esi + 0x10], edi
mov dword [ebp - 0x24], 1
jmp 0x40470e
movzx eax, word [ebp - 0x12]
push 1
push ebx
push eax
push dword [ebp - 0x18]
call fcn.00405110
cmp eax, 0xffffffff
je 0x404f0f
test byte [ebp - 0xa4], 2
je 0x40477c
lea eax, [ebp - 0xd4]
push 0x1c
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f0f
push 1
push ebx
push 0xffffffffffffffe4
push dword [ebp - 0x18]
call fcn.00405110
cmp eax, 0xffffffff
je 0x404f0f
mov edi, dword [ebp - 0xd4]
lea eax, [edi + 1]
push eax
call sub.MFC42u.DLL_operatornew
cmp eax, ebx
pop ecx
mov dword [ebp - 0x38], eax
je 0x404f0f
push edi
push eax
push dword [ebp - 0x18]
mov byte [eax + edi], bl
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f0f
mov dword [ebp - 0x20], 0x41afec
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0xa4]
test dword [eax], edi
je 0x404b41
lea eax, [ebp - 0x12]
push 2
push eax
push dword [ebp - 0x18]
shr edi, 7
and edi, 1
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f0f
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
cmp eax, 4
je 0x404ae4
cmp eax, 8
je 0x40499c
cmp eax, 0x10
je 0x40493f
cmp eax, 0x20
je 0x40489f
cmp eax, 0x40
je 0x404803
movzx eax, word [ebp - 0x12]
inc edi
push 1
imul edi, eax
push ebx
push edi
push dword [ebp - 0x18]
call fcn.00405110
cmp eax, 0xffffffff
je 0x404f0f
jmp 0x404b41
movzx eax, word [ebp - 0x12]
lea eax, [eax + eax + 2]
push eax
call sub.MFC42u.DLL_operatornew
movzx ecx, word [ebp - 0x12]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], eax
mov word [eax + ecx*2], bx
lea ecx, [edi + 1]
movzx edx, word [ebp - 0x12]
imul ecx, edx
push ecx
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0x10
test eax, eax
je 0x404f0f
cmp edi, ebx
je 0x404851
push dword [ebp - 0x1c]
lea edi, [esi + 0x18]
mov ecx, edi
call fcn.00416304
jmp 0x404866
movzx ecx, word [ebp - 0x12]
mov eax, dword [ebp - 0x1c]
lea edi, [esi + 0x18]
push eax
mov byte [ecx + eax], bl
mov ecx, edi
call fcn.0041632e
mov ecx, edi
call fcn.0040dffa
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040517a
pop ecx
pop ecx
push eax
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.00416328
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004162ce
mov eax, dword [ebp - 0x80]
mov dword [esi + 0x28], eax
jmp 0x404b41
movzx eax, word [ebp - 0x12]
lea eax, [eax + eax + 2]
push eax
call sub.MFC42u.DLL_operatornew
movzx ecx, word [ebp - 0x12]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x3c], eax
mov word [eax + ecx*2], bx
lea ecx, [edi + 1]
movzx edx, word [ebp - 0x12]
imul ecx, edx
push ecx
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0x10
test eax, eax
je 0x404f0f
cmp edi, ebx
je 0x4048ed
push dword [ebp - 0x1c]
lea edi, [esi + 0x14]
mov ecx, edi
call fcn.00416304
jmp 0x404902
movzx ecx, word [ebp - 0x12]
mov eax, dword [ebp - 0x1c]
lea edi, [esi + 0x14]
push eax
mov byte [ecx + eax], bl
mov ecx, edi
call fcn.0041632e
mov ecx, edi
call sub.MFC42u.DLL_CString::TrimLeft
mov ecx, edi
call sub.MFC42u.DLL_CString::TrimRight
mov ecx, edi
call fcn.0040dffa
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040517a
pop ecx
pop ecx
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00416328
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.004162ce
jmp 0x404b41
movzx eax, word [ebp - 0x12]
lea eax, [eax + eax + 2]
push eax
call sub.MFC42u.DLL_operatornew
movzx ecx, word [ebp - 0x12]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x34], eax
mov word [eax + ecx*2], bx
lea ecx, [edi + 1]
movzx edx, word [ebp - 0x12]
imul ecx, edx
push ecx
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0x10
test eax, eax
je 0x404f0f
cmp edi, ebx
je 0x404989
push dword [ebp - 0x1c]
lea ecx, [esi + 0x38]
jmp 0x404a54
movzx ecx, word [ebp - 0x12]
mov eax, dword [ebp - 0x1c]
push eax
mov byte [ecx + eax], bl
lea ecx, [esi + 0x38]
jmp 0x404b3c
movzx eax, word [ebp - 0x12]
lea eax, [eax + eax + 0x20a]
push eax
call sub.MFC42u.DLL_operatornew
movzx edx, word [ebp - 0x12]
lea ecx, [edi + 1]
mov dword [ebp - 0x1c], eax
imul ecx, edx
push ecx
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
call fcn.00405483
add esp, 0x10
test eax, eax
je 0x404f0f
lea ecx, [esi + 8]
call fcn.00404fff
test eax, eax
je 0x404b41
cmp dword [esi + 0x10], ebx
jne 0x404b41
movzx eax, word [ebp - 0x12]
cmp edi, ebx
je 0x404a5e
mov edi, dword [ebp - 0x1c]
push 0x103
lea ecx, [esi + 0x3c]
mov word [edi + eax*2], bx
call fcn.0040dffa
push eax
call fcn.00401572
pop ecx
push eax
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0x1010]
mov word [ebp - 0xe0a], bx
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x1010]
push edi
push eax
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
cmp eax, ebx
je 0x404b41
push eax
lea ecx, [esi + 8]
call fcn.00416304
jmp 0x404b41
mov ecx, dword [ebp - 0x1c]
mov byte [eax + ecx], bl
lea ecx, [esi + 0x3c]
call fcn.0040dffa
cmp eax, ebx
mov dword [ebp - 0x48], eax
jne 0x404a77
xor eax, eax
jmp 0x404a9a
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.004165f0
mov eax, esp
push edi
push dword [ebp - 0x48]
push eax
call fcn.0040d75e
push 0x207
push eax
lea eax, [ebp - 0x2dc]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea eax, [ebp - 0x2dc]
mov byte [ebp - 0xd5], bl
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push dword [ebp - 0x1c]
lea eax, [ebp - 0x2dc]
push eax
lea eax, [ebp - 0x1420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
cmp eax, ebx
je 0x404b41
push eax
lea ecx, [esi + 8]
jmp 0x404b3c
movzx eax, word [ebp - 0x12]
lea eax, [eax + eax + 2]
push eax
call sub.MFC42u.DLL_operatornew
movzx ecx, word [ebp - 0x12]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x44], eax
mov word [eax + ecx*2], bx
lea ecx, [edi + 1]
movzx edx, word [ebp - 0x12]
imul ecx, edx
push ecx
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0x10
test eax, eax
je 0x404f0f
cmp edi, ebx
je 0x404b2e
push dword [ebp - 0x1c]
lea ecx, [esi + 0x2c]
jmp 0x404a54
movzx ecx, word [ebp - 0x12]
mov eax, dword [ebp - 0x1c]
push eax
mov byte [ecx + eax], bl
lea ecx, [esi + 0x2c]
call fcn.0041632e
add dword [ebp - 0x20], 4
cmp dword [ebp - 0x20], 0x41b000
jl 0x404783
mov dword [ebp - 0x24], 1
lea eax, [ebp - 0x60]
push 8
push eax
mov edi, 0x30c
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f01
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
cmp ecx, 0xa0000005
jne 0x404c39
cmp eax, 0x10
jne 0x404c40
lea eax, [ebp - 0x6c]
push 8
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f01
cmp dword [esi + 0x10], ebx
je 0x404eee
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x2da]
mov word [ebp - 0x2dc], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x2dc]
mov dword [ebp - 4], 2
push eax
push dword [ebp - 0x6c]
call fcn.004053b9
pop ecx
cmp eax, ebx
pop ecx
je 0x404c30
lea eax, [ebp - 0x2dc]
push eax
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
cmp eax, ebx
mov dword [ebp - 0x48], eax
je 0x404c30
mov ecx, dword [esi + 0x10]
add ecx, dword [ebp - 0x68]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_ILCombine]
push dword [esi + 0x10]
mov edi, dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 0x40], eax
call edi
push dword [ebp - 0x48]
call edi
mov eax, dword [ebp - 0x40]
mov dword [esi + 0x10], eax
jmp 0x404c30
or dword [ebp - 4], 0xffffffff
jmp 0x404eee
cmp eax, 0x314
je 0x404c4c
push 1
add eax, 0xfffffff8
push ebx
push eax
jmp 0x404ee1
cmp ecx, 0xa0000007
jne 0x404caf
lea eax, [ebp - 0xe08]
push edi
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f01
test byte [ebp - 0xa3], 0x40
je 0x404eee
lea eax, [ebp - 0xd04]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040517a
pop ecx
pop ecx
push eax
lea ecx, [esi + 0x1c]
mov dword [ebp - 4], 4
call fcn.00416328
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004162ce
jmp 0x404eee
cmp ecx, 0xa0000001
jne 0x404d1e
lea eax, [ebp - 0xe08]
push edi
push eax
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f01
test byte [ebp - 0xa3], 2
je 0x404eee
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x404cf0
push eax
call dword [sym.imp.SHELL32.dll_ILFree]
mov dword [esi + 0x10], ebx
lea eax, [ebp - 0xd04]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040517a
pop ecx
pop ecx
lea eax, [ebp - 0x1c]
lea ecx, [esi + 0x20]
push eax
mov dword [ebp - 4], 5
call fcn.00416328
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
jmp 0x404ca5
cmp ecx, 0xa0000006
jne 0x404edd
lea eax, [ebp - 0xe08]
push edi
push eax
mov dword [esi + 0x50], 1
push dword [ebp - 0x18]
call fcn.00405483
add esp, 0xc
test eax, eax
je 0x404f01
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x4e2]
mov word [ebp - 0x4e4], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x4e4]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.msi.dll
lea eax, [ebp - 0x4e4]
push 0x104
push eax
call fcn.0040500f
mov ecx, 0x423668
xor edi, edi
call fcn.0040dffa
test eax, eax
je 0x404daa
push ebx
mov ecx, 0x423668
call fcn.00405156
push 1
pop edi
lea eax, [ebp - 0x4e4]
push eax
call fcn.00416870
cmp edi, ebx
mov dword [ebp - 0x14], eax
je 0x404dc9
push 1
mov ecx, 0x423668
call fcn.00405156
cmp dword [ebp - 0x14], ebx
je 0x404f01
push str.MsiDecomposeDescriptorW
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebx
je 0x404f01
lea eax, [ebp - 0xafc]
push ebx
push eax
lea eax, [ebp - 0x6ec]
push eax
lea eax, [ebp - 0x8f4]
push eax
lea eax, [ebp - 0xd04]
push eax
call edi
test eax, eax
jne 0x404eee
lea ecx, [ebp - 0x20]
call sub.MFC42u.DLL_CString::CString_1
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 6
push eax
lea eax, [ebp - 0xafc]
push eax
call fcn.00401572
pop ecx
push eax
lea eax, [ebp - 0x6ec]
push eax
call fcn.00401572
pop ecx
push eax
lea eax, [ebp - 0x8f4]
push eax
call fcn.00401572
pop ecx
push eax
push edi
call fcn.004054db
add esp, 0x14
test eax, eax
je 0x404ed1
lea ecx, [ebp - 0x20]
call fcn.00404fff
test eax, eax
jne 0x404ed1
lea ecx, [ebp - 0x20]
call fcn.00404ff0
cmp eax, 3
jl 0x404e84
push 2
lea ecx, [ebp - 0x20]
call fcn.0040723a
cmp ax, 0x3a
je 0x404ed1
lea ecx, [ebp - 0x20]
call fcn.00404ff0
inc eax
lea ecx, [ebp - 0x20]
push eax
call sub.MFC42u.DLL_CString::GetBuffer
cmp word [eax + 2], 0x3f
jne 0x404ea3
mov word [eax + 2], 0x3a
push 0xffffffffffffffff
lea ecx, [ebp - 0x20]
call sub.MFC42u.DLL_CString::ReleaseBuffer
lea eax, [ebp - 0x20]
lea ecx, [esi + 8]
push eax
call fcn.00416328
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x404eca
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [esi + 0x10], ebx
mov dword [ebp - 0x24], 1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
jmp 0x404ca5
push 1
push ebx
push edi
push dword [ebp - 0x18]
call fcn.00405110
cmp eax, 0xffffffff
je 0x404f01
cmp dword [ebp - 0x60], 8
ja 0x404b59
jmp 0x404f01
mov dword [esi + 0x4c], 1
cmp dword [ebp - 0x50], ebx
je 0x404f0f
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x18], 0xffffffff
je 0x404f1d
push dword [ebp - 0x18]
call fcn.00405139
cmp dword [ebp - 0x38], ebx
je 0x404f2b
push dword [ebp - 0x38]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x4c], ebx
je 0x404f39
push dword [ebp - 0x4c]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x58], ebx
je 0x404f47
push dword [ebp - 0x58]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x54], ebx
je 0x404f55
push dword [ebp - 0x54]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x3c], ebx
je 0x404f63
push dword [ebp - 0x3c]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x34], ebx
je 0x404f71
push dword [ebp - 0x34]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x44], ebx
je 0x404f7f
push dword [ebp - 0x44]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x2c], ebx
je 0x404f8d
push dword [ebp - 0x2c]
call sub.MFC42u.DLL_operatordelete
pop ecx
cmp dword [ebp - 0x30], ebx
je 0x404f9b
push dword [ebp - 0x30]
call sub.MFC42u.DLL_operatordelete
pop ecx
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x24]
lea esp, [ebp - 0x142c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret