Function at 0x471c00
Capabilities:
Get common file path

Disassembly:
sub esp, 0x220
mov eax, dword [0x6eed24]
xor eax, esp
mov dword [esp + 0x21c], eax
push esi
push edi
mov edi, dword [esp + 0x22c]
mov eax, dword [edi]
mov dword [edi + 4], 0
test eax, eax
je 0x471c2f
xor ecx, ecx
mov word [eax], cx
xor eax, eax
mov word [esp + 0x18], ax
mov eax, dword [0x6f5754]
test al, 1
jne 0x471d30
or eax, 1
mov dword [0x6f5754], eax
lea eax, [esp + 8]
push eax
push 1
push 8
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x471c91
lea eax, [esp + 8]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x471c91
xor al, al
mov byte [0x6f5750], al
jmp 0x471d35
push ebx
push ebp
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0x19
push ebp
or ebx, 0xffffffff
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x471d1e
push eax
call fcn.004bad85
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push esi
push 0x19
push ebp
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x471d15
push dword [esi]
mov dword [esp + 0x1c], 0
mov word [esp + 0x20], 0x1000
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
lea edx, [esp + 0x18]
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x471d15
movzx eax, word [eax + 4]
cmp ax, word [edx + 4]
jne 0x471d15
push 0
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov ebx, dword [eax]
push esi
call fcn.004b936c
add esp, 4
cmp ebx, 0x1000
pop ebp
setbe al
pop ebx
mov byte [0x6f5750], al
jmp 0x471d35
mov al, byte [0x6f5750]
test al, al
je 0x471e1f
mov eax, dword [edi]
mov dword [edi + 4], 0
test eax, eax
je 0x471d4f
xor ecx, ecx
mov word [eax], cx
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x471daf
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x471daf
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push 0
push 0
push 0x6582b4
call eax
test eax, eax
js 0x471daf
push 0xffffffffffffffff
push dword [esp + 0xc]
mov ecx, edi
call fcn.00403940
push dword [esp + 8]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push 0xffffffffffffffff
push str.Temp_
mov ecx, edi
call fcn.004031a0
cmp dword [edi + 4], 0
jne 0x471e62
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x471e62
lea esi, [esp + 0x18]
lea ecx, [esi + 2]
jmp 0x471de0
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x471de0
sub esi, ecx
sar esi, 1
cmp esi, 0xf9
jae 0x471e62
lea eax, [esi + 0xb]
mov ecx, edi
push eax
call fcn.00472a70
push esi
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.00403940
push 0xa
push str.TempLow_
mov ecx, edi
call fcn.004031a0
jmp 0x471e62
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.00403940
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x471e62
mov eax, dword [edi]
test eax, eax
jne 0x471e4f
mov eax, 0x649aa0
cmp word [eax + ecx*2 - 2], 0x5c
je 0x471e62
push 1
push 0x5c
mov ecx, edi
call fcn.0040a5a0
mov ecx, dword [esp + 0x224]
xor eax, eax
cmp dword [edi + 4], eax
pop edi
setne al
pop esi
xor ecx, esp
call fcn.004b2558
add esp, 0x220
ret