Function at 0x101097b
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push 0x308
mov eax, 0x1051bf0
call fcn.0100d3b9
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2ac], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x2a4], ecx
mov dword [ebp - 0x2b0], eax
mov dword [ebp - 0x28c], ebx
mov esi, 0x1001728
mov eax, dword [ebp - 0x28c]
cmp eax, 2
jae 0x1010cb0
mov dword [ebp - 0x29c], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x290], ebx
push ebx
push esi
push dword [eax*8 + 0x1002118]
mov byte [ebp - 4], 1
call fcn.0100e15b
lea ecx, [ebp - 0x29c]
mov edi, eax
call fcn.0100e311
mov eax, dword [ebp - 0x2a4]
mov eax, dword [eax]
mov ecx, dword [eax]
lea edx, [ebp - 0x290]
push edx
push edi
push eax
mov dword [ebp - 0x29c], edi
call dword [ecx + 0x90]
mov dword [ebp - 0x288], ebx
mov byte [ebp - 4], 2
mov dword [ebp - 0x2a0], ebx
mov eax, dword [ebp - 0x290]
mov ecx, dword [eax]
lea edx, [ebp - 0x288]
push edx
push eax
call dword [ecx + 0x24]
test eax, eax
jne 0x1010c7e
mov dword [ebp - 0x294], ebx
mov eax, dword [ebp - 0x288]
mov ecx, dword [eax]
lea edx, [ebp - 0x294]
push edx
push 0x1008768
push eax
mov byte [ebp - 4], 3
call dword [ecx]
cmp eax, ebx
jge 0x1010a6c
push ebx
push esi
push eax
call fcn.01038ed2
lea ecx, [ebp - 0x224]
call fcn.01039a60
push 1
lea eax, [ebp - 0x224]
push eax
push 0x1002238
push dword [ebp - 0x294]
mov byte [ebp - 4], 4
call fcn.010123a0
mov eax, dword [0x1064004]
cmp eax, 0x1064004
je 0x1010ac7
test dword [eax + 0x1c], 0x100
je 0x1010ac7
cmp byte [eax + 0x19], 1
jb 0x1010ac7
push dword [ebp - 0x220]
push 0x1002108
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100df04
mov dword [ebp - 0x298], ebx
push dword [ebp - 0x220]
mov edi, 0x104
push dword [ebp - 0x2b0]
lea eax, [ebp - 0x21c]
push 0x1002278
push edi
push eax
mov byte [ebp - 4], 5
call fcn.0100a954
add esp, 0x14
cmp eax, ebx
jge 0x1010b03
push ebx
push esi
push eax
call fcn.01038ed2
lea eax, [ebp - 0x21c]
push eax
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1010bc4
push edi
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x1010b87
push ebx
push esi
lea ecx, [ebp - 0x284]
call fcn.01039385
mov byte [ebp - 4], 7
call fcn.010399b4
push eax
lea ecx, [ebp - 0x284]
call fcn.01039483
lea eax, [ebp - 0x284]
push 0x10022c0
push eax
call fcn.0103940f
pop ecx
pop ecx
lea eax, [ebp - 0x284]
push eax
lea ecx, [ebp - 0x314]
call fcn.0100dcd2
push 0x10590d8
lea eax, [ebp - 0x314]
push eax
call sub.msvcrt.dll__CxxThrowException
push 0x100153c
push edi
lea eax, [ebp - 0x21c]
push eax
call fcn.0100ff06
cmp eax, ebx
jge 0x1010ba5
push ebx
push esi
push eax
call fcn.01038ed2
push dword [ebp - 0x220]
lea eax, [ebp - 0x21c]
push edi
push eax
call fcn.0100ff06
cmp eax, ebx
jge 0x1010bc4
push ebx
push esi
push eax
call fcn.01038ed2
mov eax, dword [ebp - 0x2a8]
mov ecx, dword [eax + 0x18]
lea eax, [ebp - 0x21c]
push eax
call fcn.01038bff
push eax
lea ecx, [ebp - 0x298]
call fcn.0100fee4
push dword [ebp - 0x2ac]
mov ecx, dword [ebp - 0x298]
call fcn.0103802c
mov dword [ebp - 4], 5
jmp 0x1010c3c
lea eax, [ebp - 0x298]
push eax
call fcn.0100feb5
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 3
call fcn.01039abd
lea eax, [ebp - 0x294]
push eax
mov byte [ebp - 4], 2
call fcn.010232f6
inc dword [ebp - 0x2a0]
lea eax, [ebp - 0x288]
push eax
call fcn.010232f6
jmp 0x1010a24
lea eax, [ebp - 0x288]
push eax
call fcn.010232f6
lea eax, [ebp - 0x290]
push eax
call fcn.010232f6
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x29c]
call fcn.0100e311
inc dword [ebp - 0x28c]
jmp 0x10109b8
call fcn.0100d424
ret 0xc