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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x181d100c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov ecx, edi
mov dword [ebp - 0x220], edx
call fcn.18007526
mov ebx, dword [0x181d80b4]
test ebx, ebx
je 0x181163a8
and dword [ebp - 0x218], 0
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x220]
mov ecx, ebx
push 0x5000
push esi
call dword [0x181603e8]
call ebx
add esp, 0x10
mov dword [ebp - 0x22c], eax
test eax, eax
js 0x18116391
mov ebx, dword [ebp - 0x218]
test ebx, ebx
je 0x1811638a
push ebx
call fcn.18135300
mov dword [ebp - 0x220], eax
pop ecx
test eax, eax
je 0x1811638a
mov ecx, dword [edi]
mov edx, ebx
sub edx, ecx
sar edx, 1
push eax
mov esi, dword [ecx - 0xc]
mov ecx, edi
mov dword [ebp - 0x224], edx
call fcn.18007592
mov edx, dword [ebp - 0x224]
cmp edx, esi
mov esi, dword [ebp - 0x220]
mov dword [ebp - 0x228], eax
ja 0x1811636d
mov ecx, dword [edi]
lea edx, [eax + edx*2]
mov ebx, dword [ecx - 8]
lea ecx, [esi + esi]
test ecx, ecx
je 0x18116380
test eax, eax
jne 0x18116340
call fcn.1813518f
mov dword [eax], 0x16
call fcn.18135085
jmp 0x18116380
test edx, edx
je 0x1811632e
lea eax, [ebx + ebx]
cmp eax, ecx
jae 0x18116358
call fcn.1813518f
mov dword [eax], 0x22
jmp 0x18116339
push ecx
push edx
push dword [ebp - 0x228]
lfence
call fcn.18130d30
add esp, 0xc
jmp 0x18116380
lfence
mov edx, dword [edi]
mov ecx, eax
push esi
push ebx
mov edx, dword [edx - 8]
call fcn.18007777
pop ecx
pop ecx
push esi
mov ecx, edi
call fcn.18007567
jmp 0x18116391
mov ecx, edi
call fcn.18007526
push dword [ebp - 0x218]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x22c]
jmp 0x1811656f
push 0x10
push 0x1816fc7c
push esi
call fcn.181315b1
add esp, 0xc
test eax, eax
jne 0x18116467
push 0x104
lea eax, [ebp - 0x214]
push eax
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x181163fe
lea eax, [ebp - 0x214]
push eax
call fcn.18135300
pop ecx
push eax
lea eax, [ebp - 0x214]
mov ecx, edi
push eax
call fcn.180075cd
xor eax, eax
jmp 0x1811656f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x18116413
movzx esi, si
or esi, 0x80070000
movzx ecx, byte [0x181d705a]
neg ecx
sbb ecx, ecx
and ecx, 0x181d6f50
je 0x18116460
push 7
pop edx
push 0xfffffffffffffffe
pop eax
push eax
push edx
mov dword [ebp - 0x23c], ecx
mov dword [ebp - 0x238], edx
mov dword [ebp - 0x234], eax
call fcn.18008b3f
push esi
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x23c]
push str._GetKnownFolderSubDirPath_get_env_failed___08x_
push eax
call fcn.18007210
add esp, 0xc
mov eax, esi
jmp 0x1811656f
and dword [ebp - 0x21c], 0
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x220]
push 0x5000
push esi
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
mov dword [ebp - 0x224], eax
test eax, eax
js 0x1811655d
mov ebx, dword [ebp - 0x21c]
test ebx, ebx
je 0x18116556
push ebx
call fcn.18135300
mov dword [ebp - 0x220], eax
pop ecx
test eax, eax
je 0x18116556
mov ecx, dword [edi]
mov edx, ebx
sub edx, ecx
sar edx, 1
push eax
mov esi, dword [ecx - 0xc]
mov ecx, edi
mov dword [ebp - 0x22c], edx
call fcn.18007592
mov edx, dword [ebp - 0x22c]
cmp edx, esi
mov esi, dword [ebp - 0x220]
mov dword [ebp - 0x228], eax
ja 0x18116539
mov ecx, dword [edi]
lea edx, [eax + edx*2]
mov ebx, dword [ecx - 8]
lea ecx, [esi + esi]
test ecx, ecx
je 0x1811654c
test eax, eax
jne 0x1811650c
call fcn.1813518f
mov dword [eax], 0x16
call fcn.18135085
jmp 0x1811654c
test edx, edx
je 0x181164fa
lea eax, [ebx + ebx]
cmp eax, ecx
jae 0x18116524
call fcn.1813518f
mov dword [eax], 0x22
jmp 0x18116505
push ecx
push edx
push dword [ebp - 0x228]
lfence
call fcn.18130d30
add esp, 0xc
jmp 0x1811654c
lfence
mov edx, dword [edi]
mov ecx, eax
push esi
push ebx
mov edx, dword [edx - 8]
call fcn.18007777
pop ecx
pop ecx
push esi
mov ecx, edi
call fcn.18007567
jmp 0x1811655d
mov ecx, edi
call fcn.18007526
push dword [ebp - 0x21c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1811c608
leave
ret