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

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, 0xc584
call fcn.004d7290
sub esp, eax
mov dword [ebp - 0x130], 0x104
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x8144], 0
mov byte [ebp - 0x129], 0
mov byte [ebp - 0x25], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
lea eax, [ebp - 0x138]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
lea eax, [ebp - 0x134]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x130]
mov dword [esp + 8], eax
lea eax, [ebp - 0x129]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
call eax
sub esp, 0x30
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x47ac73
mov byte [ebp - 0xc151], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x400
lea edx, [ebp - 0xc551]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x12ff
mov eax, dword [sym.imp.KERNEL32.dll_FormatMessageA]
call eax
sub esp, 0x1c
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47ac2c
lea eax, [ebp - 0xc551]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.Unable_to_read_registry__s___s_
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._snprintf_48
add eax, 1
mov dword [esp], eax
call sym._malloc
mov edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47ac06
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4fd5a8
mov dword [esp + 8], global___func__.106
mov dword [esp + 4], 0x964
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
lea edx, [ebp - 0xc551]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Unable_to_read_registry__s___s_
mov dword [esp], eax
call sym._sprintf_3
lea eax, [ebp - 0xc551]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Unable_to_read_registry__s:__s
mov dword [esp + 0xc], global___func__.106
mov dword [esp + 8], 0x968
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtdebug2
mov eax, 2
jmp 0x47b29f
mov eax, dword [ebp - 0x138]
test eax, eax
je 0x47b1c6
mov byte [ebp - 0x139], 0
mov byte [ebp - 0x4139], 0
mov byte [ebp - 0x8145], 0
mov dword [ebp - 0xc], 0
jmp 0x47b1b7
mov dword [ebp - 0x813c], 0x3fff
mov dword [ebp - 0x8140], 0x3fff
mov byte [ebp - 0x4138], 0
mov byte [ebp - 0x8138], 0
mov byte [ebp - 0xc144], 0
lea eax, [ebp - 0x8140]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x8138]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x8144]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x813c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x4138]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
call eax
sub esp, 0x20
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x47ae7f
cmp dword [ebp - 0x1c], 0x103
je 0x47ae7f
mov byte [ebp - 0xc151], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x400
lea edx, [ebp - 0xc551]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x12ff
mov eax, dword [sym.imp.KERNEL32.dll_FormatMessageA]
call eax
sub esp, 0x1c
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47ae42
lea eax, [ebp - 0xc551]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.Unable_to_enumerate_values_of_registry__s___s_
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._snprintf_48
add eax, 1
mov dword [esp], eax
call sym._malloc
mov edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47ae1c
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4fd5a8
mov dword [esp + 8], global___func__.106
mov dword [esp + 4], 0x98b
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
lea edx, [ebp - 0xc551]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Unable_to_enumerate_values_of_registry__s___s_
mov dword [esp], eax
call sym._sprintf_3
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Unable_to_enumerate_values_of_registry__s____RETURN_INVALID
mov dword [esp + 0xc], global___func__.106
mov dword [esp + 8], 0x98f
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtdebug2
mov eax, 2
jmp 0x47b29f
movzx eax, byte [ebp - 0x4138]
test al, al
jne 0x47ae98
mov byte [ebp - 0x4138], 0x40
mov byte [ebp - 0x4137], 0
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x4138]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__stricmp]
call eax
test eax, eax
je 0x47aefc
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x4138]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Considering_value__s_____s____s:_Skipping_value.
mov dword [esp + 0xc], global___func__.106
mov dword [esp + 8], 0x99b
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtdebug2
jmp 0x47b1b3
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x4138]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Considering_value__s_____s___s:_Value_found.
mov dword [esp + 0xc], global___func__.106
mov dword [esp + 8], 0x99f
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtdebug2
cmp dword [ebp + 0x14], 0
jne 0x47af83
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.No_value_data_especified._Existence_check_for__s:_1
mov dword [esp + 0xc], global___func__.106
mov dword [esp + 8], 0x9a3
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtdebug2
mov eax, 1
jmp 0x47b29f
mov eax, dword [ebp - 0x8144]
cmp eax, 7
je 0x47afe0
cmp eax, 7
ja 0x47b0b8
cmp eax, 2
ja 0x47afa5
test eax, eax
jne 0x47afb3
jmp 0x47b0b8
cmp eax, 4
je 0x47b089
jmp 0x47b0b8
lea eax, [ebp - 0x8138]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4fda52
mov dword [esp + 4], 0x3fff
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call sym._snprintf_48
jmp 0x47b148
mov dword [ebp - 0x18], 0x3fff
lea eax, [ebp - 0x8138]
mov dword [ebp - 0x14], eax
jmp 0x47b076
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._strlen
add eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jb 0x47b065
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call sym._strncat
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._strlen
sub ebx, eax
mov edx, ebx
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4ff42a
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call sym._strncat
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._strlen
add eax, 1
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
test al, al
jne 0x47aff5
jmp 0x47b148
lea eax, [ebp - 0x8138]
mov eax, dword [eax]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4ff42c
mov dword [esp + 4], 0x3fff
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call sym._snprintf_48
jmp 0x47b148
mov dword [ebp - 0x18], 0x3ffd
mov dword [ebp - 0x10], 0
jmp 0x47b13c
lea edx, [ebp - 0x8138]
mov eax, dword [ebp - 0x10]
add eax, edx
movzx eax, byte [eax]
movsx eax, al
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4ff42f
mov dword [esp + 4], 0xc
lea eax, [ebp - 0xc150]
mov dword [esp], eax
call sym._snprintf_48
cmp dword [ebp - 0x18], 2
jle 0x47b138
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
lea eax, [ebp - 0xc150]
mov dword [esp + 4], eax
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call sym._strncat
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call sym._strlen
mov edx, 0x3ffd
sub edx, eax
mov dword [ebp - 0x18], edx
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x8140]
cmp dword [ebp - 0x10], eax
jb 0x47b0c8
nop
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0xc144]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Checking_value_data__s_with_rule__s
mov dword [esp + 0xc], global___func__.106
mov dword [esp + 8], 0x9d5
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtdebug2
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
lea eax, [ebp - 0xc144]
mov dword [esp], eax
call dbg.wm_sca_pattern_matches
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
jmp 0x47b29f
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x138]
cmp dword [ebp - 0xc], eax
jb 0x47aca2
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47b28d
cmp dword [ebp + 0x14], 0
je 0x47b28d
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.Key__s_not_found_for_registry__s
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._snprintf_48
add eax, 1
mov dword [esp], eax
call sym._malloc
mov edx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47b26a
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4fd5a8
mov dword [esp + 8], global___func__.106
mov dword [esp + 4], 0x9dd
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov edx, dword [ebp + 0xc]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Key__s_not_found_for_registry__s
mov dword [esp], eax
call sym._sprintf_3
cmp dword [ebp + 0x14], 0
je 0x47b29a
mov eax, 2
jmp 0x47b29f
mov eax, 0
mov ebx, dword [ebp - 4]
leave
ret