Function at 0x403c80
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 - 0x650], edx
mov dword [ebp - 0x654], 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 [0x40d014], 8
jne 0x403ef0
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 0x403e78
test byte [0x40d014], 8
jne 0x403e88
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 0x403e78
test byte [0x40d014], 8
jne 0x403f80
mov dword [ebp - 0x64c], ecx
lea edi, [ebp - 0x648]
lea esi, [ebp - 0x220]
jmp 0x403d89
add edi, 4
lea eax, [ebp - 0x630]
cmp eax, edi
je 0x403e78
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 0x403d78
cmp word [ebp - 0x220], 0
je 0x404010
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x403dc0
sub eax, esi
mov edx, eax
sar eax, 1
cmp dword [ebp - 0x64c], eax
jb 0x403d78
cmp edx, 0x206
ja 0x403d78
cmp word [ebp + eax*2 - 0x630], 0x5c
jne 0x403d78
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 0x403d78
mov edx, dword [ebp - 0x658]
mov eax, dword [ebp - 0x650]
mov dword [eax], ebx
lea ebx, [ebp + edx - 0x62e]
cmp word [ebx], 0
je 0x404037
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x403e30
sub eax, ebx
add eax, 2
call sym._xmalloc
xor edx, edx
lea esi, [esi]
movzx ecx, word [ebx + edx]
mov word [eax + edx], cx
add edx, 2
test cx, cx
jne 0x403e48
mov esi, dword [ebp - 0x654]
mov dword [esi], eax
mov dword [esp], eax
call sym._PathRemoveExtensionW_4
mov eax, 1
sub esp, 4
jmp 0x403e7a
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, esi
shr eax, 0x10
je 0x403f62
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 0x403eb9
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40e54f
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_1
jmp 0x403d24
shr eax, 0x10
je 0x403f50
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 0x403f1b
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40e54f
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_1
jmp 0x403ce3
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x403f1b
mov dword [esp + 4], esi
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x403eb9
lea eax, [ebp - 0x630]
mov dword [ebp - 0x64c], ecx
shr eax, 0x10
je 0x404019
lea eax, [ebp - 0x630]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, dword [ebp - 0x64c]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x403fd1
lea eax, [ebp - 0x630]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov ecx, dword [ebp - 0x64c]
mov dword [ebp - 0x64c], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40e54f
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_1
mov ecx, dword [ebp - 0x64c]
jmp 0x403d5f
xor edx, edx
xor eax, eax
jmp 0x403ddf
lea eax, [ebp - 0x630]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov ecx, dword [ebp - 0x64c]
jmp 0x403fd1
mov eax, 2
jmp 0x403e3e