Function at 0x1400015c0
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
lea rbp, [rsp - 0x858]
sub rsp, 0x958
mov rax, qword [0x140069008]
xor rax, rsp
mov qword [rbp + 0x840], rax
cmp rcx, 0xffffffff80000002
mov dword [rsp + 0x4c], r9d
lea rax, str.HKLM
mov dword [rsp + 0x50], r8d
mov r14d, r9d
mov qword [rsp + 0x60], rdx
mov r12d, r8d
mov qword [rsp + 0x78], rcx
mov r9d, r8d
lea rbx, str.HKCU
cmove rbx, rax
mov rsi, rdx
lea rax, [rsp + 0x68]
mov qword [rsp + 0x70], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdi, rcx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140001655
mov rdx, rbx
lea rcx, str.locate_pythons_for_key:_unable_to_open_PythonCore_key_in__ls_n
call fcn.1400012c0
jmp 0x140001c08
mov qword [rsp + 0x9a8], r13
lea rcx, [0x14006b880]
mov qword [rsp + 0x950], r15
xor r13d, r13d
imul r15, qword [0x14006b878], 0x424
add r15, rcx
mov ecx, r13d
cmp qword [0x14006b878], 0x64
mov dword [rsp + 0x54], ecx
jae 0x140001bed
mov edx, ecx
lea r8, [rbp - 0x80]
mov rcx, qword [rsp + 0x68]
mov r9d, 8
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x140001ba6
lea r9d, [rax + 7]
mov rcx, r15
lea r8, [rbp - 0x80]
lea edx, [rax + 8]
call fcn.14002e600
mov edx, 0x2d
mov rcx, r15
call fcn.140004c00
test rax, rax
je 0x1400016f9
mov rdx, r13
lea r8, [0x14005f838]
movzx ecx, word [rax + rdx*2]
inc rdx
cmp cx, word [r8 + rdx*2 - 2]
jne 0x1400016f9
cmp rdx, 4
jne 0x1400016e0
mov word [rax], r13w
mov edx, 0x58
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rax
lea r9, str._ls_lsInstallPath
lea rcx, [rbp - 0x70]
mov qword [rsp + 0x20], rsi
lea r8, [rdx - 0x59]
call fcn.140001210
lea rax, [rsp + 0x58]
mov r9d, r12d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x70]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140001789
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov qword [rsp + 0x20], rcx
mov r8d, eax
mov ecx, 0x1200
xor edx, edx
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea r9, [rbp + 0x40]
mov rdx, rbx
lea r8, [rbp - 0x70]
lea rcx, str._ls_ls:__ls
call fcn.1400012c0
jmp 0x140001b8c
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rsi, [r15 + 0x14]
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], rsi
xor r8d, r8d
mov dword [rsp + 0x40], 0x207
lea rdx, str.ExecutablePath
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400017d3
cmp dword [rsp + 0x44], 1
jne 0x1400017d3
cmp dword [rsp + 0x40], eax
jne 0x14000185f
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
mov qword [rsp + 0x20], rsi
xor edx, edx
mov dword [rsp + 0x40], 0x207
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r13d, 1
test eax, eax
je 0x14000185f
lea rcx, [rbp + 0x40]
xor r13d, r13d
mov qword [rsp + 0x30], r13
mov r9d, 0x400
mov dword [rsp + 0x28], 0x400
mov r8d, eax
mov qword [rsp + 0x20], rcx
xor edx, edx
mov ecx, 0x1200
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea r9, [rbp + 0x40]
mov rdx, rbx
lea r8, [rbp - 0x70]
lea rcx, str._ls_ls:__ls_n
call fcn.1400012c0
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140001b87
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x44], 1
jne 0x140001b84
mov r8d, dword [rsp + 0x40]
shr r8d, 1
dec r8d
mov dword [rsp + 0x40], r8d
lea eax, [r8 - 1]
cmp word [r15 + rax*2 + 0x14], 0x5c
jne 0x14000189a
dec r8d
mov dword [rsp + 0x40], r8d
cmp qword [0x140069a80], 0
lea r12, [0x140069a80]
je 0x140001b7f
xor ebx, ebx
test r13, r13
je 0x1400018ed
mov eax, r8d
lea r9, str._ls_ls
add rax, 0xa
mov edx, 0x104
sub edx, r8d
mov r8d, edx
lea rcx, [r15 + rax*2]
lea rax, str.python.exe
mov qword [rsp + 0x28], rax
mov rax, qword [r12]
mov qword [rsp + 0x20], rax
call fcn.140001210
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [rsp + 0x48], eax
cmp eax, 0xffffffff
jne 0x140001949
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov qword [rsp + 0x20], rcx
mov r8d, eax
mov ecx, 0x1200
xor edx, edx
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea r8, [rbp + 0x40]
mov rdx, rsi
lea rcx, str.locate_pythons_for_key:__ls:__ls
call fcn.1400012c0
jmp 0x140001b5b
test al, 0x10
je 0x140001964
mov r8d, eax
lea rcx, str.locate_pythons_for_key:__ls_is_a_directory_n
mov rdx, rsi
call fcn.1400012c0
jmp 0x140001b5b
xor eax, eax
lea rbx, [0x14006b880]
cmp qword [0x14006b878], rax
mov edi, eax
jbe 0x1400019a3
nop dword [rax + rax]
lea rdx, [rbx + 0x14]
mov rcx, rsi
call fcn.14002bfbc
test eax, eax
je 0x1400019ae
inc rdi
add rbx, 0x424
cmp rdi, qword [0x14006b878]
jb 0x140001980
test r14d, r14d
je 0x1400019c7
mov dword [rsi - 4], r14d
jmp 0x140001a1c
test rbx, rbx
je 0x1400019a3
mov rdx, rsi
lea rcx, str.locate_pythons_for_key:__ls:_already_found_n
call fcn.1400012c0
jmp 0x140001b59
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
jne 0x1400019f8
mov rdx, rsi
lea rcx, str.Failure_getting_binary_type:__ls_n
call fcn.1400012c0
cmp dword [rsi - 4], 0
jne 0x140001a1c
mov r8d, dword [rsp + 0x48]
jmp 0x140001b4a
mov r8d, dword [rsp + 0x48]
cmp r8d, 6
jne 0x140001a0c
mov dword [rsi - 4], 0x40
jmp 0x140001a1c
test r8d, r8d
jne 0x140001b45
mov dword [rsi - 4], 0x20
cmp dword [rbp + 0x8b0], 0
je 0x140001a4c
mov edx, 0x5c
mov rcx, rsi
call fcn.140004c00
test rax, rax
je 0x140001a4c
lea r8, [rax + 2]
mov edx, 0x104
lea rcx, [rsi + 0x208]
call fcn.14002ce40
mov edx, 0x20
mov rcx, rsi
call fcn.1400046f0
test rax, rax
je 0x140001aac
cmp word [rsi + 0x208], 0
jne 0x140001a7c
mov r8, rsi
lea rcx, [rsi + 0x208]
mov edx, 0x104
call fcn.14002ce40
mov rbx, 0xffffffffffffffff
cmp word [rsi + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x140001a83
lea r8, [rbx + rbx]
mov rdx, rsi
lea rcx, [rsi + 2]
call fcn.14000f830
mov eax, 0x22
mov word [rsi], ax
mov dword [r15 + rbx*2 + 0x16], eax
mov r8d, dword [rsi - 4]
lea rcx, str.locate_pythons_for_key:__ls_is_a__dbit_executable_n
mov rdx, rsi
call fcn.1400012c0
mov r14d, dword [rsi - 4]
lea rbx, [0x14006b880]
xor eax, eax
cmp qword [0x14006b878], rax
mov edi, eax
jbe 0x140001aff
cmp r14d, dword [rbx + 0x10]
jne 0x140001aec
mov rdx, rbx
mov rcx, r15
call fcn.14002bfbc
test eax, eax
je 0x140001b2b
inc rdi
add rbx, 0x424
cmp rdi, qword [0x14006b878]
jb 0x140001ad7
mov rax, qword [0x14006b878]
add r15, 0x424
inc rax
add rsi, 0x424
mov qword [0x14006b878], rax
cmp rax, 0x64
jae 0x140001b70
mov r14d, dword [rsp + 0x4c]
jmp 0x140001b59
mov r8d, dword [rsi - 4]
lea rcx, str.locate_pythons_for_key:__ls__i:_already_found_n
mov rdx, r15
call fcn.1400012c0
mov r14d, dword [rsp + 0x4c]
jmp 0x140001b59
xor eax, eax
mov dword [rsi - 4], eax
mov rdx, rsi
lea rcx, str.locate_pythons_for_key:__ls:_invalid_binary_type:__X_n
call fcn.1400012c0
xor ebx, ebx
add r12, 8
cmp qword [r12], 0
je 0x140001b70
mov r8d, dword [rsp + 0x40]
jmp 0x1400018b1
mov r14d, dword [rsp + 0x4c]
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
mov r12d, dword [rsp + 0x50]
xor r13d, r13d
mov rsi, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x54]
inc ecx
cmp qword [0x14006b878], 0x64
mov dword [rsp + 0x54], ecx
jb 0x140001692
jmp 0x140001bed
cmp eax, 0x103
je 0x140001bed
mov qword [rsp + 0x30], r13
lea rdx, [rbp + 0x40]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov qword [rsp + 0x20], rdx
mov r8d, eax
xor edx, edx
mov ecx, 0x1200
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea r8, [rbp + 0x40]
lea rdx, [rbp - 0x80]
lea rcx, str.Cant_enumerate_registry_key_for_version__ls:__ls_n
call fcn.1400012c0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r15, qword [rsp + 0x950]
mov r13, qword [rsp + 0x9a8]
mov rcx, qword [rbp + 0x840]
xor rcx, rsp
call fcn.140003570
add rsp, 0x958
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret