Function at 0x10041f50
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x68c
mov eax, dword [0x1007b00c]
xor eax, esp
mov dword [esp + 0x688], eax
push ebx
push esi
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x20], eax
xor edi, edi
mov eax, dword [ebp + 0x28]
push 0x420
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x5c]
push edi
push eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
movups xmmword [esp + 0x48], xmm0
mov dword [esp + 0x60], edi
movq qword [esp + 0x58], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x2c], edi
lea eax, [esp + 0x34]
xor esi, esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x100421e7
cmp dword [esp + 0x34], esi
je 0x100421e7
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x100421e7
mov eax, dword [ebp + 8]
cmp eax, 0x104
jl 0x100421e7
add eax, eax
push eax
push esi
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test ebx, ebx
je 0x100420fc
cmp ebx, 0x11
jne 0x10042047
lea eax, [esp + 0x2c]
push eax
push ebx
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
js 0x1004219c
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
jmp 0x10042100
xor eax, eax
cmp ax, word [ebx]
je 0x100420fc
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
test eax, eax
js 0x1004219c
cmp dword [esp + 0x30], esi
je 0x1004219c
push 0x20a
lea eax, [esp + 0x484]
mov dword [esp + 0x480], esi
push 0
push eax
mov dword [esp + 0x484], esi
call sub.VCRUNTIME140.dll_memset
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x494]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x494]
mov ebx, dword [esp + 0x2c]
add esp, 0x1c
mov ecx, dword [eax]
push edx
lea edx, [esp + 0x30]
push edx
lea edx, [esp + 0x484]
push edx
lea edx, [esp + 0x48c]
push edx
push 0
push ebx
push eax
call dword [ecx + 0xc]
test eax, eax
mov eax, dword [esp + 0x30]
push eax
mov ecx, dword [eax]
jns 0x100420ef
call dword [ecx + 8]
jmp 0x1004219c
call dword [ecx + 8]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
jmp 0x10042100
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x24]
push 0x104
push dword [esp + 0x20]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x6c]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x1c]
push eax
mov dword [esp + 0x4c], ebx
call esi
push 0x104
push dword [esp + 0x24]
lea eax, [esp + 0x278]
push eax
call esi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x50], 0x10041c40
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov esi, eax
test esi, esi
je 0x1004219c
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x1004218a
mov eax, dword [esp + 0x54]
mov dword [ecx], eax
push ebx
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
mov ecx, 1
cmovne edi, ecx
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x100421af
mov eax, dword [esp + 0x34]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test esi, esi
je 0x100421be
mov eax, dword [esp + 0x34]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x2c], 0
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x688]
xor ecx, esp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x694]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret