Function at 0x4d3888
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x174
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x100], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x114], 0
mov eax, dword [ebp + 0x18]
add eax, 1
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._calloc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4d392f
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], str._1102_:_Could_not_acquire_memory_due_to____d____s__.
mov dword [esp + 8], str.fim_read_values
mov dword [esp + 4], 0x359
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._merror_exit
mov dword [esp + 4], 1
mov eax, dword [ebp + 0x1c]
mov dword [esp], eax
call sym._calloc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4d3993
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], str._1102_:_Could_not_acquire_memory_due_to____d____s__.
mov dword [esp + 8], str.fim_read_values
mov dword [esp + 4], 0x35a
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._merror_exit
mov dword [ebp - 0xc], 0
jmp 0x4d3d2e
mov eax, dword [ebp + 0x18]
add eax, 1
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x150], 0
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.fim_registry_configuration
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4d3d81
lea eax, [ebp - 0x14c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x150]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x148]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
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
test eax, eax
jne 0x4d3d3c
mov eax, dword [ebp - 0x110]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x150]
mov edx, dword [ebp - 0x110]
mov ecx, 0xc
cmp eax, ecx
cmova eax, ecx
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x110]
mov edx, dword [ebp - 0x14c]
mov dword [eax + 0x18], edx
mov ebx, dword [ebp - 0x110]
mov dword [esp], 0
call dbg.time
mov dword [ebx + 0xac], eax
mov eax, dword [ebp - 0x110]
mov dword [eax + 0xa8], 0
mov dword [ebp - 0x118], 1
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._strlen
mov ebx, eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sym._strlen
add eax, ebx
add eax, 2
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4d3b1e
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], str._1102_:_Could_not_acquire_memory_due_to____d____s__.
mov dword [esp + 8], str.fim_read_values
mov dword [esp + 4], 0x374
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._merror_exit
mov eax, dword [ebp - 0x110]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_s
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dbg.snprintf
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dbg.fim_registry_validate_ignore
test eax, eax
je 0x4d3bb3
cmp dword [ebp - 0x24], 0
je 0x4d3b88
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0xfc]
test eax, eax
je 0x4d3d26
mov eax, dword [ebp - 0xfc]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0xfc], 0
jmp 0x4d3d26
cmp dword [ebp - 0x24], 0
je 0x4d3bcb
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x18]
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.fim_check_restrict
test eax, eax
jne 0x4d3d29
cmp dword [ebp + 0x10], 0
jne 0x4d3bfb
mov eax, 0x5125cb
jmp 0x4d3c00
mov eax, 0x512687
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x110]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], str.value
lea eax, [ebp - 0x141]
mov dword [esp], eax
call dbg.OS_SHA1_strings
mov eax, dword [ebp - 0x110]
lea edx, [ebp - 0x141]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
lea eax, [ebp - 0x118]
mov dword [esp], eax
call dbg.fim_registry_calculate_hashes
mov eax, dword [ebp - 0x110]
mov dword [esp], eax
call dbg.fim_registry_get_checksum_value
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
and eax, 0x2000
test eax, eax
je 0x4d3cc6
mov eax, dword [ebp - 0x110]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0x110]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 4]
mov ebx, dword [ebp - 0x14]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.fim_registry_value_diff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x24]
mov edx, dword [ebp - 0x10]
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x110]
mov eax, dword [ebp + 0x24]
mov dword [eax + 4], edx
lea eax, [ebp - 0x118]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x20]
mov dword [esp], eax
call sym._fim_db_transaction_sync_row
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jns 0x4d3d2a
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.dbsync_transaction_failed_due_to__d
mov dword [esp + 8], str.fim_read_values
mov dword [esp + 4], 0x398
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._mdebug2
jmp 0x4d3d2a
nop
jmp 0x4d3d2a
nop
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x14]
jb 0x4d399f
jmp 0x4d3d3d
nop
mov dword [ebp - 0x110], 0
mov eax, dword [ebp - 0xfc]
test eax, eax
je 0x4d3d69
mov eax, dword [ebp - 0xfc]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0xfc], 0
cmp dword [ebp - 0x1c], 0
je 0x4d3d81
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x1c], 0
mov ebx, dword [ebp - 4]
leave
ret