Function at 0x412340
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cb9d3
mov eax, dword fs:[0]
push eax
sub esp, 0x1ec
mov eax, dword [0x4f96c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [ebp - 0x1f4]
push eax
push 2
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4123a4
lea eax, [ebp - 0x118]
push eax
push dword [ebp - 0x1f4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 0x1f4]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp byte [ebp - 0x118], 0
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
jne 0x4123cc
xor ecx, ecx
jmp 0x4123de
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4123d5
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x130]
call fcn.004018d0
lea eax, [esi + 0x38c]
mov dword [ebp - 4], 0
push eax
lea edx, [esi + 0x44c]
lea ecx, [ebp - 0x190]
call fcn.00415240
add esp, 4
push 0x4e77cc
mov edx, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x160]
call fcn.004024d0
add esp, 4
mov byte [ebp - 4], 3
cmp dword [ebp - 0x17c], 0x10
jb 0x412447
push dword [ebp - 0x190]
call fcn.004a8256
add esp, 4
push 0xffffffffffffffff
push 0
lea eax, [esi + 0x464]
mov dword [ebp - 0x17c], 0xf
push eax
lea ecx, [ebp - 0x148]
mov dword [ebp - 0x180], 0
mov byte [ebp - 0x190], 0
mov dword [ebp - 0x134], 0xf
mov dword [ebp - 0x138], 0
mov byte [ebp - 0x148], 0
call fcn.00401720
push 0xffffffffffffffff
mov byte [ebp - 4], 4
lea eax, [esi + 0x47c]
push 0
push eax
lea ecx, [ebp - 0x178]
mov dword [ebp - 0x164], 0xf
mov dword [ebp - 0x168], 0
mov byte [ebp - 0x178], 0
call fcn.00401720
lea edi, [esi + 0x374]
mov byte [ebp - 4], 5
push str..lnk
mov edx, edi
lea ecx, [ebp - 0x1a8]
call fcn.004063a0
add esp, 4
push edi
mov edx, 0x4e89ec
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x190]
call fcn.00406740
add esp, 4
push str..lnk
mov edx, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1c0]
call fcn.004024d0
add esp, 4
mov byte [ebp - 4], 9
cmp dword [ebp - 0x17c], 0x10
jb 0x412533
push dword [ebp - 0x190]
call fcn.004a8256
add esp, 4
cmp dword [ebp - 0x14c], 0x10
lea esi, [ebp - 0x160]
lea eax, [ebp - 0x1a8]
mov dword [ebp - 0x17c], 0xf
cmovae esi, dword [ebp - 0x160]
lea edx, [ebp - 0x130]
cmp dword [ebp - 0x194], 0x10
lea ecx, [ebp - 0x148]
mov dword [ebp - 0x180], 0
cmovae eax, dword [ebp - 0x1a8]
cmp dword [ebp - 0x11c], 0x10
mov byte [ebp - 0x190], 0
cmovae edx, dword [ebp - 0x130]
cmp dword [ebp - 0x134], 0x10
cmovae ecx, dword [ebp - 0x148]
sub esp, 0x10
push esi
push eax
call fcn.00404570
push 0x4e77cc
lea edx, [ebp - 0x130]
mov ebx, eax
lea ecx, [ebp - 0x1f0]
call fcn.004063a0
add esp, 0x1c
push edi
mov edx, eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1d8]
call fcn.00415300
mov esi, eax
add esp, 4
lea eax, [ebp - 0x130]
cmp eax, esi
je 0x412622
cmp dword [ebp - 0x11c], 0x10
jb 0x4125fb
push dword [ebp - 0x130]
call fcn.004a8256
add esp, 4
push esi
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
call fcn.004022c0
cmp dword [ebp - 0x1c4], 0x10
jb 0x412639
push dword [ebp - 0x1d8]
call fcn.004a8256
add esp, 4
mov byte [ebp - 4], 9
cmp dword [ebp - 0x1dc], 0x10
mov dword [ebp - 0x1c4], 0xf
mov dword [ebp - 0x1c8], 0
mov byte [ebp - 0x1d8], 0
jb 0x41266f
push dword [ebp - 0x1f0]
call fcn.004a8256
add esp, 4
lea ecx, [ebp - 0x130]
call fcn.00403d70
cmp dword [ebp - 0x14c], 0x10
lea esi, [ebp - 0x160]
lea eax, [ebp - 0x1a8]
cmovae esi, dword [ebp - 0x160]
lea edx, [ebp - 0x130]
cmp dword [ebp - 0x194], 0x10
lea ecx, [ebp - 0x148]
cmovae eax, dword [ebp - 0x1a8]
cmp dword [ebp - 0x11c], 0x10
cmovae edx, dword [ebp - 0x130]
cmp dword [ebp - 0x134], 0x10
cmovae ecx, dword [ebp - 0x148]
sub esp, 0x10
push esi
push eax
call fcn.00404570
or ebx, eax
lea esi, [ebp - 0x160]
cmp dword [ebp - 0x14c], 0x10
lea eax, [ebp - 0x1c0]
lea edx, [ebp - 0x130]
cmovae esi, dword [ebp - 0x160]
lea ecx, [ebp - 0x178]
cmp dword [ebp - 0x1ac], 0x10
cmovae eax, dword [ebp - 0x1c0]
cmp dword [ebp - 0x11c], 0x10
cmovae edx, dword [ebp - 0x130]
cmp dword [ebp - 0x164], 0x10
cmovae ecx, dword [ebp - 0x178]
add esp, 8
push esi
push eax
call fcn.00404570
mov esi, eax
add esp, 0x18
or esi, ebx
cmp dword [ebp - 0x1ac], 0x10
jb 0x41274e
push dword [ebp - 0x1c0]
call fcn.004a8256
add esp, 4
cmp dword [ebp - 0x194], 0x10
mov dword [ebp - 0x1ac], 0xf
mov dword [ebp - 0x1b0], 0
mov byte [ebp - 0x1c0], 0
jb 0x412780
push dword [ebp - 0x1a8]
call fcn.004a8256
add esp, 4
cmp dword [ebp - 0x164], 0x10
mov dword [ebp - 0x194], 0xf
mov dword [ebp - 0x198], 0
mov byte [ebp - 0x1a8], 0
jb 0x4127b2
push dword [ebp - 0x178]
call fcn.004a8256
add esp, 4
cmp dword [ebp - 0x134], 0x10
mov dword [ebp - 0x164], 0xf
mov dword [ebp - 0x168], 0
mov byte [ebp - 0x178], 0
jb 0x4127e4
push dword [ebp - 0x148]
call fcn.004a8256
add esp, 4
cmp dword [ebp - 0x14c], 0x10
mov dword [ebp - 0x134], 0xf
mov dword [ebp - 0x138], 0
mov byte [ebp - 0x148], 0
jb 0x412816
push dword [ebp - 0x160]
call fcn.004a8256
add esp, 4
cmp dword [ebp - 0x11c], 0x10
mov dword [ebp - 0x14c], 0xf
mov dword [ebp - 0x150], 0
mov byte [ebp - 0x160], 0
jb 0x412848
push dword [ebp - 0x130]
call fcn.004a8256
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a79be
mov esp, ebp
pop ebp
ret