Function at 0x10030c60
Capabilities:
Get common file path

Disassembly:
push ebp
mov eax, 0x20
mov ebp, esp
push edi
mov edi, 0x1004f5e0
push esi
push ebx
lea ebx, [ebp - 0x624]
sub esp, 0x654
mov dword [ebp - 0x62c], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
sub esp, 0x10
test eax, eax
jne 0x10030cd8
test byte [0x100471c4], 2
jne 0x10030da0
inc dword [ebp - 0x62c]
mov eax, dword [ebp - 0x62c]
add edi, 0x10
cmp eax, 3
je 0x10030d90
mov eax, dword [edi]
jmp 0x10030c86
cmp word [ebp - 0x624], 0
mov esi, dword [edi + 4]
mov eax, ebx
je 0x10031090
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x10030cf0
sub eax, ebx
mov dword [ebp - 0x63c], eax
sar eax, 1
cmp word [esi], 0
mov dword [ebp - 0x630], eax
je 0x10031070
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x10030d18
mov ecx, eax
sub ecx, esi
mov edx, ecx
mov dword [ebp - 0x640], ecx
sar edx, 1
add edx, dword [ebp - 0x630]
mov dword [ebp - 0x634], edx
mov ecx, dword [ebp - 0x634]
add ecx, 2
mov dword [ebp - 0x638], ecx
cmp ecx, 0x104
jle 0x10030dd8
test byte [0x100471c4], 2
je 0x10030cb7
mov dword [esp + 0xc], str.Path_too_long_n
mov dword [esp + 8], str.cache_containers_init
mov dword [esp + 4], 0x100471c4
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_7
jmp 0x10030cb7
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x62c]
mov dword [esp + 0xc], str.Couldnt_get_path_for_default_container__lu_n
mov dword [esp + 8], str.cache_containers_init
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x100471c4
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_7
jmp 0x10030cb7
mov ecx, dword [ebp - 0x630]
lea edx, [ecx + 1]
mov ecx, dword [ebp - 0x630]
mov word [ebp + ecx*2 - 0x624], 0x5c
xor ecx, ecx
mov word [ebp + edx*2 - 0x624], cx
xor edx, edx
lea esi, [esi]
movzx ecx, word [ebx + edx]
mov word [ebp + edx - 0x41c], cx
add edx, 2
test cx, cx
jne 0x10030e00
cmp eax, esi
je 0x10030e5e
mov eax, dword [ebp - 0x63c]
mov edx, dword [ebp - 0x640]
mov dword [esp + 4], esi
add edx, 2
lea eax, [ebx + eax + 2]
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x634]
mov edx, 0x5c
xor ecx, ecx
mov word [ebp + eax*2 - 0x622], dx
mov eax, dword [ebp - 0x638]
mov word [ebp + eax*2 - 0x624], cx
mov eax, dword [ebp - 0x630]
lea esi, [ebp - 0x628]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x400
mov dword [esp], 0
mov dword [ebp - 0x630], eax
call eax
sub esp, 0x20
test eax, eax
je 0x10031010
mov eax, dword [ebp - 0x628]
test eax, eax
jne 0x10031010
mov edx, dword [edi + 0xc]
mov esi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0x20
mov eax, dword [edi + 8]
mov dword [ebp - 0x63c], edx
mov dword [ebp - 0x634], esi
mov dword [ebp - 0x630], eax
call esi
mov esi, eax
mov eax, dword [ebp - 0x630]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strlen]
mov dword [ebp - 0x638], eax
test esi, esi
je 0x10030cb7
mov edx, dword [ebp - 0x63c]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], edx
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [esi + 0xc], eax
test eax, eax
je 0x100311c9
mov ecx, dword [ebp - 0x638]
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp - 0x634]
inc ecx
mov dword [esp], ecx
mov dword [ebp - 0x638], ecx
call eax
mov ecx, dword [ebp - 0x638]
mov edx, dword [ebp - 0x63c]
test eax, eax
mov dword [esi + 8], eax
je 0x100311c4
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x630]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._memcpy
lea eax, [ebp - 0x41c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_CharLowerW]
movzx edx, word [ebp - 0x41c]
lea eax, [ebp - 0x41c]
sub esp, 4
test dx, dx
je 0x10030fc2
lea esi, cs:[esi]
cmp dx, 0x5c
jne 0x10030fb6
mov edx, 0x21
mov word [eax], dx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x10030fa8
lea eax, [ebp - 0x41c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateMutexW]
mov dword [esi + 0x18], eax
sub esp, 0xc
test eax, eax
je 0x10031165
mov eax, dword [0x100470cc]
mov dword [esi + 4], 0x100470cc
mov dword [0x100470cc], esi
mov dword [esi], eax
mov dword [eax + 4], esi
jmp 0x10030cb7
lea eax, [ebp - 0x214]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetShortPathNameW]
sub esp, 0xc
test eax, eax
jne 0x100310e0
test byte [0x100471c4], 2
je 0x10030ec3
mov dword [esp + 0xc], str.Cant_create_container_path_accessible_by_ANSI_functions_n
mov dword [esp + 8], str.cache_containers_init
mov dword [esp + 4], 0x100471c4
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_7
jmp 0x10030ec3
mov dword [ebp - 0x640], 0
mov eax, dword [ebp - 0x630]
mov dword [ebp - 0x634], eax
mov eax, esi
jmp 0x10030d3b
mov dword [ebp - 0x630], 0
cmp word [esi], 0
mov dword [ebp - 0x63c], 0
jne 0x10030d13
mov dword [ebp - 0x640], 0
mov eax, esi
mov edx, 1
mov dword [ebp - 0x638], 2
mov dword [ebp - 0x634], 0
jmp 0x10030de1
mov dword [esp + 0xc], eax
mov dword [ebp - 0x634], eax
lea eax, [ebp - 0x214]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x630]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0x400
mov dword [esp], 0
call eax
sub esp, 0x20
test eax, eax
je 0x10031036
mov ecx, dword [ebp - 0x628]
mov edx, dword [ebp - 0x634]
test ecx, ecx
jne 0x10031036
lea eax, [edx + edx + 2]
mov dword [esp], ebx
mov dword [esp + 8], eax
lea eax, [ebp - 0x214]
mov dword [esp + 4], eax
call sym._memcpy
jmp 0x10030ec3
test byte [0x100471c4], 2
jne 0x10031191
mov eax, dword [esi + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x630], eax
call eax
mov dword [esp], esi
mov eax, dword [ebp - 0x630]
call eax
jmp 0x10030cb7
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.couldnt_create_mutex__error_is__ld__n
mov dword [esp + 8], str.cache_containers_add
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x100471c4
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_7
jmp 0x1003116e
mov dword [esp], edx
jmp 0x10031174
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x10030cb7