Function at 0x40b660
Capabilities:
Get common file path

Disassembly:
sub esp, 0x32c
mov edx, dword [esp + 0x334]
push esi
push edi
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
xor esi, esi
repne scasb al, byte es:[edi]
lea eax, [esp + 8]
mov dword [esp + 8], esi
not ecx
push eax
push ecx
push edx
call fcn.00422fb0
test al, al
je 0x40b8eb
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0xc]
push 2
lea eax, [esp + 0x14]
push edx
push eax
push ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
call fcn.004167f0
cmp eax, 0x60000000
jne 0x40b8c7
mov edx, dword [esp + 0x14]
push ebx
push ebp
push 0x4354f0
push esi
push str.displayname
lea eax, [esp + 0x2c]
push edx
push eax
xor ebx, ebx
call fcn.004168c0
mov ebp, eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], bl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
lea ecx, [esp + 0x38]
push 0x104
push ecx
push ebx
mov dword [esp + 0x2c], 0x4354f0
stosb byte es:[edi], al
call fcn.004172b0
test al, al
je 0x40b723
lea edx, [esp + 0x30]
mov ebx, 1
mov dword [esp + 0x18], edx
jmp 0x40b741
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x344]
push 0x47
push 0x41a
push eax
call fcn.00401190
add esp, 0x10
cmp byte [ebp], 0
je 0x40b7df
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
inc edi
push edi
call fcn.00422aa0
mov esi, eax
test esi, esi
je 0x40b7c9
push edi
push esi
push ebp
call fcn.004165b0
test al, al
je 0x40b7b3
push 0x5f
push 0x5c
push esi
call fcn.0040e960
push 0x5f
push 0x2f
push esi
call fcn.0040e960
push 0x5f
push 0x3c
push esi
call fcn.0040e960
push 0x5f
push 0x3e
push esi
call fcn.0040e960
push 0x5f
push 0x7c
push esi
call fcn.0040e960
push 0x5f
push 0x3a
push esi
call fcn.0040e960
mov ebp, esi
inc ebx
jmp 0x40b7f8
mov ecx, dword [esp + 0x340]
push 0xe000000c
push 0x45
push 0x41a
push ecx
jmp 0x40b7f0
mov edx, dword [esp + 0x340]
push 0xe0000002
push 0x4e
push 0x41a
push edx
jmp 0x40b7f0
mov eax, dword [esp + 0x340]
push 0
push 0x43
push 0x41a
push eax
call fcn.00401190
add esp, 0x10
cmp ebx, 2
jne 0x40b8a0
push 0
lea ecx, [esp + 0x138]
push 0
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x40b882
lea edx, [esp + 0x134]
push ebp
push edx
push str._s_s.lnk
lea eax, [esp + 0x244]
push 0x104
push eax
call fcn.00401ce0
add esp, 0x14
test eax, eax
jle 0x40b870
cmp eax, 0x104
jae 0x40b870
mov ecx, dword [esp + 0x18]
push ebp
lea edx, [esp + 0x23c]
push ecx
push edx
call fcn.00419450
test eax, eax
jge 0x40b8a0
push eax
mov eax, dword [esp + 0x344]
push 0x4c
push 0x41a
push eax
jmp 0x40b898
mov ecx, dword [esp + 0x340]
push eax
push 0x53
push 0x41a
push ecx
jmp 0x40b898
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x340]
push eax
push 0x50
push 0x41a
push edx
call fcn.00401190
add esp, 0x10
test esi, esi
pop ebp
pop ebx
je 0x40b8ac
push esi
call fcn.00422f50
xor esi, esi
mov eax, dword [esp + 8]
mov dword [esp + 8], esi
push eax
call fcn.00422f50
pop edi
pop esi
add esp, 0x32c
ret 8
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
sub eax, ecx
mov ecx, dword [esp + 0x338]
push eax
push 0x51
push 0x41a
push ecx
call fcn.00401190
add esp, 0x10
jmp 0x40b8ae
mov edx, dword [esp + 0x338]
push 0xe0000002
push 0x41
push 0x41a
push edx
call fcn.00401190
add esp, 0x10
pop edi
pop esi
add esp, 0x32c
ret 8