Function at 0x402ab0
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 [0x40c000], 8
jne 0x402d20
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 0x402ca8
test byte [0x40c000], 8
jne 0x402cb8
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 0x402ca8
test byte [0x40c000], 8
jne 0x402db0
mov dword [ebp - 0x654], ecx
lea edi, [ebp - 0x648]
lea esi, [ebp - 0x220]
jmp 0x402bb9
add edi, 4
lea eax, [ebp - 0x630]
cmp eax, edi
je 0x402ca8
mov ebx, dword [edi]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp + 8], ebx
mov dword [esp], 0
call sym._SHGetSpecialFolderPathW_16
sub esp, 0x10
test eax, eax
je 0x402ba8
cmp word [ebp - 0x220], 0
je 0x402e40
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x402bf0
sub eax, esi
mov edx, eax
sar eax, 1
cmp edx, 0x206
ja 0x402ba8
cmp dword [ebp - 0x654], eax
jb 0x402ba8
cmp word [ebp + eax*2 - 0x630], 0x5c
jne 0x402ba8
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 0x402ba8
mov edx, dword [ebp - 0x658]
mov eax, dword [ebp - 0x64c]
mov dword [eax], ebx
lea ebx, [ebp + edx - 0x62e]
cmp word [ebx], 0
je 0x402e7a
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x402c60
sub eax, ebx
add eax, 2
call dbg.xmalloc
xor edx, edx
lea esi, [esi]
movzx ecx, word [ebx + edx]
mov word [eax + edx], cx
add edx, 2
test cx, cx
jne 0x402c78
mov esi, dword [ebp - 0x650]
mov dword [esi], eax
mov dword [esp], eax
call sym._PathRemoveExtensionW_4
mov eax, 1
sub esp, 4
jmp 0x402caa
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, esi
shr eax, 0x10
je 0x402d95
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 0x402ce9
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d303
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402b54
shr eax, 0x10
je 0x402d80
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 0x402d4b
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d303
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402b13
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x402d4b
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x402ce9
lea eax, [ebp - 0x630]
shr eax, 0x10
je 0x402e49
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 0x402e01
lea eax, [ebp - 0x630]
call sym._wine_dbgstr_wn.part.0.constprop.0
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], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x654]
jmp 0x402b8f
xor edx, edx
xor eax, eax
jmp 0x402c0f
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 sym._wine_dbg_sprintf.constprop.0
mov ecx, dword [ebp - 0x658]
jmp 0x402e01
mov eax, 2
jmp 0x402c6e