Function at 0x402c60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x66c
mov dword [ebp - 0x64c], edx
mov dword [ebp - 0x650], ecx
mov dword [ebp - 0x648], 7
mov dword [ebp - 0x644], 0x10
mov dword [ebp - 0x640], 0xb
mov dword [ebp - 0x63c], 0x18
mov dword [ebp - 0x638], 0x19
mov dword [ebp - 0x634], 0x16
test byte [section..data], 8
jne 0x402ed0
lea esi, [ebp - 0x428]
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub eax, 1
sub esp, 0x10
cmp eax, 0x103
ja 0x402e58
test byte [section..data], 8
jne 0x402e68
lea eax, [ebp - 0x630]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetLongPathNameW]
mov ecx, eax
lea eax, [eax - 1]
sub esp, 0xc
cmp eax, 0x103
ja 0x402e58
test byte [section..data], 8
jne 0x402f60
mov dword [ebp - 0x654], ecx
lea edi, [ebp - 0x648]
lea esi, [ebp - 0x220]
jmp 0x402d69
add edi, 4
lea eax, [ebp - 0x630]
cmp eax, edi
je 0x402e58
mov ebx, dword [edi]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp + 8], ebx
mov dword [esp], 0
call dword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
sub esp, 0x10
test eax, eax
je 0x402d58
cmp word [ebp - 0x220], 0
je 0x402ff0
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x402da0
sub eax, esi
mov edx, eax
sar eax, 1
cmp edx, 0x206
ja 0x402d58
cmp dword [ebp - 0x654], eax
jb 0x402d58
cmp word [ebp + eax*2 - 0x630], 0x5c
jne 0x402d58
mov dword [ebp - 0x658], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x630]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x402d58
mov edx, dword [ebp - 0x658]
mov eax, dword [ebp - 0x64c]
mov dword [eax], ebx
lea ebx, [ebp + edx - 0x62e]
cmp word [ebx], 0
je 0x40302a
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x402e10
sub eax, ebx
add eax, 2
call fcn.00401590
xor edx, edx
lea esi, [esi]
movzx ecx, word [ebx + edx]
mov word [eax + edx], cx
add edx, 2
test cx, cx
jne 0x402e28
mov esi, dword [ebp - 0x650]
mov dword [esi], eax
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathRemoveExtensionW]
mov eax, 1
sub esp, 4
jmp 0x402e5a
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, esi
shr eax, 0x10
je 0x402f45
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 0x402e99
mov eax, esi
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d303
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x402d04
shr eax, 0x10
je 0x402f30
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 0x402efb
mov eax, ebx
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d303
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x402cc3
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x402efb
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x402e99
lea eax, [ebp - 0x630]
shr eax, 0x10
je 0x402ff9
lea eax, [ebp - 0x630]
mov dword [ebp - 0x654], ecx
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, dword [ebp - 0x654]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x402fb1
lea eax, [ebp - 0x630]
call fcn.00401250
mov ecx, dword [ebp - 0x654]
mov dword [ebp - 0x654], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d303
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
mov ecx, dword [ebp - 0x654]
jmp 0x402d3f
xor edx, edx
xor eax, eax
jmp 0x402dbf
lea eax, [ebp - 0x630]
mov dword [ebp - 0x658], ecx
mov dword [ebp - 0x654], eax
movzx eax, word [ebp - 0x654]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov ecx, dword [ebp - 0x658]
jmp 0x402fb1
mov eax, 2
jmp 0x402e1e