Function at 0x10021170
Capabilities:
Get common file path

Disassembly:
sub esp, 0x964
mov eax, dword [0x1005c0e4]
xor eax, esp
mov dword [esp + 0x960], eax
push ebx
push ebp
mov ebp, dword [esp + 0x970]
xor ebx, ebx
push str.prefix
push ebp
mov dword [esp + 0x10], ebx
call fcn.1001e890
add esp, 8
test eax, eax
je 0x100211ca
push 0x10051490
push eax
call sym.fontconfig.dll_FcStrCmp
add esp, 8
test eax, eax
jne 0x100211ca
call fcn.10008610
mov ebx, eax
mov dword [esp + 8], ebx
test ebx, ebx
je 0x1002160b
mov ecx, dword [ebp]
push esi
add ecx, 0xc
push edi
push ecx
call fcn.1001bf60
mov esi, eax
add esp, 4
test esi, esi
jne 0x100211f8
push str.out_of_memory
push 2
push ebp
call fcn.1001ea60
add esp, 0xc
mov esi, ebx
jmp 0x100215fc
mov al, byte [esi]
test al, al
jne 0x1002121b
push str.empty_cache_directory_name_ignored
push 1
push ebp
call fcn.1001ea60
push esi
call sym.fontconfig.dll_FcStrFree
add esp, 0x10
mov esi, ebx
jmp 0x100215fc
test ebx, ebx
je 0x100212a8
mov edi, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x10021228
mov ebx, esi
sub edi, ecx
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x10021236
sub ebx, ecx
lea eax, [ebx + edi]
mov dword [esp + 0x14], eax
add eax, 2
push eax
push dword [esp + 0x14]
call fcn.1002cca4
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x1002127c
push str.out_of_memory
push 2
push ebp
call fcn.1001ea60
push dword [esp + 0x1c]
call sym.fontconfig.dll_FcStrFree
add esp, 0x10
jmp 0x10021600
mov byte [eax + edi], 0x5c
inc edi
push ebx
add eax, edi
push esi
push eax
call fcn.10024bf0
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
push esi
mov byte [eax + edi + 1], 0
call sym.fontconfig.dll_FcStrFree
add esp, 0x10
mov esi, edi
jmp 0x10021585
cmp al, 0x2f
jne 0x10021352
cmp byte [0x1005cbc8], 0
je 0x10021352
mov edi, 0x1005cbc8
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x100212c5
mov ebx, esi
sub edi, ecx
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x100212d3
sub ebx, ecx
lea eax, [ebx + edi]
mov dword [esp + 0x14], eax
add eax, 2
push eax
call fcn.100274ed
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x1002130c
push str.out_of_memory
push 2
push ebp
call fcn.1001ea60
add esp, 0xc
jmp 0x10021600
mov ecx, 0x1005cbc8
mov edx, eax
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x10021315
mov eax, dword [esp + 0x10]
push ebx
mov ebx, eax
push esi
mov byte [edi + eax], 0x5c
lea eax, [ebx + 1]
add eax, edi
push eax
call fcn.10024bf0
mov eax, dword [esp + 0x20]
push esi
mov byte [eax + ebx + 1], 0
call sym.fontconfig.dll_FcStrFree
add esp, 0x10
mov esi, ebx
jmp 0x10021585
mov ecx, str.WINDOWSTEMPDIR_FONTCONFIG_CACHE
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10021380
test dl, dl
je 0x1002137c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10021380
add eax, 2
add ecx, 2
test dl, dl
jne 0x10021360
xor eax, eax
jmp 0x10021385
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1002147b
push esi
call sym.fontconfig.dll_FcStrFree
push 0x3e8
call fcn.100274ed
mov esi, eax
add esp, 8
test esi, esi
je 0x10021561
lea eax, [esp + 0x330]
push eax
push 0x320
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x10021466
cmp eax, 0x320
jg 0x10021466
push 0
push 0
push 0x3e8
push esi
push eax
lea eax, [esp + 0x344]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x10021600
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021400
sub ecx, edx
cmp byte [ecx + esi - 1], 0x5c
je 0x10021426
lea edi, [esi - 1]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x10021413
mov ax, word [0x1004390c]
mov word [edi], ax
lea ecx, [esi - 1]
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x10021430
mov eax, dword [str.fontconfigcache]
mov dword [ecx], eax
mov eax, dword [0x100519b0]
mov dword [ecx + 4], eax
mov eax, dword [0x100519b4]
mov dword [ecx + 8], eax
mov eax, dword [0x100519b8]
mov dword [ecx + 0xc], eax
mov al, byte [0x100519bc]
mov byte [ecx + 0x10], al
jmp 0x10021585
push str.GetTempPath_failed
push 2
push ebp
call fcn.1001ea60
add esp, 0xc
jmp 0x10021600
mov ecx, str.LOCAL_APPDATA_FONTCONFIG_CACHE
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100214a2
test dl, dl
je 0x1002149e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100214a2
add eax, 2
add ecx, 2
test dl, dl
jne 0x10021482
xor eax, eax
jmp 0x100214a7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10021585
lea eax, [esp + 0x124]
push eax
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x100214de
push str.SHGetFolderPath_failed
push 2
push ebp
call fcn.1001ea60
add esp, 0xc
jmp 0x10021600
push 0
push 0
push 0x104
lea eax, [esp + 0x28]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x138]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x10021600
lea ecx, [esp + 0x1c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021512
sub ecx, edx
mov eax, 0x103
sub eax, ecx
push eax
lea eax, [esp + 0x20]
push str._fontconfigcache
push eax
call fcn.10032840
lea ecx, [esp + 0x28]
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021540
sub ecx, edx
push esi
lea edi, [ecx + 1]
call sym.fontconfig.dll_FcStrFree
push edi
call fcn.100274ed
mov esi, eax
add esp, 8
test esi, esi
jne 0x10021576
push str.out_of_memory
push 2
push ebp
call fcn.1001ea60
add esp, 0xc
jmp 0x10021609
push edi
lea eax, [esp + 0x20]
push eax
push esi
call fcn.1002ca60
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10021590
sub ecx, edx
jne 0x100215ad
push str.empty_cache_directory_name_ignored
push 1
push ebp
call fcn.1001ea60
add esp, 0xc
jmp 0x100215ed
cmp dword [ebp + 0xb28], 0
jne 0x100215ed
push esi
call fcn.1001df20
add esp, 4
test eax, eax
je 0x100215cc
call sym.fontconfig.dll_FcConfigHome
test eax, eax
je 0x100215ed
push esi
push dword [ebp + 0x10]
call fcn.10003f00
add esp, 8
test eax, eax
jne 0x100215ed
push esi
push str.out_of_memory__cannot_add_cache_directory__s
push 2
push ebp
call fcn.1001ea60
add esp, 0x10
mov eax, dword [ebp]
add eax, 0xc
push eax
call fcn.1001bf20
add esp, 4
test esi, esi
je 0x10021609
push esi
call sym.fontconfig.dll_FcStrFree
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x968]
pop ebp
pop ebx
xor ecx, esp
call fcn.10023cd9
add esp, 0x964
ret