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

Disassembly:
push 0xffffffffffffffff
push 0x42ddac
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x21c
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x1c], esi
call fcn.00401750
mov eax, dword [0x43c520]
lea ebp, [esi + 0xcc]
mov dword [esp + 0x230], 0
mov dword [ebp], eax
mov ecx, dword [0x43c520]
mov dword [esi + 0xd0], ecx
mov edx, dword [0x43c520]
lea ebx, [esi + 0xd4]
mov dword [ebx], edx
mov eax, dword [0x43c520]
mov dword [esi + 0xd8], eax
push 0x43da34
mov ecx, ebp
mov byte [esp + 0x234], 4
mov dword [esi], 0x43044c
call fcn.004258f7
lea ecx, [esp + 0x20]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40e334
lea edx, [esp + 0x20]
lea ecx, [esp + 0x10]
push edx
call fcn.00425828
push eax
mov ecx, ebp
mov byte [esp + 0x234], 5
call fcn.004258a7
lea ecx, [esp + 0x10]
mov byte [esp + 0x230], 4
call fcn.004257ba
push edi
push 1
push 0x5c
lea ecx, [esp + 0x20]
call fcn.00420410
lea eax, [esp + 0x14]
push 1
push eax
mov ecx, ebp
mov byte [esp + 0x23c], 6
call fcn.0042055f
mov edi, dword [esp + 0x18]
mov eax, dword [eax]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x40e382
test cl, cl
je 0x40e37e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x40e382
add eax, 2
add edi, 2
test cl, cl
jne 0x40e35e
xor eax, eax
jmp 0x40e387
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
lea ecx, [esp + 0x14]
setne byte [esp + 0x13]
call fcn.004257ba
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], 4
call fcn.004257ba
mov al, byte [esp + 0x13]
test al, al
je 0x40e3bc
push 0x43a2d0
mov ecx, ebp
call fcn.00425b4a
lea eax, [esp + 0x128]
push 0x104
push eax
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x40e3eb
lea ecx, [esp + 0x128]
push ecx
lea ecx, [esi + 0xd8]
call fcn.004258f7
lea edx, [esp + 0x14]
mov ecx, esi
push edx
call fcn.00410b80
push eax
lea ecx, [esi + 0xd0]
mov byte [esp + 0x238], 7
call fcn.004258a7
lea ecx, [esp + 0x14]
mov byte [esp + 0x234], 4
call fcn.004257ba
push str.ProgramFilesDir
lea ecx, [esp + 0x18]
call fcn.00425828
push str.SOFTWAREMicrosoftWindowsCurrentVersion
lea ecx, [esp + 0x1c]
mov byte [esp + 0x238], 8
call fcn.00425828
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x24]
push 0x80000002
push edx
mov ecx, esi
mov byte [esp + 0x244], 9
call fcn.004027f0
push eax
mov ecx, ebx
mov byte [esp + 0x238], 0xa
call fcn.004258a7
lea ecx, [esp + 0x1c]
mov byte [esp + 0x234], 9
call fcn.004257ba
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], 8
call fcn.004257ba
lea ecx, [esp + 0x14]
mov byte [esp + 0x234], 4
call fcn.004257ba
mov ecx, ebx
call fcn.00420a95
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x40e4c2
push str.C:Program_Files_
mov ecx, ebx
call fcn.004258f7
push 1
push 0x5c
lea ecx, [esp + 0x1c]
call fcn.00420410
lea ecx, [esp + 0x1c]
push 1
push ecx
mov ecx, ebx
mov byte [esp + 0x23c], 0xb
call fcn.0042055f
mov edi, dword [esp + 0x14]
mov eax, dword [eax]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x40e50f
test cl, cl
je 0x40e50b
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x40e50f
add eax, 2
add edi, 2
test cl, cl
jne 0x40e4eb
xor eax, eax
jmp 0x40e514
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
lea ecx, [esp + 0x1c]
setne byte [esp + 0x13]
call fcn.004257ba
lea ecx, [esp + 0x14]
mov byte [esp + 0x234], 4
call fcn.004257ba
mov al, byte [esp + 0x13]
pop edi
test al, al
je 0x40e54a
push 0x43a2d0
mov ecx, ebx
call fcn.00425b4a
mov ecx, dword [esp + 0x228]
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x228
ret