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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ca8cb
mov eax, dword fs:[0]
push eax
mov eax, 0x1688
call fcn.0055b970
mov eax, dword [0x6385e0]
xor eax, ebp
mov dword [ebp - 0x18], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
call fcn.00404b70
test eax, eax
jne 0x4aa960
jmp 0x4aac7c
push 0x5feb54
mov ecx, dword [ebp + 8]
call fcn.004b6880
movzx eax, al
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4aa9ba
push 1
push 0x5feb54
mov ecx, dword [ebp + 8]
call fcn.004b5060
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4aa9b5
mov ecx, dword [ebp + 8]
call fcn.00404b70
sub eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004b5a90
push 1
push 0
mov ecx, dword [ebp + 8]
call fcn.004b5a90
jmp 0x4aaa81
push 0
push str._globalroot
mov ecx, dword [ebp + 8]
call fcn.004b68a0
movzx edx, al
test edx, edx
je 0x4aa9e1
push 0xe
push 0
mov ecx, dword [ebp + 8]
call fcn.004b5a90
jmp 0x4aaa81
push 0x604bf0
mov ecx, dword [ebp + 8]
call fcn.004b6880
movzx eax, al
test eax, eax
je 0x4aaa03
push 4
push 0
mov ecx, dword [ebp + 8]
call fcn.004b5a90
jmp 0x4aaa81
mov ecx, dword [ebp + 8]
push ecx
call fcn.004134a0
add esp, 4
movzx edx, al
test edx, edx
jne 0x4aaa1c
mov byte [ebp - 0x11], 0
jmp 0x4aaa4e
push 0x608a84
mov ecx, dword [ebp + 8]
call fcn.004b4fc0
test eax, eax
jle 0x4aaa33
mov byte [ebp - 0x11], 0
jmp 0x4aaa4e
push 0x60a6d0
mov ecx, dword [ebp + 8]
call fcn.004b4fc0
test eax, eax
jle 0x4aaa4a
mov byte [ebp - 0x11], 0
jmp 0x4aaa4e
mov byte [ebp - 0x11], 1
movzx eax, byte [ebp - 0x11]
test eax, eax
jne 0x4aaa81
push 0x20
mov ecx, dword [ebp + 8]
call fcn.004b4e90
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4aaa81
mov ecx, dword [ebp + 8]
call fcn.00404b70
sub eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004b5a90
mov ecx, dword [ebp + 8]
call fcn.00404b70
test eax, eax
jne 0x4aaa92
jmp 0x4aac7c
push 0
push str.system32_
mov ecx, dword [ebp + 8]
call fcn.004b68a0
movzx edx, al
test edx, edx
je 0x4aaae0
push 0x104
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4aaadb
push 8
push 0
mov ecx, dword [ebp + 8]
call fcn.004b5a90
lea ecx, [ebp - 0x224]
push ecx
push 0
mov ecx, dword [ebp + 8]
call fcn.004b54e0
jmp 0x4aab67
push 0
push str.SystemRoot_
mov ecx, dword [ebp + 8]
call fcn.004b68a0
movzx edx, al
test edx, edx
je 0x4aab2b
push 0x104
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x4aab29
push 0xb
push 0
mov ecx, dword [ebp + 8]
call fcn.004b5a90
lea ecx, [ebp - 0x42c]
push ecx
push 0
mov ecx, dword [ebp + 8]
call fcn.004b54e0
jmp 0x4aab67
push 0
mov ecx, dword [ebp + 8]
call fcn.004b3df0
movzx edx, ax
cmp edx, 0x25
jne 0x4aab67
push 0x400
lea eax, [ebp - 0xc2c]
push eax
mov ecx, dword [ebp + 8]
call fcn.004553f0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0xc2c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004b38f0
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.004b5770
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4aac3a
push 0x2e
mov ecx, dword [ebp + 8]
call fcn.004b5770
mov dword [ebp - 0xc30], eax
mov edx, dword [ebp - 0xc30]
cmp edx, dword [ebp - 0x10]
jge 0x4aac3a
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0xc3c]
call fcn.004b34d0
mov dword [ebp - 4], 0
push 0x608adc
lea ecx, [ebp - 0xc3c]
call fcn.004b3b40
lea ecx, [ebp - 0xe94]
push ecx
lea ecx, [ebp - 0xc3c]
call fcn.004553f0
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0xc40], eax
cmp dword [ebp - 0xc40], 0xffffffff
je 0x4aac28
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp + 8]
call fcn.00404b70
sub eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
call fcn.004b5a90
lea ecx, [ebp - 0xe68]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004b3b40
mov edx, dword [ebp - 0xc40]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc3c]
call fcn.004b3860
push 0x604560
mov ecx, dword [ebp + 8]
call fcn.004b45e0
movzx eax, al
test eax, eax
je 0x4aac7c
push 0x400
lea ecx, [ebp - 0x1694]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004553f0
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x4aac7c
lea edx, [ebp - 0x1694]
push edx
mov ecx, dword [ebp + 8]
call fcn.004b38f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0054d4f5
mov esp, ebp
pop ebp
ret