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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov byte [ebp - 5], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x18d2f5c0
jmp 0x18d2f899
mov eax, dword [0x18d38cb8]
add eax, 0x34
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x10]
lea edx, [ecx + eax + 0x10a]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
shl eax, 1
push eax
call fcn.18d33770
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x18d2f600
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18d2f899
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, dword [ebp - 0x10]
jbe 0x18d2f620
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18d2f899
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push 0x30b96a8f
push 6
push 0x18d34d00
call fcn.18d217f0
add esp, 0xc
push eax
push 0
mov eax, dword [ebp - 4]
push eax
call fcn.18d26ec0
add esp, 0x10
movzx ecx, byte [0x18d38a36]
test ecx, ecx
je 0x18d2f721
push 0
push 0
push 0xf1725e2c
push 0xb
push 0x18d34d08
call fcn.18d217f0
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x18d2f698
jmp 0x18d2f899
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
lea ecx, [eax + edx + 0x12d]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
shl edx, 1
push edx
call fcn.18d33770
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x18d2f6cc
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18d2f899
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
push 0xf1725e2c
push 0xb
push 0x18d34d08
call fcn.18d217f0
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x18d2f6fd
jmp 0x18d2f899
push 0x843cbace
push 0x20
push 0x18d34d14
call fcn.18d217f0
add esp, 0xc
push eax
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x18d2f7e7
push 0xcd299614
push 0xc
push 0x18d34d38
call fcn.18d217f0
add esp, 0xc
mov dword [ebp - 0x24], eax
push 0
push 0
push 0xcd299614
push 0xc
push 0x18d34d38
call fcn.18d217f0
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x18d2f793
push 0xd2d61642
push 7
push 0x18d34d48
call fcn.18d217f0
add esp, 0xc
mov dword [ebp - 0x24], eax
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x18d2f793
jmp 0x18d2f899
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
lea eax, [edx + ecx + 0x12d]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
shl ecx, 1
push ecx
call fcn.18d33770
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x18d2f7c7
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18d2f899
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x18d2f7e7
jmp 0x18d2f899
push 0xb26f8862
push 0x18
push str._aWVW
call fcn.18d217f0
add esp, 0xc
push eax
push 0
mov edx, dword [ebp - 0xc]
push edx
call fcn.18d26ec0
add esp, 0xc
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
push 0x65162757
push 0xa
push 0x18d3487c
call fcn.18d217f0
add esp, 0xc
push eax
call fcn.18d325e0
add esp, 0xc
test eax, eax
setne dl
mov byte [ebp - 5], dl
movzx eax, byte [ebp - 5]
test eax, eax
jne 0x18d2f841
jmp 0x18d2f899
cmp dword [ebp - 0xc], 0
jne 0x18d2f849
jmp 0x18d2f899
cmp dword [ebp - 4], 0
jne 0x18d2f851
jmp 0x18d2f899
mov ecx, dword [ebp - 4]
push ecx
push 0x2a71f758
push 0xa4
push 0x18d34d70
call fcn.18d217f0
add esp, 0xc
push eax
mov edx, dword [ebp - 0xc]
push edx
call fcn.18d26c20
add esp, 0xc
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.18d32850
add esp, 8
test eax, eax
setne dl
mov byte [ebp - 5], dl
xor eax, eax
jne 0x18d2f5a8
mov ecx, dword [ebp - 4]
push ecx
call fcn.18d33970
add esp, 4
mov edx, dword [ebp - 0xc]
push edx
call fcn.18d33970
add esp, 4
mov al, byte [ebp - 5]
mov esp, ebp
pop ebp
ret