Function at 0x40b640
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x40ff1b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9dc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x9f8]
mov ebp, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x18], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40bb12
mov ecx, 0xff
lea edi, [esp + 0x5ed]
mov byte [esp + 0x5ec], al
mov byte [esp + 0x84], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x85]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x10]
stosb byte es:[edi], al
call fcn.00409920
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x3ff
lea eax, [esp + 0x5f0]
push esi
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
push eax
mov dword [esp + 0xa00], 0
call esi
mov al, byte [esp + 0x5f9]
add esp, 0xc
cmp al, 0x3a
jne 0x40b71b
lea ecx, [esp + 0x10]
mov dword [esp + 0x9f4], 0xffffffff
call fcn.00409950
mov eax, 1
jmp 0x40bb14
lea ecx, [esp + 0x5ec]
push 0x3e
push ecx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x40b75e
cmp byte [esp + 0x5ec], 0x3c
jne 0x40b75e
lea edx, [esp + 0x5ec]
sub eax, edx
cmp eax, 0x33
jae 0x40b75e
inc eax
lea ecx, [esp + 0x1c]
push eax
lea eax, [esp + 0x5f0]
push eax
push ecx
call esi
add esp, 0xc
mov ebx, dword [sym.imp.MSVCRT.dll__stricmp]
lea edx, [esp + 0x1c]
push str._CURRENTDIR_
push edx
call ebx
add esp, 8
test eax, eax
jne 0x40b78b
lea eax, [esp + 0x84]
mov ecx, ebp
push eax
call fcn.0040b4f0
jmp 0x40bc67
lea ecx, [esp + 0x1c]
push str._WINSYSDIR_
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x40b7b6
lea edx, [esp + 0x84]
push 0x400
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40bc67
lea eax, [esp + 0x1c]
push str._WINDIR_
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40b7e1
lea ecx, [esp + 0x84]
push 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x40bc67
lea edx, [esp + 0x1c]
push str._PROGRAMFILES_
push edx
call ebx
add esp, 8
test eax, eax
jne 0x40b80d
lea eax, [esp + 0x84]
push 0x400
push eax
mov ecx, ebp
call fcn.0040bd40
jmp 0x40bc67
lea ecx, [esp + 0x1c]
push str._SYSDRIVE_
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x40b840
lea edx, [esp + 0x84]
push 0x400
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov byte [esp + 0x86], 0
jmp 0x40bc67
lea eax, [esp + 0x1c]
push str._TEMPDIR_
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40b867
lea ecx, [esp + 0x84]
push ecx
mov ecx, ebp
call fcn.0040b5a0
jmp 0x40bc67
lea edx, [esp + 0x1c]
push str._StartMenu_
push edx
call ebx
add esp, 8
test eax, eax
jne 0x40b895
lea eax, [esp + 0x84]
push 0x400
push eax
lea ecx, [esp + 0x18]
call fcn.00409a10
jmp 0x40bc67
lea ecx, [esp + 0x1c]
push str._Programs_
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x40b8c3
lea edx, [esp + 0x84]
push 0x400
push edx
lea ecx, [esp + 0x18]
call fcn.00409a30
jmp 0x40bc67
lea eax, [esp + 0x1c]
push str._Startup_
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40b8f1
lea ecx, [esp + 0x84]
push 0x400
push ecx
lea ecx, [esp + 0x18]
call fcn.00409a50
jmp 0x40bc67
lea edx, [esp + 0x1c]
push str._Desktop_
push edx
call ebx
add esp, 8
test eax, eax
jne 0x40b91f
lea eax, [esp + 0x84]
push 0x400
push eax
lea ecx, [esp + 0x18]
call fcn.00409ad0
jmp 0x40bc67
lea ecx, [esp + 0x1c]
push str._Favorites_
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x40b94d
lea edx, [esp + 0x84]
push 0x400
push edx
lea ecx, [esp + 0x18]
call fcn.00409a90
jmp 0x40bc67
lea eax, [esp + 0x1c]
push str._Personal_
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40b97b
lea ecx, [esp + 0x84]
push 0x400
push ecx
lea ecx, [esp + 0x18]
call fcn.00409a70
jmp 0x40bc67
lea edx, [esp + 0x1c]
push str._SendTo_
push edx
call ebx
add esp, 8
test eax, eax
jne 0x40b9a9
lea eax, [esp + 0x84]
push 0x400
push eax
lea ecx, [esp + 0x18]
call fcn.00409ab0
jmp 0x40bc67
lea ecx, [esp + 0x1c]
push str._AllStartMenu_
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x40b9d7
lea edx, [esp + 0x84]
push 0x400
push edx
lea ecx, [esp + 0x18]
call fcn.00409af0
jmp 0x40bc67
lea eax, [esp + 0x1c]
push str._AllPrograms_
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40ba05
lea ecx, [esp + 0x84]
push 0x400
push ecx
lea ecx, [esp + 0x18]
call fcn.00409b10
jmp 0x40bc67
lea edx, [esp + 0x1c]
push str._AllStartup_
push edx
call ebx
add esp, 8
test eax, eax
jne 0x40ba33
lea eax, [esp + 0x84]
push 0x400
push eax
lea ecx, [esp + 0x18]
call fcn.00409b30
jmp 0x40bc67
lea ecx, [esp + 0x1c]
push str._AllDesktop_
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x40ba61
lea edx, [esp + 0x84]
push 0x400
push edx
lea ecx, [esp + 0x18]
call fcn.00409b50
jmp 0x40bc67
lea eax, [esp + 0x1c]
push str._AllFavorites_
push eax
call ebx
add esp, 8
test eax, eax
jne 0x40ba8f
lea ecx, [esp + 0x84]
push 0x400
push ecx
lea ecx, [esp + 0x18]
call fcn.00409b70
jmp 0x40bc67
add ebp, 0xcc
push 0xa
mov ecx, ebp
call fcn.0040dc10
xor esi, esi
mov dword [esp + 0x14], eax
test eax, eax
jle 0x40bafe
mov ecx, 0x59
xor eax, eax
lea edi, [esp + 0x484]
lea edx, [esp + 0x484]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
push 0xa
push esi
mov ecx, ebp
stosb byte es:[edi], al
call fcn.0040e0b0
test eax, eax
je 0x40baf5
lea eax, [esp + 0x4b7]
push eax
call dword [sym.imp.MSVCRT.dll__strupr]
lea ecx, [esp + 0x4bb]
lea edx, [esp + 0x20]
push ecx
push edx
call ebx
add esp, 0xc
test eax, eax
je 0x40bb2f
mov eax, dword [esp + 0x14]
inc esi
cmp esi, eax
jl 0x40baa8
lea ecx, [esp + 0x10]
mov dword [esp + 0x9f4], 0xffffffff
call fcn.00409950
xor eax, eax
mov ecx, dword [esp + 0x9ec]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9e8
ret 8
cmp byte [esp + 0x4ea], 1
jne 0x40bb7f
lea edi, [esp + 0x4eb]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x84]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x400
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x88]
push ecx
mov ecx, dword [esp + 0x20]
call fcn.0040b640
jmp 0x40bc67
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x51]
mov byte [esp + 0x50], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edi, [esp + 0x1d]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, dword [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebx + 0xaf0]
mov byte [esp + ecx + 0x4f], al
lea ecx, [esp + 0x50]
push ecx
push edi
call dword [sym.imp.MSVCRT.dll_strstr]
mov esi, eax
add esp, 8
test esi, esi
je 0x40bafe
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x50]
xor edx, edx
lea ebp, [ecx + ebx + 0xaef]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esi + ecx + 1]
mov cl, byte [esi + ecx + 1]
cmp cl, 0x27
je 0x40bc27
cmp cl, 0x22
jne 0x40bc2d
mov edx, 1
inc eax
cmp eax, ebp
je 0x40bc5e
lea esi, [esp + 0x84]
cmp edx, 1
jne 0x40bc4b
mov cl, byte [eax]
cmp cl, 0x27
je 0x40bc5e
cmp cl, 0x22
je 0x40bc5e
jmp 0x40bc54
test edx, edx
jne 0x40bc54
cmp byte [eax], 0x20
je 0x40bc5e
mov cl, byte [eax]
mov byte [esi], cl
inc esi
inc eax
cmp eax, ebp
jne 0x40bc38
lea ecx, [esp + 0x14]
call fcn.0040f288
lea edx, [esp + 0x1c]
lea eax, [esp + 0x5ec]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edx, eax
add esp, 8
test edx, edx
je 0x40bafe
lea ecx, [esp + 0x5ec]
cmp edx, ecx
jne 0x40bafe
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add edx, ecx
mov al, byte [edx]
cmp al, 0x5c
je 0x40bcb0
cmp al, 0x2f
jne 0x40bcb1
inc edx
lea edi, [esp + 0x84]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x83], 0x5c
je 0x40bcf7
lea edi, [esp + 0x84]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x83], 0x2f
je 0x40bcf7
push edx
lea edx, [esp + 0x88]
push edx
push str._s_s
jmp 0x40bd05
push edx
lea edx, [esp + 0x88]
push edx
push 0x414354
mov eax, dword [esp + 0xa0c]
mov ecx, dword [esp + 0xa08]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea ecx, [esp + 0x10]
mov dword [esp + 0x9f4], 0xffffffff
call fcn.00409950
mov eax, 1
jmp 0x40bb14