Function at 0x1400015b0
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 0x140001645
mov rdx, rbx
lea rcx, str.locate_pythons_for_key:_unable_to_open_PythonCore_key_in__ls_n
call fcn.1400012c0
jmp 0x140001bf8
mov qword [rsp + 0x9a8], r13
lea rcx, [0x14006b8a0]
mov qword [rsp + 0x950], r15
xor r13d, r13d
imul r15, qword [0x14006b898], 0x424
add r15, rcx
mov ecx, r13d
cmp qword [0x14006b898], 0x64
mov dword [rsp + 0x54], ecx
jae 0x140001bdd
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 0x140001b96
lea r9d, [rax + 7]
mov rcx, r15
lea r8, [rbp - 0x80]
lea edx, [rax + 8]
call fcn.14002e8e0
mov edx, 0x2d
mov rcx, r15
call fcn.140004dc0
test rax, rax
je 0x1400016e9
mov rdx, r13
lea r8, [0x14005f898]
movzx ecx, word [rax + rdx*2]
inc rdx
cmp cx, word [r8 + rdx*2 - 2]
jne 0x1400016e9
cmp rdx, 4
jne 0x1400016d0
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 0x140001779
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 0x140001b7c
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.WindowedExecutablePath
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400017c3
cmp dword [rsp + 0x44], 1
jne 0x1400017c3
cmp dword [rsp + 0x40], eax
jne 0x14000184f
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 0x14000184f
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 0x140001b77
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x44], 1
jne 0x140001b74
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 0x14000188a
dec r8d
mov dword [rsp + 0x40], r8d
cmp qword [0x140069a80], 0
lea r12, [0x140069a80]
je 0x140001b6f
xor ebx, ebx
test r13, r13
je 0x1400018dd
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.pythonw.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 0x140001939
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 0x140001b4b
test al, 0x10
je 0x140001954
mov r8d, eax
lea rcx, str.locate_pythons_for_key:__ls_is_a_directory_n
mov rdx, rsi
call fcn.1400012c0
jmp 0x140001b4b
xor eax, eax
lea rbx, [0x14006b8a0]
cmp qword [0x14006b898], rax
mov edi, eax
jbe 0x140001993
nop dword [rax + rax]
lea rdx, [rbx + 0x14]
mov rcx, rsi
call fcn.14002c1cc
test eax, eax
je 0x14000199e
inc rdi
add rbx, 0x424
cmp rdi, qword [0x14006b898]
jb 0x140001970
test r14d, r14d
je 0x1400019b7
mov dword [rsi - 4], r14d
jmp 0x140001a0c
test rbx, rbx
je 0x140001993
mov rdx, rsi
lea rcx, str.locate_pythons_for_key:__ls:_already_found_n
call fcn.1400012c0
jmp 0x140001b49
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
jne 0x1400019e8
mov rdx, rsi
lea rcx, str.Failure_getting_binary_type:__ls_n
call fcn.1400012c0
cmp dword [rsi - 4], 0
jne 0x140001a0c
mov r8d, dword [rsp + 0x48]
jmp 0x140001b3a
mov r8d, dword [rsp + 0x48]
cmp r8d, 6
jne 0x1400019fc
mov dword [rsi - 4], 0x40
jmp 0x140001a0c
test r8d, r8d
jne 0x140001b35
mov dword [rsi - 4], 0x20
cmp dword [rbp + 0x8b0], 0
je 0x140001a3c
mov edx, 0x5c
mov rcx, rsi
call fcn.140004dc0
test rax, rax
je 0x140001a3c
lea r8, [rax + 2]
mov edx, 0x104
lea rcx, [rsi + 0x208]
call fcn.14002d050
mov edx, 0x20
mov rcx, rsi
call fcn.1400048b0
test rax, rax
je 0x140001a9c
cmp word [rsi + 0x208], 0
jne 0x140001a6c
mov r8, rsi
lea rcx, [rsi + 0x208]
mov edx, 0x104
call fcn.14002d050
mov rbx, 0xffffffffffffffff
cmp word [rsi + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x140001a73
lea r8, [rbx + rbx]
mov rdx, rsi
lea rcx, [rsi + 2]
call fcn.14000fa40
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, [0x14006b8a0]
xor eax, eax
cmp qword [0x14006b898], rax
mov edi, eax
jbe 0x140001aef
cmp r14d, dword [rbx + 0x10]
jne 0x140001adc
mov rdx, rbx
mov rcx, r15
call fcn.14002c1cc
test eax, eax
je 0x140001b1b
inc rdi
add rbx, 0x424
cmp rdi, qword [0x14006b898]
jb 0x140001ac7
mov rax, qword [0x14006b898]
add r15, 0x424
inc rax
add rsi, 0x424
mov qword [0x14006b898], rax
cmp rax, 0x64
jae 0x140001b60
mov r14d, dword [rsp + 0x4c]
jmp 0x140001b49
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 0x140001b49
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 0x140001b60
mov r8d, dword [rsp + 0x40]
jmp 0x1400018a1
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 [0x14006b898], 0x64
mov dword [rsp + 0x54], ecx
jb 0x140001682
jmp 0x140001bdd
cmp eax, 0x103
je 0x140001bdd
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.1400035b0
add rsp, 0x958
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret