Function at 0x401f30
Capabilities:
Get common file path

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff0
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
mov eax, 0x19
push ebx
sub esp, 0x660
mov dword [ebp - 0x650], edx
movdqa xmm0, xmmword [0x410790]
mov edx, 0x16
mov dword [ebp - 0x654], ecx
movaps xmmword [ebp - 0x648], xmm0
mov dword [ebp - 0x638], eax
mov dword [ebp - 0x634], edx
test byte [section..data], 8
jne 0x402160
mov dword [esp + 0xc], 0
lea ebx, [ebp - 0x428]
mov dword [esp + 4], 0x104
mov dword [esp + 8], ebx
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub eax, 1
sub esp, 0x10
cmp eax, 0x103
ja 0x4020e8
test byte [section..data], 8
jne 0x402100
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x630]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetLongPathNameW]
sub esp, 0xc
mov dword [ebp - 0x64c], eax
sub eax, 1
cmp eax, 0x103
ja 0x4020e8
test byte [section..data], 8
jne 0x4021f0
lea edi, [ebp - 0x648]
lea esi, [ebp - 0x220]
jmp 0x402029
lea eax, [ebp - 0x630]
add edi, 4
cmp eax, edi
je 0x4020e8
mov ebx, dword [edi]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [esp + 8], ebx
call dword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
sub esp, 0x10
test eax, eax
je 0x402018
cmp word [ebp - 0x220], 0
je 0x402260
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x402060
sub eax, esi
mov edx, eax
mov ecx, eax
sar edx, 1
cmp eax, 0x206
ja 0x402018
cmp dword [ebp - 0x64c], edx
jb 0x402018
cmp word [ebp + edx*2 - 0x630], 0x5c
jne 0x402018
lea eax, [ebp - 0x630]
mov dword [ebp - 0x658], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x402018
mov ecx, dword [ebp - 0x658]
mov eax, dword [ebp - 0x650]
mov dword [eax], ebx
lea eax, [ebp + ecx - 0x62e]
call fcn.00401be0
mov ecx, dword [ebp - 0x654]
mov dword [ecx], eax
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathRemoveExtensionW]
mov eax, 1
sub esp, 4
jmp 0x4020ea
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x4021da
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x402133
mov eax, ebx
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40e153
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x401fc8
test esi, esi
je 0x402269
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x4021c8
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x402197
mov eax, esi
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40e153
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x401f87
mov dword [esp + 4], esi
mov dword [esp], str._04x
call fcn.00401440
jmp 0x402197
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.00401440
jmp 0x402133
lea eax, [ebp - 0x630]
shr eax, 0x10
test eax, eax
je 0x402273
lea eax, [ebp - 0x630]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40222d
lea eax, [ebp - 0x630]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40e153
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x402007
xor ecx, ecx
xor edx, edx
jmp 0x402080
mov eax, str._null_
jmp 0x402197
lea eax, [ebp - 0x630]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x40222d