Function at 0x10012100
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
mov eax, 0x1e28
call fcn.10096d00
mov eax, dword [0x100bb300]
xor eax, esp
mov dword [esp + 0x1e24], eax
xor eax, eax
push ebx
push ebp
mov ebp, dword [esp + 0x1e34]
push esi
push edi
push ebp
lea esi, [esp + 0x24]
mov dword [esp + 0x230], eax
mov dword [esp + 0x234], eax
mov dword [esp + 0x238], eax
mov dword [esp + 0x23c], eax
mov dword [esp + 0x240], eax
mov dword [esp + 0x244], eax
mov dword [esp + 0x248], eax
mov dword [esp + 0x24c], eax
mov dword [esp + 0x22c], eax
mov dword [esp + 0x228], eax
mov dword [esp + 0x250], eax
mov dword [esp + 0x254], eax
mov dword [esp + 0x258], eax
call fcn.10011c40
mov eax, dword [ebp + 0x14]
mov edi, dword [eax]
mov esi, dword [ebp]
mov byte [esp + 0x17], 0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp]
test esi, esi
je 0x100121a5
cmp esi, eax
je 0x100121aa
call fcn.100848cc
cmp edi, ebx
je 0x1001220f
test esi, esi
jne 0x100121f3
call fcn.100848cc
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x100121c3
call fcn.100848cc
mov eax, dword [edi + 0xc]
cmp eax, 4
jne 0x100121d0
mov byte [esp + 0x17], 1
cmp eax, 0xf
je 0x100121fb
cmp eax, 0x26
je 0x100121fb
test esi, esi
jne 0x100121f7
call fcn.100848cc
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x100121ef
call fcn.100848cc
mov edi, dword [edi]
jmp 0x10012197
mov eax, dword [esi]
jmp 0x100121b9
mov eax, dword [esi]
jmp 0x100121e5
push edi
push esi
lea ebx, [esp + 0x20]
mov edi, ebp
call fcn.10052500
mov esi, dword [eax]
mov edi, dword [eax + 4]
jmp 0x10012197
cmp byte [esp + 0x17], 0
jne 0x10012385
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x1a2a]
push edx
mov word [esp + 0x1a2c], cx
call fcn.10087b80
mov edi, dword [sym.imp.SHLWAPI.DLL_PathFileExistsW]
xor eax, eax
add esp, 0xc
cmp ax, word [esp + 0x1a20]
jne 0x100122e1
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x1c32]
push edx
mov word [esp + 0x1c34], cx
call fcn.10087b80
mov esi, dword [sym.imp.SHELL32.DLL_SHGetSpecialFolderPathW]
add esp, 0xc
push 0
push 0x26
lea eax, [esp + 0x1c30]
push eax
push 0
call esi
push 0x40
lea ecx, [esp + 0x1c2c]
push 0x100a87c4
push ecx
call fcn.1008585d
add esp, 0xc
lea edx, [esp + 0x1c28]
push edx
call edi
test eax, eax
je 0x100122d2
push 0
push 0x26
lea eax, [esp + 0x1a28]
push eax
push 0
call esi
push 0x40
lea ecx, [esp + 0x1a24]
push 0x100a87f4
push ecx
call fcn.1008585d
add esp, 0xc
cmp word [esp + 0x1a20], 0
je 0x10012385
lea edx, [esp + 0x1a20]
push edx
call edi
test eax, eax
je 0x10012385
lea edi, [esp + 0x258]
call fcn.100114c0
push 0x10
lea eax, [esp + 0x280]
push 0x100a8820
push eax
mov dword [esp + 0x268], 4
mov dword [esp + 0x26c], 1
call fcn.10085813
add esp, 0xc
push 0x10
lea ecx, [esp + 0x348]
push 0x100a8828
push ecx
call fcn.10085813
add esp, 0xc
lea edx, [esp + 0x1a20]
push edx
push 0x100a8838
mov eax, 0x410
lea ebx, [esp + 0x824]
call fcn.10012870
mov esi, dword [ebp + 0x14]
mov ecx, dword [esi + 4]
add esp, 8
mov eax, edi
push eax
push ecx
push esi
call fcn.100126e0
mov ecx, ebp
mov edi, eax
call fcn.10012790
mov dword [esi + 4], edi
mov edx, dword [edi + 4]
mov dword [edx], edi
lea esi, [esp + 0x20]
call fcn.100115c0
mov ecx, dword [esp + 0x1e34]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10083dbb
add esp, 0x1e28
ret