Function at 0x10011220
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002f0cc
mov eax, dword fs:[0]
push eax
sub esp, 0x660
mov eax, dword [0x1003dd60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [0x1003f360]
mov dword [ebp - 0x63c], eax
mov eax, dword [edx + 0xc]
xor ebx, ebx
mov ecx, 0x1003f360
mov dword [ebp - 0x638], ebx
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x648], esi
push 0x206
lea ecx, [ebp - 0x626]
push ebx
push ecx
mov dword [ebp - 4], ebx
mov word [ebp - 0x628], bx
call fcn.1001ade0
add esp, 0xc
lea edx, [ebp - 0x634]
push edx
push 1
push 0xc
mov dword [ebp - 0x634], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov eax, dword [ebp - 0x634]
cmp eax, ebx
je 0x10011397
lea ecx, [ebp - 0x628]
push ecx
push ebx
push eax
push 0x28
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov eax, dword [ebp - 0x634]
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea edx, [ebp - 0x62c]
push edx
push ebx
push ebx
push 1
push eax
mov dword [ebp - 0x62c], ebx
call edi
mov eax, dword [ebp - 0x62c]
cmp eax, ebx
je 0x1001137e
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x1001137c
mov edx, dword [ebp - 0x62c]
mov eax, dword [ebp - 0x634]
lea ecx, [ebp - 0x62c]
push ecx
push edx
push esi
push 1
push eax
call edi
test eax, eax
je 0x10011370
mov edx, dword [esi]
lea ecx, [ebp - 0x630]
push ecx
push edx
mov dword [ebp - 0x630], 0
call sub.ADVAPI32.dll_ConvertSidToStringSidW
mov eax, dword [ebp - 0x630]
test eax, eax
je 0x10011370
push eax
lea ecx, [ebp - 0x648]
call fcn.100056df
mov eax, dword [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
mov ecx, dword [ebp - 0x634]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x648]
mov dword [ebp - 0x634], ebx
mov edx, dword [0x1003f360]
mov eax, dword [edx + 0xc]
mov ecx, 0x1003f360
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x62c], edi
cmp word [ebp - 0x628], bx
mov byte [ebp - 4], 1
je 0x10011547
cmp dword [esi - 0xc], ebx
je 0x10011547
mov edx, dword [0x1003f360]
mov eax, dword [edx + 0xc]
mov ecx, 0x1003f360
call eax
add eax, 0x10
mov dword [ebp - 0x644], eax
push esi
lea ecx, [ebp - 0x644]
push str._sEnvironment
push ecx
mov byte [ebp - 4], 2
call fcn.1000bbf1
add esp, 0xc
mov dword [ebp - 0x630], ebx
mov edx, dword [ebp - 0x644]
push 0x20019
push edx
push SysStringLen
lea ecx, [ebp - 0x630]
mov byte [ebp - 4], 3
call fcn.100011b4
cmp eax, ebx
jne 0x100114b4
push 0x40e
lea eax, [ebp - 0x41e]
push ebx
push eax
mov word [ebp - 0x420], bx
call fcn.1001ade0
add esp, 0xc
lea ecx, [ebp - 0x640]
push ecx
lea edx, [ebp - 0x420]
push edx
mov esi, 0x208
push 0x100345f0
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x640], esi
call fcn.10005e27
cmp word [ebp - 0x420], bx
jne 0x1001149c
lea eax, [ebp - 0x640]
push eax
lea ecx, [ebp - 0x420]
push ecx
push str.TEMP
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x640], esi
call fcn.10005e27
lea edx, [ebp - 0x420]
push edx
lea ecx, [ebp - 0x62c]
call fcn.100056df
mov edi, dword [ebp - 0x62c]
mov esi, dword [edi - 0xc]
cmp esi, ebx
je 0x10011510
xor dl, dl
xor eax, eax
cmp esi, ebx
jle 0x100114f3
test dl, dl
je 0x100114e0
movzx ecx, word [edi + eax*2]
cmp cx, 0x61
jb 0x100114e0
cmp cx, 0x7a
ja 0x100114e0
add ecx, 0xffffffe0
mov word [edi + eax*2], cx
jmp 0x100114ec
cmp word [edi + eax*2], 0x25
jne 0x100114ec
test dl, dl
sete dl
add eax, 1
cmp eax, esi
jl 0x100114c3
lea eax, [ebp - 0x628]
push eax
push str._USERPROFILE_
lea ecx, [ebp - 0x62c]
call fcn.1000b951
mov edi, dword [ebp - 0x62c]
mov eax, dword [ebp - 0x630]
cmp eax, ebx
je 0x10011521
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x644]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10011547
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.100016ac
test al, al
je 0x10011570
mov ecx, dword [ebp - 0x634]
push ecx
call fcn.1000fca0
add esp, 4
test eax, eax
je 0x10011570
mov eax, dword [edi - 0xc]
mov ecx, 1
lea esi, [eax + 4]
jmp 0x10011577
mov eax, dword [edi - 0xc]
xor ecx, ecx
mov esi, eax
cmp eax, ebx
jne 0x10011597
mov edx, dword [ebp - 0x63c]
mov eax, dword [ebp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x638], eax
jmp 0x100116cb
cmp dword [ebp - 0x63c], ebx
je 0x100116c3
mov ebx, dword [ebp + 8]
cmp esi, ebx
jae 0x100116c3
test ecx, ecx
je 0x100116ad
push 0x40e
lea ecx, [ebp - 0x41e]
push 0
push ecx
mov word [ebp - 0x420], 0
call fcn.1001ade0
push 0xffffffffffffffff
push edi
lea edx, [ebp - 0x420]
push 0x208
push edx
call fcn.1001b06a
add esp, 0x1c
push 0x100345c0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov esi, eax
test esi, esi
je 0x10011650
lea ecx, [ebp - 0x420]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, eax
test esi, esi
je 0x10011650
lea ecx, [ebp - 0x66c]
call fcn.100021d1
mov eax, dword [ebp - 0x654]
neg eax
sbb eax, eax
lea edx, [ebp - 0x658]
and eax, edx
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [ebp - 0x66c]
mov esi, eax
call fcn.10001431
test esi, esi
jne 0x10011661
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x10011661
test esi, esi
je 0x10011697
mov esi, dword [ebp - 0x63c]
push 0xffffffffffffffff
lea ecx, [ebp - 0x420]
push ecx
push ebx
push esi
call fcn.1001b06a
mov eax, esi
add esp, 0x10
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10011680
sub eax, edx
sar eax, 1
mov dword [ebp - 0x638], eax
jmp 0x100116cb
mov edx, dword [ebp - 0x63c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x638], eax
jmp 0x100116cb
mov eax, dword [ebp - 0x63c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0x638], esi
jmp 0x100116cb
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100116eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x648]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10011714
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x638]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001b05b
mov esp, ebp
pop ebp
ret