Function at 0x4d3d86
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1cc
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x24], 0xffffffff
cmp dword [ebp + 8], 0
je 0x4d424f
cmp dword [ebp + 0xc], 0
je 0x4d424f
cmp dword [ebp + 0x10], 0
je 0x4d424f
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.fim_registry_configuration
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4d4252
cmp dword [ebp + 0x18], 0
jne 0x4d3e0a
cmp dword [ebp + 0x1c], 0
je 0x4d3e0a
mov eax, dword [ebp + 0x1c]
cmp eax, dword [ebp - 0x28]
jne 0x4d4255
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.fim_registry_validate_recursion_level
test eax, eax
jne 0x4d4258
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.fim_registry_validate_ignore
test eax, eax
jne 0x4d425b
cmp dword [ebp + 0x14], 0
jne 0x4d3e53
mov eax, 0x20219
jmp 0x4d3e58
mov eax, 0x20119
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call eax
sub esp, 0x14
test eax, eax
je 0x4d3ed2
cmp dword [ebp + 0x14], 0
jne 0x4d3e99
mov eax, 0x5125cb
jmp 0x4d3e9e
mov eax, 0x512687
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._6920_:_Unable_to_open_registry_key:__s_arch:__s.
mov dword [esp + 8], str.fim_open_key
mov dword [esp + 4], 0x3df
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._mdebug1
jmp 0x4d4262
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x54]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], 0
lea edx, [ebp - 0x4c]
mov dword [esp + 0x24], edx
lea edx, [ebp - 0x48]
mov dword [esp + 0x20], edx
lea edx, [ebp - 0x44]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
lea edx, [ebp - 0x40]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
call eax
sub esp, 0x30
test eax, eax
je 0x4d3f4e
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
jmp 0x4d4262
mov dword [ebp - 0x1c], 0
jmp 0x4d40e0
mov dword [ebp - 0x90], 0x104
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x90]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x195]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
call eax
sub esp, 0x20
test eax, eax
jne 0x4d40db
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._strlen
mov edx, dword [ebp - 0x90]
add eax, edx
add eax, 2
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x4d402c
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_open_key
mov dword [esp + 4], 0x3f9
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._merror_exit
lea eax, [ebp - 0x195]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_s
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dbg.snprintf
mov dword [esp + 4], 0x5c
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4d4077
add dword [ebp - 0x20], 1
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.fim_open_key
cmp dword [ebp - 0x38], 0
je 0x4d40dc
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x38], 0
jmp 0x4d40dc
nop
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x1c], eax
jb 0x4d3f5a
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.fim_check_restrict
test eax, eax
jne 0x4d425e
mov dword [ebp - 0x60], 1
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x28]
mov dword [esp + 8], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.fim_registry_get_key_data
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x4d4261
cmp dword [ebp + 0x14], 0
jne 0x4d414b
mov eax, 0x5125cb
jmp 0x4d4150
mov eax, 0x512687
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x51299a
lea eax, [ebp - 0x89]
mov dword [esp], eax
call dbg.OS_SHA1_strings
mov eax, dword [ebp - 0x5c]
lea edx, [ebp - 0x89]
mov dword [eax + 8], edx
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp + 0x2c]
mov dword [eax + 4], edx
lea eax, [ebp - 0x60]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x20]
mov dword [esp], eax
call sym._fim_db_transaction_sync_row
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jns 0x4d41dd
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Dbsync_registry_transaction_failed_due_to__d
mov dword [esp + 8], str.fim_open_key
mov dword [esp + 4], 0x422
mov dword [esp], str._root_wazuh_4.7.2_src_syscheckd_src_registry_registry.c
call dbg._merror
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4d4232
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x19c], eax
mov edi, dword [ebp - 0x48]
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x5c]
mov ebx, dword [eax + 0x28]
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], edx
call dbg.fim_read_values
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call dbg.fim_registry_free_key
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
sub esp, 4
jmp 0x4d4262
nop
jmp 0x4d4262
nop
jmp 0x4d4262
nop
jmp 0x4d4262
nop
jmp 0x4d4262
nop
jmp 0x4d4262
nop
jmp 0x4d4262
nop
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret