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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x92c
mov eax, dword [0x47f030]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x918]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x8cc], eax
cmp dword [ebp + 8], 0x80000002
jne 0x4075f9
mov dword [ebp - 0x904], str.HKLM
jmp 0x407603
mov dword [ebp - 0x904], str.HKCU
mov ecx, dword [ebp - 0x904]
mov dword [ebp - 0x8f8], ecx
cmp dword [ebp - 0x8cc], 0
je 0x407631
mov edx, dword [ebp - 0x8f8]
push edx
push str.locate_pythons_for_key:_unable_to_open_PythonCore_key_in__ls_n
call fcn.00408160
add esp, 8
jmp 0x407d92
imul eax, dword [0x47ff3c], 0x424
add eax, 0x480140
mov dword [ebp - 0x8c8], eax
mov dword [ebp - 0x8f4], 0
jmp 0x407661
mov ecx, dword [ebp - 0x8f4]
add ecx, 1
mov dword [ebp - 0x8f4], ecx
cmp dword [0x47ff3c], 0x64
jae 0x407d85
push 8
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x8f4]
push eax
mov ecx, dword [ebp - 0x918]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov dword [ebp - 0x8cc], eax
cmp dword [ebp - 0x8cc], 0
je 0x4076e0
cmp dword [ebp - 0x8cc], 0x103
je 0x4076d6
push 0x400
lea edx, [ebp - 0x8c4]
push edx
mov eax, dword [ebp - 0x8cc]
push eax
call fcn.0040a470
add esp, 0xc
lea ecx, [ebp - 0x8c4]
push ecx
lea edx, [ebp - 0x14]
push edx
push str.Cant_enumerate_registry_key_for_version__ls:__ls_n
call fcn.00408160
add esp, 0xc
jmp 0x407d85
push 7
lea eax, [ebp - 0x14]
push eax
push 8
mov ecx, dword [ebp - 0x8c8]
push ecx
call fcn.00403adf
add esp, 0x10
push 0x2d
mov edx, dword [ebp - 0x8c8]
push edx
call fcn.00401ea1
add esp, 8
mov dword [ebp - 0x8d8], eax
cmp dword [ebp - 0x8d8], 0
je 0x4077c2
mov dword [ebp - 0x8e4], 0x471164
mov eax, dword [ebp - 0x8d8]
mov dword [ebp - 0x8e0], eax
mov ecx, dword [ebp - 0x8e0]
mov dx, word [ecx]
mov word [ebp - 0x8ea], dx
mov eax, dword [ebp - 0x8e4]
cmp dx, word [eax]
jne 0x407797
cmp word [ebp - 0x8ea], 0
je 0x40778b
mov ecx, dword [ebp - 0x8e0]
mov dx, word [ecx + 2]
mov word [ebp - 0x8ec], dx
mov eax, dword [ebp - 0x8e4]
cmp dx, word [eax + 2]
jne 0x407797
add dword [ebp - 0x8e0], 4
add dword [ebp - 0x8e4], 4
cmp word [ebp - 0x8ec], 0
jne 0x407731
mov dword [ebp - 0x908], 0
jmp 0x4077a2
sbb ecx, ecx
or ecx, 1
mov dword [ebp - 0x908], ecx
mov edx, dword [ebp - 0x908]
mov dword [ebp - 0x91c], edx
cmp dword [ebp - 0x91c], 0
jne 0x4077c2
xor eax, eax
mov ecx, dword [ebp - 0x8d8]
mov word [ecx], ax
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str._ls_lsInstallPath
push 0xffffffffffffffff
push 0x58
lea ecx, [ebp - 0xc4]
push ecx
call fcn.00402680
add esp, 0x18
lea edx, [ebp - 0x8fc]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0
lea ecx, [ebp - 0xc4]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x8cc], eax
cmp dword [ebp - 0x8cc], 0
je 0x407851
push 0x400
lea eax, [ebp - 0x8c4]
push eax
mov ecx, dword [ebp - 0x8cc]
push ecx
call fcn.0040a470
add esp, 0xc
lea edx, [ebp - 0x8c4]
push edx
lea eax, [ebp - 0xc4]
push eax
mov ecx, dword [ebp - 0x8f8]
push ecx
push str._ls_ls:__ls
call fcn.00408160
add esp, 0x10
jmp 0x407652
mov dword [ebp - 0x8d0], 0x207
mov dword [ebp - 0x910], 0
mov dword [ebp - 0x8cc], 2
cmp dword [ebp - 0x8cc], 0
jne 0x40788e
cmp dword [ebp - 0x90c], 1
jne 0x40788e
cmp dword [ebp - 0x8d0], 0
jne 0x407929
mov dword [ebp - 0x910], 1
mov dword [ebp - 0x8d0], 0x207
lea edx, [ebp - 0x8d0]
push edx
mov eax, dword [ebp - 0x8c8]
add eax, 0x14
push eax
lea ecx, [ebp - 0x90c]
push ecx
push 0
push 0
mov edx, dword [ebp - 0x8fc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x8cc], eax
cmp dword [ebp - 0x8cc], 0
je 0x407929
push 0x400
lea eax, [ebp - 0x8c4]
push eax
mov ecx, dword [ebp - 0x8cc]
push ecx
call fcn.0040a470
add esp, 0xc
lea edx, [ebp - 0x8c4]
push edx
lea eax, [ebp - 0xc4]
push eax
mov ecx, dword [ebp - 0x8f8]
push ecx
push str._ls_ls:__ls_n
call fcn.00408160
add esp, 0x10
mov edx, dword [ebp - 0x8fc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407652
mov eax, dword [ebp - 0x8fc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x90c], 1
je 0x407944
jmp 0x407652
mov ecx, dword [ebp - 0x8d0]
shr ecx, 1
sub ecx, 1
mov dword [ebp - 0x8d0], ecx
mov edx, dword [ebp - 0x8d0]
mov eax, dword [ebp - 0x8c8]
movzx ecx, word [eax + edx*2 + 0x12]
cmp ecx, 0x5c
jne 0x40797a
mov edx, dword [ebp - 0x8d0]
sub edx, 1
mov dword [ebp - 0x8d0], edx
mov dword [ebp - 0x8e8], 0x47f010
jmp 0x407995
mov eax, dword [ebp - 0x8e8]
add eax, 4
mov dword [ebp - 0x8e8], eax
mov ecx, dword [ebp - 0x8e8]
cmp dword [ecx], 0
je 0x407d80
mov edx, dword [ebp - 0x8e8]
mov eax, dword [edx]
mov dword [ebp - 0x8d8], eax
cmp dword [ebp - 0x910], 0
je 0x4079fd
push str.python_d.exe
mov ecx, dword [ebp - 0x8d8]
push ecx
push str._ls_ls
mov edx, 0x104
sub edx, dword [ebp - 0x8d0]
push edx
mov eax, 0x104
sub eax, dword [ebp - 0x8d0]
push eax
mov ecx, dword [ebp - 0x8d0]
mov edx, dword [ebp - 0x8c8]
lea eax, [edx + ecx*2 + 0x14]
push eax
call fcn.00402680
add esp, 0x18
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x8d4], eax
cmp dword [ebp - 0x8d4], 0xffffffff
jne 0x407a5a
push 0x400
lea edx, [ebp - 0x8c4]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040a470
add esp, 0xc
lea eax, [ebp - 0x8c4]
push eax
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
push str.locate_pythons_for_key:__ls:__ls
call fcn.00408160
add esp, 0xc
jmp 0x407d7b
mov edx, dword [ebp - 0x8d4]
and edx, 0x10
je 0x407a81
mov eax, dword [ebp - 0x8c8]
add eax, 0x14
push eax
push str.locate_pythons_for_key:__ls_is_a_directory_n
call fcn.00408160
add esp, 8
jmp 0x407d7b
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
call fcn.004082f0
add esp, 4
test eax, eax
je 0x407ab3
mov edx, dword [ebp - 0x8c8]
add edx, 0x14
push edx
push str.locate_pythons_for_key:__ls:_already_found_n
call fcn.00408160
add esp, 8
jmp 0x407d7b
cmp dword [ebp + 0x14], 0
je 0x407ac7
mov eax, dword [ebp - 0x8c8]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x10], ecx
jmp 0x407b43
lea edx, [ebp - 0x8d4]
push edx
mov eax, dword [ebp - 0x8c8]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
mov dword [ebp - 0x920], eax
cmp dword [ebp - 0x920], 0
jne 0x407b06
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
push str.Failure_getting_binary_type:__ls_n
call fcn.00408160
add esp, 8
jmp 0x407b43
cmp dword [ebp - 0x8d4], 6
jne 0x407b1e
mov edx, dword [ebp - 0x8c8]
mov dword [edx + 0x10], 0x40
jmp 0x407b43
cmp dword [ebp - 0x8d4], 0
jne 0x407b36
mov eax, dword [ebp - 0x8c8]
mov dword [eax + 0x10], 0x20
jmp 0x407b43
mov ecx, dword [ebp - 0x8c8]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 0x8c8]
cmp dword [edx + 0x10], 0
jne 0x407b72
mov eax, dword [ebp - 0x8d4]
push eax
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
push str.locate_pythons_for_key:__ls:_invalid_binary_type:__X_n
call fcn.00408160
add esp, 0xc
jmp 0x407d7b
cmp dword [ebp + 0x18], 0
je 0x407bbf
push 0x5c
mov edx, dword [ebp - 0x8c8]
add edx, 0x14
push edx
call fcn.00401ea1
add esp, 8
mov dword [ebp - 0x914], eax
cmp dword [ebp - 0x914], 0
je 0x407bbf
mov eax, dword [ebp - 0x914]
add eax, 2
push eax
push 0x104
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x21c
push ecx
call fcn.0040279d
add esp, 0xc
push 0x20
mov edx, dword [ebp - 0x8c8]
add edx, 0x14
push edx
call fcn.004034f9
add esp, 8
test eax, eax
je 0x407ce7
mov eax, 2
imul ecx, eax, 0
mov edx, dword [ebp - 0x8c8]
movzx eax, word [edx + ecx + 0x21c]
test eax, eax
jne 0x407c19
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
push 0x104
mov edx, dword [ebp - 0x8c8]
add edx, 0x21c
push edx
call fcn.0040279d
add esp, 0xc
mov eax, dword [ebp - 0x8c8]
add eax, 0x14
mov dword [ebp - 0x8dc], eax
mov ecx, dword [ebp - 0x8dc]
add ecx, 2
mov dword [ebp - 0x924], ecx
mov edx, dword [ebp - 0x8dc]
mov ax, word [edx]
mov word [ebp - 0x8ee], ax
add dword [ebp - 0x8dc], 2
cmp word [ebp - 0x8ee], 0
jne 0x407c37
mov ecx, dword [ebp - 0x8dc]
sub ecx, dword [ebp - 0x924]
sar ecx, 1
mov dword [ebp - 0x928], ecx
mov edx, dword [ebp - 0x928]
mov dword [ebp - 0x900], edx
mov eax, dword [ebp - 0x900]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x8c8]
add ecx, 0x14
push ecx
mov edx, 2
shl edx, 0
mov eax, dword [ebp - 0x8c8]
lea ecx, [eax + edx + 0x14]
push ecx
call fcn.00403a03
add esp, 0xc
mov edx, 2
imul eax, edx, 0
mov ecx, 0x22
mov edx, dword [ebp - 0x8c8]
mov word [edx + eax + 0x14], cx
mov eax, 0x22
mov ecx, dword [ebp - 0x900]
mov edx, dword [ebp - 0x8c8]
mov word [edx + ecx*2 + 0x16], ax
xor eax, eax
mov ecx, dword [ebp - 0x900]
mov edx, dword [ebp - 0x8c8]
mov word [edx + ecx*2 + 0x18], ax
mov eax, dword [ebp - 0x8c8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x8c8]
add edx, 0x14
push edx
push str.locate_pythons_for_key:__ls_is_a__dbit_executable_n
call fcn.00408160
add esp, 0xc
mov eax, dword [ebp - 0x8c8]
push eax
mov ecx, dword [ebp - 0x8c8]
mov edx, dword [ecx + 0x10]
push edx
call fcn.00408370
add esp, 8
test eax, eax
je 0x407d45
mov eax, dword [ebp - 0x8c8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x8c8]
push edx
push str.locate_pythons_for_key:__ls__i:_already_found_n
call fcn.00408160
add esp, 0xc
jmp 0x407d7b
mov eax, dword [0x47ff3c]
add eax, 1
mov dword [0x47ff3c], eax
mov ecx, dword [ebp - 0x8c8]
mov dword [ebp - 0x92c], ecx
mov edx, dword [ebp - 0x8c8]
add edx, 0x424
mov dword [ebp - 0x8c8], edx
cmp dword [0x47ff3c], 0x64
jb 0x407d7b
jmp 0x407d80
jmp 0x407986
jmp 0x407652
mov eax, dword [ebp - 0x918]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004022ca
mov esp, ebp
pop ebp
ret