Function at 0x10016580
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa60
mov eax, dword [0x100e6018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
xor ebx, ebx
call sym.iImportLib.dll_bool___cdecl_elex::os::IsX64System_void_
test al, al
mov ecx, 0x200
cmovne ebx, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
mov dword [ebp - 0xa44], 0
call sub.MSVCR110.dll_memset
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0xc
lea eax, [ebp - 0xa44]
push eax
mov eax, ebx
or eax, 1
push eax
push 0
push str.SoftwareNAMSystemNAMClient
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xa30], 0x104
call edi
test eax, eax
jne 0x1001663f
lea eax, [ebp - 0xa30]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0xa38]
push eax
push 0
push str.path
push dword [ebp - 0xa44]
mov dword [ebp - 0xa38], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x10016651
push dword [ebp - 0xa44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100947be
mov esp, ebp
pop ebp
ret
push esi
push dword [ebp - 0xa44]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016670
sub ecx, edx
sar ecx, 1
je 0x100169b1
call sym.iImportLib.dll_bool___cdecl_elex::os::IsX64System_void_
test al, al
mov ecx, 0x100
cmovne ebx, ecx
lea eax, [ebp - 0xa3c]
push eax
mov eax, ebx
or eax, 9
push eax
push 0
push str.SystemCurrentControlSetServices
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xa48], ebx
mov dword [ebp - 0xa3c], 0
call edi
test eax, eax
jne 0x1001699e
push 0x206
xor ebx, ebx
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push ebx
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa30]
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x414]
push eax
push ebx
push dword [ebp - 0xa3c]
mov dword [ebp - 0xa30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x10016996
mov edi, dword [sym.imp.MSVCR110.dll__wcsicmp]
nop
inc ebx
test eax, eax
jne 0x1001695e
mov dword [ebp - 0xa60], str.iSafeService
mov dword [ebp - 0xa5c], str.iSafeKrnl
mov dword [ebp - 0xa58], str.iSafeNetFilter
mov dword [ebp - 0xa54], str.iSafeKrnlBoot
mov dword [ebp - 0xa50], str.iSafeKrnlKit
mov dword [ebp - 0xa4c], str.iSafeKrnlR3
xor esi, esi
jmp 0x10016770
push dword [ebp + esi*4 - 0xa60]
lea eax, [ebp - 0x414]
push eax
call edi
add esp, 8
test eax, eax
je 0x10016958
inc esi
cmp esi, 6
jb 0x10016770
lea eax, [ebp - 0xa40]
push eax
mov eax, dword [ebp - 0xa48]
or eax, 1
push eax
push 0
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0xa3c]
mov dword [ebp - 0xa40], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10016958
push 0x206
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
call sub.MSVCR110.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa30]
push eax
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0xa34]
push eax
push 0
push str.ImagePath
push dword [ebp - 0xa40]
mov dword [ebp - 0xa30], 0x208
mov dword [ebp - 0xa34], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x10016838
push dword [ebp - 0xa40]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
jmp 0x1001695e
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016841
mov esi, dword [sym.imp.MSVCR110.dll__wcsnicmp]
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x824]
push eax
call esi
add esp, 0xc
test eax, eax
je 0x100168b1
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016877
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x81c]
push eax
call esi
add esp, 0xc
test eax, eax
je 0x100168b1
push dword [ebp - 0xa40]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
jmp 0x1001695e
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call sub.MSVCR110.dll_memset
mov esi, dword [sym.imp.MSVCR110.dll_wcscpy_s]
push str.SystemCurrentControlSetServices
lea eax, [ebp - 0x61c]
push 0x104
push eax
call esi
push 0x100a21f4
lea eax, [ebp - 0x61c]
push 0x104
push eax
call dword [sym.imp.MSVCR110.dll_wcscat_s]
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push 0x104
push eax
call dword [sym.imp.MSVCR110.dll_wcscat_s]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xa2c], ax
lea eax, [ebp - 0xa2a]
push eax
call sub.MSVCR110.dll_memset
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0xa2c]
push 0x104
push eax
call esi
add esp, 0x48
lea edx, [ebp - 0xa2c]
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.10016420
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xa30]
push eax
lea eax, [ebp - 0x414]
push eax
push ebx
push dword [ebp - 0xa3c]
mov dword [ebp - 0xa30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
jne 0x10016720
push dword [ebp - 0xa3c]
call esi
pop esi
pop edi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100947be
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
pop edi
xor ecx, ebp
xor al, al
pop ebx
call fcn.100947be
mov esp, ebp
pop ebp
ret