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

Disassembly:
push 0xffffffffffffffff
push 0x47eaa6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push ebp
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x28]
call fcn.00459a40
xor ebp, ebp
lea ecx, [esp + 0x14]
mov dword [esp + 0x9c], ebp
call fcn.00459a40
lea ecx, [esp + 0x34]
mov byte [esp + 0x9c], 1
call fcn.00459a40
mov esi, dword [esp + 0xa4]
mov byte [esp + 0x9c], 2
cmp esi, 0x10000
mov dword [esp + 0xc], ebp
jne 0x430ea1
push str.userenv.dll
lea ecx, [esp + 0x18]
call fcn.00459a70
cmp eax, 1
jne 0x4312e8
push str.GetProfilesDirectoryA
lea ecx, [esp + 0x18]
call fcn.00459b10
cmp eax, ebp
je 0x430e93
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], 0x104
call eax
test eax, eax
je 0x430e93
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x14]
call fcn.00459ac0
jmp 0x4312e8
cmp esi, 0x10002
jne 0x430f03
push str.userenv.dll
lea ecx, [esp + 0x18]
call fcn.00459a70
cmp eax, 1
jne 0x4312e8
push str.GetDefaultUserProfileDirectoryA
lea ecx, [esp + 0x18]
call fcn.00459b10
cmp eax, ebp
je 0x430ef5
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], 0x104
call eax
test eax, eax
je 0x430ef5
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x14]
call fcn.00459ac0
jmp 0x4312e8
cmp esi, 0x10004
jne 0x430f58
mov esi, dword [esp + 0xa8]
push 0x104
push esi
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebp
jle 0x4312e8
lea ecx, [eax + 2]
cmp ecx, 0x104
jge 0x4312e8
cmp byte [eax + esi - 1], 0x5c
je 0x4312e8
mov byte [eax + esi], 0x5c
mov byte [eax + esi + 1], 0
jmp 0x4312e8
cmp esi, 0x10006
jne 0x430f90
mov esi, dword [esp + 0xa8]
push 0x104
push esi
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebp
jle 0x4312e8
lea edx, [eax + 2]
cmp edx, 0x104
jmp 0x430f39
cmp esi, 0x10001
jne 0x43104c
push str.advapi32.dll
lea ecx, [esp + 0x38]
call fcn.00459a70
cmp eax, 1
jne 0x4312e8
push str.OpenProcessToken
lea ecx, [esp + 0x38]
call fcn.00459b10
mov edi, eax
cmp edi, ebp
je 0x43103e
push str.userenv.dll
lea ecx, [esp + 0x18]
call fcn.00459a70
cmp eax, 1
jne 0x43103e
push str.GetUserProfileDirectoryA
lea ecx, [esp + 0x18]
call fcn.00459b10
mov esi, eax
cmp esi, ebp
je 0x431035
lea eax, [esp + 0x30]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
je 0x431035
mov edx, dword [esp + 0xa8]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x104
push ecx
push edx
push eax
call esi
test eax, eax
je 0x43102a
mov dword [esp + 0xc], 1
mov ecx, dword [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
call fcn.00459ac0
lea ecx, [esp + 0x34]
call fcn.00459ac0
jmp 0x4312e8
cmp esi, 0x10003
jne 0x4311b0
lea ecx, [esp + 0x1c]
call fcn.0045bda0
lea ecx, [esp + 0x68]
mov byte [esp + 0x9c], 3
call fcn.0043a8f0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9c], 4
call fcn.0043a8f0
push ebp
lea edx, [esp + 0x6c]
push ebp
push edx
push 0x494cc8
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
mov byte [esp + 0xb4], 5
call fcn.00457b70
test eax, eax
jne 0x4310cd
push ebp
lea eax, [esp + 0x6c]
push ebp
push eax
push str.TEMP
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
call fcn.00457b70
lea ecx, [esp + 0x68]
call fcn.0043baf0
test eax, eax
je 0x431127
lea ecx, [esp + 0x3c]
call fcn.0043bb30
push eax
push ebp
lea ecx, [esp + 0x44]
call fcn.0043baa0
push eax
push ebp
lea ecx, [esp + 0x74]
call fcn.0043baa0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea ecx, [esp + 0x3c]
call fcn.0043acd0
push 0x5c
lea ecx, [esp + 0x40]
call fcn.0043bf30
mov ecx, dword [esp + 0xa8]
push ecx
lea ecx, [esp + 0x40]
call fcn.0043baa0
jmp 0x431170
mov ebp, dword [esp + 0xa8]
push 0x104
push ebp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x431178
push ebp
mov ecx, edi
call fcn.00430d90
mov edi, str.Temp_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9c], 4
call fcn.0043a990
lea ecx, [esp + 0x68]
mov byte [esp + 0x9c], 3
call fcn.0043a990
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9c], 2
call fcn.004574c0
jmp 0x4312e8
cmp esi, 0x10005
jne 0x4311e7
mov esi, dword [esp + 0xa8]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x4311d2
mov byte [esi], 0
push esi
mov ecx, edi
call fcn.00430d90
mov dword [esp + 0xc], 1
jmp 0x4312e8
cmp esi, 0x10007
jne 0x431208
mov esi, dword [esp + 0xa8]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x4311d2
jmp 0x4311cf
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
je 0x431254
lea ecx, [esp + 0x34]
mov byte [esp + 0x9c], 1
call fcn.00459a50
lea ecx, [esp + 0x14]
mov byte [esp + 0x9c], 0
call fcn.00459a50
lea ecx, [esp + 0x28]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00459a50
xor eax, eax
jmp 0x431322
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], ebp
push ecx
push esi
push ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edi, dword [esp + 0xa8]
cmp eax, ebp
jl 0x43128a
mov edx, dword [esp + 0x20]
push edi
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x43128a
mov dword [esp + 0xc], 1
jmp 0x4312cb
push str.shfolder.dll
lea ecx, [esp + 0x2c]
call fcn.00459a70
cmp eax, 1
jne 0x4312cb
push str.SHGetFolderPathA
lea ecx, [esp + 0x2c]
call fcn.00459b10
cmp eax, ebp
je 0x4312c2
push edi
push ebp
push ebp
push esi
push ebp
call eax
cmp eax, ebp
jne 0x4312c2
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x28]
call fcn.00459ac0
mov ecx, dword [esp + 0x20]
cmp ecx, ebp
je 0x4312de
mov eax, dword [esp + 0x24]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [esp + 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea ecx, [esp + 0x34]
mov byte [esp + 0x9c], 1
call fcn.00459a50
lea ecx, [esp + 0x14]
mov byte [esp + 0x9c], 0
call fcn.00459a50
lea ecx, [esp + 0x28]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00459a50
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x94
ret 8