Function at 0x10021f90
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10042b08
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x100c2004]
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 ebx, ecx
mov dword [ebp - 0x14], ebx
mov eax, dword [edx]
lea ecx, [ebp - 0x98]
mov esi, dword [ebp + 0xc]
push str.AppDataPath
push ecx
mov dword [ebp - 0x48], ebx
mov ecx, edx
mov dword [ebp - 0x48], esi
call dword [eax + 4]
push ecx
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0
push ecx
mov ecx, eax
call fcn.100068a0
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 2
call fcn.10003b70
cmp dword [ebp - 0x34], 0
je 0x1002225e
cmp dword [ebp - 0x30], 8
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x2c]
cmovae edx, dword [ebp - 0x44]
call fcn.1000a690
push 0
push 0
push str.ProgramData
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x100220ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x100220ea
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 4
push eax
push 0
push 0
push 0x100443bc
mov dword [ebp - 0x14], 0
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
mov eax, dword [ebp - 0x14]
js 0x100220db
mov esi, eax
lea edx, [esi + 2]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x10022074
mov ecx, dword [ebp - 0x1c]
sub esi, edx
sar esi, 1
xor edi, edi
add ecx, 0xfffffff4
je 0x100220d8
nop dword [eax]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push 0xd
cmovae eax, dword [ebp - 0x2c]
push str._ProgramData_
lea eax, [eax + edi*2]
push eax
call fcn.1003476b
add esp, 0xc
test eax, eax
jne 0x100220c4
push esi
push dword [ebp - 0x14]
push ecx
push edi
lea ecx, [ebp - 0x2c]
call fcn.100250d0
mov eax, esi
jmp 0x100220c9
mov eax, 1
add edi, eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff4
cmp edi, eax
jb 0x10022090
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x48]
mov byte [ebp - 4], 3
test eax, eax
je 0x100220ea
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov byte [ebp - 0x48], 0
lea edx, [ebp - 0x2c]
push dword [ebp - 0x48]
lea ecx, [ebp - 0x60]
call fcn.1001c040
add esp, 4
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 5
push eax
mov edx, esi
lea ecx, [ebp - 0x7c]
call fcn.10009d50
add esp, 4
push ebx
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.10027900
mov ecx, dword [ebp - 0x68]
cmp ecx, 8
jb 0x1002215a
mov edx, dword [ebp - 0x7c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10022150
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022279
push ecx
push edx
call fcn.1002dd79
add esp, 8
mov ecx, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 7
mov word [ebp - 0x7c], ax
cmp ecx, 8
jb 0x100221a8
mov edx, dword [ebp - 0x60]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x1002219e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022279
push ecx
push edx
call fcn.1002dd79
add esp, 8
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 7
mov word [ebp - 0x60], ax
cmp ecx, 8
jb 0x100221f6
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x100221ec
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022279
push ecx
push edx
call fcn.1002dd79
add esp, 8
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ecx, 8
jb 0x10022240
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10022236
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10022279
push ecx
push edx
call fcn.1002dd79
add esp, 8
mov eax, ebx
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.1002db4b
mov esp, ebp
pop ebp
ret
push str.Missing_path_value
lea ecx, [ebp - 0x54]
call fcn.1001c900
push 0x100c0280
lea eax, [ebp - 0x54]
push eax
call fcn.1002f43a
call fcn.10033a4a
int3