Function at 0x1000b6d6
Capabilities:
Check if file exists
Get common file path
Query environment variable

Disassembly:
push 0x10
mov eax, 0x1005e097
call fcn.10046db5
mov esi, ecx
and dword [ebp - 0x18], 0
mov ebx, edx
call fcn.1000120f
mov eax, dword [ebp + 8]
mov dword [esi + 0x48], eax
lea eax, [esi + 0x28]
mov edi, 0x104
mov dword [ebp - 0x14], eax
mov eax, dword [eax]
push edi
add esi, 0x3c
lea ebx, [edi + 1]
push ebx
mov dword [ebp - 0x10], eax
mov dword [ebp + 8], esi
call fcn.100029f5
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1000b8a1
call fcn.10002a2a
mov esi, dword [ebp - 0x14]
push str._PROCPATH_
call fcn.1000a2d7
test eax, eax
js 0x1000b7c7
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
and dword [ebp - 4], 0
push edi
push ebx
lea esi, [ebp - 0x10]
call fcn.100029f5
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call fcn.10002a2a
call fcn.1000bac3
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
xor edx, edx
mov eax, esi
call fcn.10002d07
mov edi, esi
mov byte [ebp - 4], 1
call fcn.10002660
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003787
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp + 8]
call fcn.10002660
mov esi, dword [ebp - 0x10]
push esi
push str._PROCPATH_
push edi
call fcn.100026fd
or dword [ebp - 4], 0xffffffff
lea eax, [esi - 0x10]
call fcn.10003787
lea edi, [ebx - 1]
mov esi, dword [ebp + 8]
push 0x25
call fcn.100028e1
test eax, eax
js 0x1000b939
call fcn.1000bac3
lea ecx, [ebp - 0x14]
mov edx, eax
push ecx
mov eax, esi
call fcn.10002908
mov dword [ebp - 4], 2
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
lea esi, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.100029f5
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 8], ebx
jge 0x1000b824
push 0x80070057
call fcn.10003813
push eax
xor edx, edx
mov dword [ecx - 0xc], ebx
push edi
mov word [ecx + 0x20a], dx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea esi, [ebp - 0x10]
call fcn.10002a2a
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jle 0x1000b88e
lea eax, [ebp - 0x1c]
push eax
mov edi, esi
call fcn.1000badc
pop ecx
mov edi, dword [ebp + 8]
mov byte [ebp - 4], 4
call fcn.10002660
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003787
mov esi, dword [ebp - 0x14]
push dword [esi - 0xc]
mov eax, edi
push esi
call fcn.100032c7
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.10003787
jmp 0x1000b92d
add eax, 0xfffffff0
call fcn.10003787
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
jmp 0x1000b9ab
mov esi, dword [ebp - 0x14]
push 1
call fcn.100028e1
test eax, eax
je 0x1000b939
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
push edi
push ebx
lea esi, [ebp - 0x10]
mov dword [ebp - 4], 5
call fcn.100029f5
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call fcn.10002a2a
call fcn.1000bac3
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
xor edx, edx
mov eax, esi
call fcn.10002d07
mov edi, esi
mov byte [ebp - 4], 6
call fcn.10002660
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003787
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp + 8]
call fcn.10002660
mov esi, dword [ebp - 0x10]
push esi
push str._PROCPATH_
push edi
call fcn.100026fd
or dword [ebp - 4], 0xffffffff
lea eax, [esi - 0x10]
call fcn.10003787
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
lea edi, [ebp - 0x10]
mov dword [ebp - 4], 7
call fcn.10002660
mov esi, edi
call fcn.1000bac3
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, eax
xor edx, edx
mov eax, edi
call fcn.10002d07
mov byte [ebp - 4], 8
call fcn.10002660
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003787
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1000b9a1
push esi
call fcn.1000bd32
pop ecx
mov dword [ebp - 0x18], 1
lea eax, [esi - 0x10]
call fcn.10003787
mov eax, dword [ebp - 0x18]
call fcn.10046e54
ret 4