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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x42000c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x220], 0x28
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x21c], 0x2a
mov dword [ebp - 0x218], 0x26
mov dword [ebp - 0x214], 0x24
push esi
push edi
test ebx, ebx
je 0x40753b
mov esi, dword [0x422880]
xor edi, edi
mov dword [ebp - 0x22c], edi
test esi, esi
jne 0x4074f5
push 0x10
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x422880], eax
test eax, eax
je 0x40753b
mov dword [0x42287c], 4
xor eax, eax
push 0x20c
push eax
lea eax, [ebp - 0x210]
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [ebp + edi - 0x220]
lea eax, [ebp - 0x210]
add esp, 0xc
xor ecx, ecx
push ecx
push esi
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x407462
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
cmp esi, 0x28
jne 0x4073b4
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
jmp 0x4073ec
cmp esi, 0x26
jne 0x4073f9
mov eax, dword [0x422880]
push dword [edi + eax - 4]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4073f9
push 0x105
lea eax, [ebp - 0x210]
push eax
push str._ProgramW6432_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea ecx, [ebp - 0x210]
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x407404
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
mov dword [ebp - 0x224], eax
add eax, 2
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, dword [0x422880]
mov dword [edi + esi], eax
test eax, eax
je 0x407468
push dword [ebp - 0x224]
lea ecx, [ebp - 0x210]
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add edi, 4
add esp, 0xc
cmp edi, 0x10
jb 0x40734e
xor edi, edi
jmp 0x4074c4
mov esi, dword [0x422880]
test esi, esi
je 0x40753b
xor eax, eax
mov edi, eax
mov eax, dword [0x42287c]
test eax, eax
je 0x4074ab
xor ebx, ebx
mov ecx, dword [esi + edi*4]
test ecx, ecx
je 0x4074a0
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [0x422880]
mov eax, dword [0x42287c]
inc edi
cmp edi, eax
jb 0x40747f
mov ebx, dword [ebp - 0x228]
push esi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, edi
mov dword [0x422880], esi
test esi, esi
je 0x40753b
mov dword [ebp - 0x220], 0x28
mov dword [ebp - 0x21c], 0x2a
mov dword [ebp - 0x218], 0x26
mov dword [ebp - 0x214], 0x24
jmp 0x40731e
cmp dword [0x42287c], 0
jbe 0x40753b
mov edx, ebx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 0x22c]
jne 0x407503
push dword [esi + edi*4]
sub edx, ecx
mov ecx, ebx
sar edx, 1
call fcn.004068d2
pop ecx
test eax, eax
jne 0x407536
inc edi
cmp edi, dword [0x42287c]
jae 0x40753b
mov esi, dword [0x422880]
jmp 0x4074fe
xor eax, eax
inc eax
jmp 0x40753d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410e60
leave
ret