Function at 0x402540
Capabilities:
Get common file path

Disassembly:
sub esp, 0x114
lea eax, [esp + 0x24]
push ebx
mov ebx, ecx
push ebp
push esi
mov ecx, dword [ebx + 4]
push edi
mov edi, dword [sym.imp.USER32.dll_GetClientRect]
push eax
push ecx
call edi
mov esi, dword [ebx + 0x74]
test esi, esi
je 0x4029d5
test ebx, ebx
je 0x402571
lea ebp, [ebx + 0x1c]
jmp 0x402573
xor ebp, ebp
mov ecx, dword [0x563418]
test ecx, ecx
jne 0x402594
push str.SHLWAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, eax
test ecx, ecx
mov dword [0x563418], ecx
je 0x4025b6
mov eax, dword [0x553dd4]
test eax, eax
jne 0x4025b2
push str.IUnknown_SetSite
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [0x553dd4], eax
je 0x4025b6
push ebp
push esi
call eax
mov ecx, dword [ebx + 0x3c]
mov eax, 7
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], eax
test ecx, ecx
mov dword [esp + 0x2c], 1
je 0x4025f3
mov eax, dword [ebx + 4]
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x34], 0x820001
call edi
sub dword [esp + 0x34], 0xc8
jmp 0x4025fe
mov ecx, dword [ebx + 0x50]
test ecx, ecx
je 0x4025fe
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x74]
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x38]
mov ecx, dword [eax]
push edx
mov edx, dword [ebx + 4]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x4029d5
mov eax, dword [ebx + 0x3c]
test eax, eax
mov eax, dword [ebx + 0x74]
je 0x402631
mov ecx, dword [eax]
push 3
push eax
call dword [ecx + 0x2c]
jmp 0x402639
mov edx, dword [eax]
push 6
push eax
call dword [edx + 0x2c]
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x14], 0
test eax, eax
jne 0x40278d
lea eax, [esp + 0x14]
push eax
push 0x11
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x402782
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x4026ff
push 0
push eax
lea ecx, [esp + 0x20]
call fcn.005106b0
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
neg eax
sbb eax, eax
and eax, ecx
mov eax, dword [eax]
push eax
call fcn.00510570
add esp, 4
lea ecx, [esp + 0x20]
push eax
call fcn.0050fe10
lea edx, [esp + 0x10]
lea ecx, [esp + 0x20]
push edx
call fcn.00510700
mov eax, dword [eax]
push eax
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
mov edx, dword [0x546564]
mov esi, eax
mov eax, dword [esp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4026e5
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4026e5
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
test esi, esi
je 0x4026ed
mov dword [esp + 0x14], esi
lea ecx, [esp + 0x20]
call fcn.0050fe40
lea ecx, [esp + 0x18]
call fcn.0050fe40
mov eax, dword [ebx + 0x74]
mov edx, dword [esp + 0x14]
push 0
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x402782
mov eax, dword [ebx + 0x74]
lea edx, [esp + 0x10]
push edx
push 0x546610
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402782
mov eax, dword [ebx + 0x48]
push 0
push eax
lea ecx, [esp + 0x28]
call fcn.005106b0
lea ecx, [esp + 0x20]
call fcn.00510c70
push eax
lea ecx, [esp + 0x1c]
call fcn.0050fe10
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
neg eax
sbb eax, eax
push 0x19
and eax, ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [eax]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x38]
lea ecx, [esp + 0x18]
call fcn.0050fe40
lea ecx, [esp + 0x20]
call fcn.0050fe40
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x4029d5
mov eax, dword [ebx + 0x74]
push 0
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [ebx + 0x74]
lea ecx, [esp + 0x20]
push ecx
push 0x546690
mov edx, dword [eax]
push eax
call dword [edx + 0x44]
mov eax, dword [ebx + 0x74]
lea ebp, [ebx + 0x70]
push ebp
push 0x546690
mov edx, dword [eax]
push eax
call dword [edx + 0x44]
test eax, eax
jl 0x4029d5
mov eax, dword [ebp]
push 0x20000
push 0x20000
push eax
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp]
push 0x20
push 0x20
push eax
mov edx, dword [eax]
call dword [edx + 0x60]
mov eax, dword [ebp]
lea edx, [esp + 0x14]
push edx
push 0x546680
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x4028ae
mov eax, dword [esp + 0x14]
mov ecx, 5
mov esi, 0x541128
lea edi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
mov ecx, 5
mov esi, 0x541110
lea edi, [esp + 0x58]
lea edx, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push 2
push edx
push eax
call dword [ecx + 0x1c]
mov ecx, 0x2c
xor eax, eax
lea edi, [esp + 0x74]
mov dword [esp + 0x6c], 0xb8
mov dword [esp + 0x70], 7
lea edx, [esp + 0x6c]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
push edx
push 0x541110
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
jl 0x4028a4
mov edx, dword [esp + 0x7c]
mov esi, dword [esp + 0x78]
mov ecx, dword [esp + 0x80]
mov eax, 0x64
add edx, eax
add esi, eax
mov dword [esp + 0x7c], edx
add ecx, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x6c]
mov dword [esp + 0x78], esi
mov dword [esp + 0x80], ecx
mov ecx, dword [eax]
push edx
push 0x541110
push eax
call dword [ecx + 0xc]
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp]
lea edi, [ebx + 0x6c]
push edi
push 0x546670
mov edx, dword [eax]
push eax
mov dword [esp + 0x3c], edi
call dword [edx + 0x14]
test eax, eax
jl 0x4029d5
xor ecx, ecx
lea esi, [ebx + 0x58]
cmp esi, ecx
mov dword [esp + 0x10], ecx
je 0x4028de
add esi, 4
jmp 0x4028e0
xor esi, esi
mov eax, dword [esi]
mov dword [esp + 0x1c], ecx
cmp eax, ecx
je 0x40295c
mov eax, dword [0x553dd0]
cmp eax, ecx
jne 0x402900
push 0x553dd0
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
jmp 0x402906
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov eax, dword [0x553dd0]
mov ecx, dword [esi]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x18]
mov ebx, eax
mov eax, dword [esi]
test eax, eax
je 0x402944
mov eax, dword [0x553dd0]
push ebx
push eax
mov edx, dword [eax]
call dword [edx + 0xc]
mov esi, dword [esi]
mov ecx, ebx
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x30]
mov eax, dword [0x553dd0]
test eax, eax
je 0x40295c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
test eax, eax
jne 0x40295c
mov dword [0x553dd0], eax
lea eax, [esp + 0x18]
lea edx, [esp + 0x1c]
neg eax
sbb eax, eax
mov dword [esp + 0x18], 0x5409d8
and eax, edx
mov esi, dword [eax]
lea eax, [esp + 0x10]
test eax, eax
je 0x4029b2
test esi, esi
je 0x4029b2
mov eax, dword [0x553dcc]
test eax, eax
jne 0x402999
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x553dcc], eax
push str.SHCreateItemFromIDList
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [esp + 0x10]
push ecx
push 0x546648
push esi
call eax
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [ebp]
push 1
push 0
push eax
mov edx, dword [eax]
call dword [edx + 0x3c]
lea ecx, [esp + 0x18]
call fcn.0050fe40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret