Function at 0x4314cf
Capabilities:
Get comspec environment variable
Query environment variable

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x693863
call fcn.006375a8
sub esp, 0x440
lea eax, [ebp - 0x244]
push ebx
push esi
push edi
push 0x104
push eax
push 0
xor bl, bl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
test eax, eax
jne 0x431507
xor al, al
jmp 0x43170a
lea eax, [ebp - 0x244]
mov esi, str.SoftwareMicrosoftWindows_NTCurrentVersionAppCompatFlagsLayers
push eax
push esi
mov edi, reloc.WS2_32.dll_accept
push edi
call fcn.004835ae
test al, al
je 0x431533
lea eax, [ebp - 0x244]
push eax
push esi
push edi
call fcn.004832b3
mov bl, 1
lea eax, [ebp - 0x244]
mov edi, reloc.OLEAUT32.dll_SysReAllocString
push eax
push esi
push edi
call fcn.004835ae
test al, al
je 0x431708
lea eax, [ebp - 0x244]
push eax
push esi
push edi
call fcn.004832b3
lea eax, [ebp - 0x244]
push eax
push esi
push edi
call fcn.004835ae
test al, al
jne 0x431575
mov bl, 1
jmp 0x431708
push 0x104
lea eax, [ebp - 0x44c]
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
test eax, eax
je 0x431708
mov eax, 0x6b7fec
push eax
push eax
lea eax, [ebp - 0x24]
push str._s_is_running_in_Vista_compatibility_mode_which_is_known_to_cause_problems._Please_allow__s_to_fix_this_by_clicking__Yes__in_the_next_dialog.
push eax
call fcn.004638e7
add esp, 0x10
cmp dword [eax + 0x14], 8
jb 0x4315b4
mov eax, dword [eax]
xor ebx, ebx
push ebx
push 0x6bd378
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.004267c2
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp]
push str.REG_DELETE__HKLMSoftwareMicrosoftWindows_NTCurrentVersionAppCompatFlagsLayers___v___s___f
push eax
call fcn.004638e7
add esp, 0xc
push ebx
push ebx
lea eax, [ebp + 0x48]
mov dword [ebp - 4], ebx
push eax
call fcn.0045ea02
mov esi, str..bat
mov byte [ebp - 4], 1
push esi
call fcn.00426a30
pop ecx
push eax
push esi
lea ecx, [ebp + 0x48]
call fcn.0042689e
cmp dword [ebp + 0x5c], 8
mov eax, dword [ebp + 0x48]
jae 0x43161b
lea eax, [ebp + 0x48]
push 0x80
push 7
push eax
call fcn.0045fa00
mov dword [ebp + 0x60], eax
lea eax, [ebp]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0043edf3
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 2
jb 0x431644
mov eax, dword [eax]
push dword [ebp + 0x10]
push eax
push dword [ebp + 0x60]
call fcn.0045fe87
push ebx
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.0040daff
lea eax, [ebp + 0x60]
push eax
call fcn.0045f990
sub esp, 0x18
lea eax, [ebp + 0x18]
lea esi, [ebp + 0x48]
push 6
pop ecx
mov edi, esp
push str.__C__s
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.004638e7
add esp, 0x20
xor eax, eax
mov dword [ebp + 0x44], 7
mov dword [ebp + 0x40], ebx
mov word [ebp + 0x30], ax
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
mov byte [ebp - 4], 4
jae 0x4316a6
lea eax, [ebp + 0x18]
push ebx
push 1
push 1
lea ecx, [ebp + 0x30]
push ecx
push eax
lea eax, [ebp - 0x44c]
push eax
call fcn.00432683
mov bl, al
mov eax, 0x6b8f00
test bl, bl
jne 0x4316cc
mov eax, 0x6bd584
push eax
push str.RemoveCompatibilityModeKey_removal_from_HKLM_returned__s_
call fcn.0040c884
add esp, 8
lea ecx, [ebp + 0x30]
xor esi, esi
push esi
push 1
call fcn.004267c2
push esi
push 1
lea ecx, [ebp + 0x18]
call fcn.004267c2
push esi
push 1
lea ecx, [ebp + 0x48]
call fcn.004267c2
push esi
push 1
lea ecx, [ebp]
call fcn.004267c2
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
lea esp, [ebp + 0x64]
pop ebp
ret