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

Disassembly:
push 0xffffffffffffffff
push 0x472e56
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.00428c00
xor ebp, ebp
lea ecx, [esp + 0x14]
mov dword [esp + 0x9c], ebp
call fcn.00428c00
lea ecx, [esp + 0x34]
mov byte [esp + 0x9c], 1
call fcn.00428c00
mov esi, dword [esp + 0xa4]
mov byte [esp + 0x9c], 2
cmp esi, 0x10000
mov dword [esp + 0xc], ebp
jne 0x422761
push 0x48a108
lea ecx, [esp + 0x18]
call fcn.00428c30
cmp eax, 1
jne 0x422b8f
push 0x48a710
lea ecx, [esp + 0x18]
call fcn.00428cd0
cmp eax, ebp
je 0x422753
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], 0x104
call eax
test eax, eax
je 0x422753
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x14]
call fcn.00428c80
jmp 0x422b8f
cmp esi, 0x10002
jne 0x4227c3
push 0x48a108
lea ecx, [esp + 0x18]
call fcn.00428c30
cmp eax, 1
jne 0x422b8f
push 0x48a6f0
lea ecx, [esp + 0x18]
call fcn.00428cd0
cmp eax, ebp
je 0x4227b5
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], 0x104
call eax
test eax, eax
je 0x4227b5
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x14]
call fcn.00428c80
jmp 0x422b8f
cmp esi, 0x10004
jne 0x42281b
mov esi, dword [esp + 0xa8]
push 0x104
push esi
mov word [esi], bp
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, ebp
jle 0x422b8f
lea ecx, [eax + 2]
cmp ecx, 0x104
jge 0x422b8f
cmp word [esi + eax*2 - 2], 0x5c
je 0x422b8f
mov word [esi + eax*2], 0x5c
mov word [esi + eax*2 + 2], bp
jmp 0x422b8f
cmp esi, 0x10006
jne 0x422853
mov esi, dword [esp + 0xa8]
push 0x104
push esi
mov word [esi], bp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, ebp
jle 0x422b8f
lea edx, [eax + 2]
cmp edx, 0x104
jmp 0x4227f9
cmp esi, 0x10001
jne 0x42290f
push 0x48a6d4
lea ecx, [esp + 0x38]
call fcn.00428c30
cmp eax, 1
jne 0x422b8f
push 0x48a6c0
lea ecx, [esp + 0x38]
call fcn.00428cd0
mov edi, eax
cmp edi, ebp
je 0x422901
push 0x48a108
lea ecx, [esp + 0x18]
call fcn.00428c30
cmp eax, 1
jne 0x422901
push 0x48a6a4
lea ecx, [esp + 0x18]
call fcn.00428cd0
mov esi, eax
cmp esi, ebp
je 0x4228f8
lea eax, [esp + 0x30]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
je 0x4228f8
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 0x4228ed
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.00428c80
lea ecx, [esp + 0x34]
call fcn.00428c80
jmp 0x422b8f
cmp esi, 0x10003
jne 0x422a57
lea ecx, [esp + 0x1c]
call fcn.0043b460
lea ecx, [esp + 0x68]
mov byte [esp + 0x9c], 3
call fcn.004152e0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9c], 4
call fcn.004152e0
push ebp
lea edx, [esp + 0x6c]
push ebp
push edx
push 0x48a69c
push 0x48a620
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
mov byte [esp + 0xb4], 5
call fcn.0043b2d0
test eax, eax
jne 0x422990
push ebp
lea eax, [esp + 0x6c]
push ebp
push eax
push 0x48a614
push 0x48a620
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
call fcn.0043b2d0
lea ecx, [esp + 0x68]
call fcn.00416550
test eax, eax
je 0x4229ea
lea ecx, [esp + 0x3c]
call fcn.00416590
push eax
push ebp
lea ecx, [esp + 0x44]
call fcn.00416510
push eax
push ebp
lea ecx, [esp + 0x74]
call fcn.00416510
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [esp + 0x3c]
call fcn.00415700
push 0x5c
lea ecx, [esp + 0x40]
call fcn.00416b90
mov ecx, dword [esp + 0xa8]
push ecx
lea ecx, [esp + 0x40]
call fcn.00416510
jmp 0x422a17
mov esi, dword [esp + 0xa8]
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jbe 0x422a1f
push esi
mov ecx, edi
call fcn.00422670
push 0x48a608
push esi
call fcn.004621bc
add esp, 8
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x9c], 4
call fcn.00415380
lea ecx, [esp + 0x68]
mov byte [esp + 0x9c], 3
call fcn.00415380
lea ecx, [esp + 0x1c]
mov byte [esp + 0x9c], 2
call fcn.0043a750
jmp 0x422b8f
cmp esi, 0x10005
jne 0x422a8e
mov esi, dword [esp + 0xa8]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x422a79
mov word [esi], bp
push esi
mov ecx, edi
call fcn.00422670
mov dword [esp + 0xc], 1
jmp 0x422b8f
cmp esi, 0x10007
jne 0x422aaf
mov esi, dword [esp + 0xa8]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x422a79
jmp 0x422a76
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
je 0x422afb
lea ecx, [esp + 0x34]
mov byte [esp + 0x9c], 1
call fcn.00428c10
lea ecx, [esp + 0x14]
mov byte [esp + 0x9c], 0
call fcn.00428c10
lea ecx, [esp + 0x28]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00428c10
xor eax, eax
jmp 0x422bc9
lea eax, [esp + 0x20]
mov dword [esp + 0x20], ebp
push eax
push esi
push ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edi, dword [esp + 0xa8]
cmp eax, ebp
jl 0x422b31
mov ecx, dword [esp + 0x20]
push edi
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x422b31
mov dword [esp + 0xc], 1
jmp 0x422b72
push 0x48a5ec
lea ecx, [esp + 0x2c]
call fcn.00428c30
cmp eax, 1
jne 0x422b72
push 0x48a5d8
lea ecx, [esp + 0x2c]
call fcn.00428cd0
cmp eax, ebp
je 0x422b69
push edi
push ebp
push ebp
push esi
push ebp
call eax
cmp eax, ebp
jne 0x422b69
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x28]
call fcn.00428c80
mov ecx, dword [esp + 0x20]
cmp ecx, ebp
je 0x422b85
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.00428c10
lea ecx, [esp + 0x14]
mov byte [esp + 0x9c], 0
call fcn.00428c10
lea ecx, [esp + 0x28]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00428c10
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