Function at 0x40164e
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x854
mov eax, dword [0x417004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x384
lea eax, [ebp - 0x830]
mov ebx, ecx
push eax
xor eax, eax
mov dword [ebp - 0x838], ebx
push eax
mov dword [ebp - 0x840], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebx + 0x90]
mov edi, eax
push ecx
mov edx, edi
lea ecx, [ebp - 0x830]
call fcn.0040117b
pop ecx
lea esi, [edi + edi]
mov ecx, edi
lea eax, [ebp - 0x830]
push 0x5c
add eax, esi
pop edx
sub eax, 2
mov dword [ebp - 0x83c], ecx
dec ecx
sub esi, 2
cmp word [eax], dx
jne 0x4016ae
mov dword [ebp - 0x844], eax
lea eax, [ebp - 0x830]
push ecx
mov dword [ebp - 0x834], ecx
mov ecx, ebx
push eax
call fcn.00402680
lea edx, [ebp - 0x82e]
add edx, esi
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x840]
jne 0x4016e8
sub ecx, esi
lea esi, [ebx + 0x60]
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.00402680
mov edx, str.Au.Editor.exe
mov ecx, esi
call fcn.00401245
test al, al
je 0x40171b
mov al, 1
jmp 0x401729
mov edx, str.Au.Task.exe
mov ecx, esi
call fcn.00401245
add al, al
mov byte [ebx + 0xa9], al
cmp byte [0x417880], 0
je 0x401765
mov edx, dword [ebp - 0x83c]
lea esi, [ebx + 0x78]
push esi
lea ecx, [ebp - 0x830]
call fcn.0040117b
mov edi, 0x417880
mov edx, edi
pop ecx
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401758
sub edx, ecx
push edx
push edi
jmp 0x40179d
cmp word [ebp + edi*2 - 0x83c], 0x33
jne 0x40177f
cmp word [ebp + edi*2 - 0x83a], 0x32
jne 0x40177f
push 6
jmp 0x401781
push 4
pop eax
sub edi, eax
lea esi, [ebx + 0x78]
push esi
mov edx, edi
lea ecx, [ebp - 0x830]
call fcn.0040117b
pop ecx
push 4
push str..dll
mov ecx, esi
call fcn.004027ac
xor eax, eax
lea edi, [ebp - 0x830]
mov byte [ebx + 0xa8], al
mov esi, str.coreclr.dll
mov eax, dword [ebp - 0x834]
push 6
pop ecx
lea edi, [edi + eax*2]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x830]
push eax
movsw word es:[edi], word [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call edi
shr eax, 4
not al
test al, 1
jne 0x401b0a
mov ecx, dword [ebp - 0x844]
mov edx, str.dotnet32coreclr.dll
movzx eax, word [edx]
lea edx, [edx + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4017ee
lea eax, [ebp - 0x830]
push eax
call edi
shr eax, 4
not al
test al, 1
jne 0x401b0a
cmp byte [ebx + 0xa9], 0
jne 0x4018bb
lea eax, [ebp - 0x830]
push eax
push 0x3e8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [eax - 0x17]
cmp ecx, 0x39e
ja 0x4018bb
lea ebx, [ebp + eax*2 - 0x856]
push str.Roslyn.exeProgram
push ebx
call fcn.0040695a
pop ecx
pop ecx
test eax, eax
jne 0x4018b5
push 6
pop ecx
mov esi, str.coreclr.dll
lea eax, [ebp - 0x830]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call edi
shr eax, 4
not al
test al, 1
jne 0x401b04
mov ecx, str.dotnet32coreclr.dll
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ebx], ax
lea ebx, [ebx + 2]
test ax, ax
jne 0x401886
lea eax, [ebp - 0x830]
push eax
call edi
mov ebx, dword [ebp - 0x838]
shr eax, 4
not al
test al, 1
jne 0x401b0a
jmp 0x4018bb
mov ebx, dword [ebp - 0x838]
xor edx, edx
mov esi, edx
mov dword [ebp - 0x838], edx
test esi, esi
jne 0x40191e
lea eax, [ebp - 0x83c]
mov dword [ebp - 0x83c], edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x4018f3
cmp dword [ebp - 0x83c], esi
je 0x4018f3
mov cl, 1
jmp 0x4018f7
xor eax, eax
mov cl, al
push 0x3e8
lea eax, [ebp - 0x830]
test cl, cl
push eax
mov edx, str.DOTNET_ROOT
mov eax, str.DOTNET_ROOT_x86_
cmove eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x401a11
cmp esi, 1
jne 0x4019d9
push 0x16
pop ecx
push 0x38
pop eax
push 0x36
mov esi, str.SOFTWAREdotnetSetupInstalledVersionsx64
lea edi, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 0xe], ax
pop eax
mov word [ebp - 0xc], ax
lea eax, [ebp - 0x840]
push eax
push 0x20219
push edx
lea eax, [ebp - 0x60]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40197c
mov esi, dword [ebp - 0x838]
xor edx, edx
inc esi
mov dword [ebp - 0x834], edx
mov dword [ebp - 0x838], esi
jmp 0x4018c5
lea eax, [ebp - 0x834]
mov dword [ebp - 0x834], 0x3e8
push eax
lea eax, [ebp - 0x830]
push eax
xor eax, eax
push eax
push eax
push str.InstallLocation
push dword [ebp - 0x840]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4019b1
xor eax, eax
jmp 0x4019b9
mov eax, dword [ebp - 0x834]
shr eax, 1
push dword [ebp - 0x840]
mov dword [ebp - 0x834], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x834]
mov esi, dword [ebp - 0x838]
jmp 0x401a0c
push 0x3e8
lea eax, [ebp - 0x830]
push eax
push str._ProgramFiles_dotnet
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [ebp - 0x830], 0x25
mov dword [ebp - 0x834], eax
jne 0x401a08
xor eax, eax
mov dword [ebp - 0x834], eax
test esi, esi
jle 0x401a17
test eax, eax
je 0x401a17
dec eax
mov dword [ebp - 0x834], eax
cmp eax, 1
jbe 0x401aed
push 0x5c
pop ecx
cmp word [ebp + eax*2 - 0x832], cx
jne 0x401a34
dec eax
mov dword [ebp - 0x834], eax
add eax, 0xfffffffe
cmp eax, 0x381
ja 0x401aed
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401aed
test al, 0x10
je 0x401aed
mov edx, dword [ebp - 0x834]
lea edi, [ebx + 0x18]
xor eax, eax
lea ecx, [ebp - 0x830]
push eax
lea eax, [ebp - 0x854]
push eax
push edi
call fcn.00401292
add esp, 0xc
test al, al
je 0x401aed
mov edx, dword [ebp - 0x834]
lea eax, [ebp - 0x854]
push 1
push eax
lea eax, [ebx + 0x30]
push eax
lea ecx, [ebp - 0x830]
call fcn.00401292
add esp, 0xc
test al, al
je 0x401aed
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x401ab5
mov edx, dword [edi]
push ecx
push str.coreclr.dll
push dword [edi + 0x10]
lea esi, [ebx + 0x48]
mov ecx, esi
call fcn.004010ee
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x401ad3
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 4
not al
test al, 1
jne 0x401b6d
mov esi, dword [ebp - 0x838]
inc esi
mov dword [ebp - 0x838], esi
cmp esi, 2
jg 0x401b00
xor edx, edx
jmp 0x4018c5
xor al, al
jmp 0x401b6f
mov ebx, dword [ebp - 0x838]
lea ecx, [ebp - 0x830]
mov byte [ebx + 0xa8], 1
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x401b1c
sub ecx, edx
lea eax, [ebp - 0x830]
sar ecx, 1
push ecx
push eax
lea ecx, [ebx + 0x48]
call fcn.00402680
mov eax, dword [ebx + 0x58]
lea esi, [ebx + 0x18]
sub eax, 0xc
mov ecx, esi
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00402680
lea ecx, [ebx + 0x30]
cmp ecx, esi
je 0x401b6d
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x401b64
mov eax, dword [esi]
push dword [esi + 0x10]
push eax
call fcn.00402680
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402da8
leave
ret