Function at 0x472724
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
test eax, eax
je 0x472768
mov dword [esp + 0x10], str.Module_started.
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0x98
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtinfo
jmp 0x4727a0
mov dword [esp + 0x10], str.Module_disabled._Exiting.
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0x9a
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtinfo
mov dword [esp], 0
call dbg.pthread_exit
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x4727b6
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax]
test eax, eax
jne 0x4727ee
mov dword [esp + 0x10], str.No_policies_defined._Exiting.
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0x9f
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtinfo
mov dword [esp], 0
call dbg.pthread_exit
mov ecx, dword [0x588a8c]
mov eax, 0xf4240
cdq
idiv ecx
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x10], 3
mov eax, dword [ebp - 0x10]
mov dword [0x588ac4], eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x14], 0x12c
mov eax, dword [ebp - 0x10]
movzx edx, byte [eax + 0x28]
and edx, 0xfffffffe
mov byte [eax + 0x28], dl
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x2c], 0x1e
mov dword [esp + 0xc], 0x3c
mov dword [esp + 8], 1
mov dword [esp + 4], str.request_db_interval
mov dword [esp], 0x4fd44c
call dbg.getDefine_Int
imul eax, eax, 0x3c
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x14], edx
mov dword [esp + 0xc], 0x12c
mov dword [esp + 8], 1
mov dword [esp + 4], str.commands_timeout
mov dword [esp], 0x4fd44c
call dbg.getDefine_Int
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x2c], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], str.remote_commands
mov dword [esp], 0x4fd44c
call dbg.getDefine_Int
shl eax, 7
sar al, 7
mov edx, dword [ebp - 0x10]
and eax, 1
mov ecx, eax
movzx eax, byte [edx + 0x28]
and eax, 0xfffffffe
or eax, ecx
mov byte [edx + 0x28], al
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 0x10]
mov edx, dword [edx + 0x3c]
cmp edx, eax
jae 0x472916
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x14], edx
mov dword [esp + 0x10], str.The_request_db_interval_option_cannot_be_higher_than_the_scan_interval._It_will_be_redefined_to_that_value.
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0xb9
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtinfo
mov dword [ebp - 0xc], 0
jmp 0x4729c8
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
movzx eax, byte [eax]
and eax, 1
test al, al
je 0x472981
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Loaded_policy__s
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0xbf
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtinfo
jmp 0x4729c4
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Policy__s_disabled_by_configuration.
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0xc1
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mtinfo
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x472922
mov dword [ebp - 0xc], 0
jmp 0x472c65
mov eax, dword [ebp - 0xc]
add eax, 2
lea edx, [eax*4]
mov eax, dword [0x588ab4]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._realloc
mov dword [0x588ab4], eax
mov eax, dword [0x588ab4]
test eax, eax
jne 0x472a60
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__.52
mov dword [esp + 4], 0xc7
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [0x588ab4]
mov edx, dword [ebp - 0xc]
shl edx, 2
lea ebx, [eax + edx]
call dbg.OSHash_Create
mov dword [ebx], eax
mov eax, dword [0x588ab4]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x472ac0
mov dword [esp + 0x10], 0x4fd5e0
mov dword [esp + 0xc], global___func__.52
mov dword [esp + 8], 0xca
mov dword [esp + 4], str.wazuh_modules_wm_sca.c
mov dword [esp], 0x4fd44c
call dbg._mterror
mov dword [esp], 0
call dbg.pthread_exit
mov eax, dword [0x588ab4]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [esp + 4], dbg.wm_sca_free_hash_data
mov dword [esp], eax
call dbg.OSHash_SetFreeDataPointer
mov eax, dword [ebp - 0xc]
add eax, 2
lea edx, [eax*4]
mov eax, dword [0x588abc]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._realloc
mov dword [0x588abc], eax
mov eax, dword [0x588abc]
test eax, eax
jne 0x472b53
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__.52
mov dword [esp + 4], 0xd0
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [ebp - 0xc]
add eax, 2
lea edx, [eax*4]
mov eax, dword [0x588aa0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._realloc
mov dword [0x588aa0], eax
mov eax, dword [0x588aa0]
test eax, eax
jne 0x472bc7
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__.52
mov dword [esp + 4], 0xd3
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [0x588aa0]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov dword [eax], 0
mov eax, dword [0x588abc]
mov edx, dword [ebp - 0xc]
shl edx, 2
lea ebx, [eax + edx]
mov dword [esp + 4], 4
mov dword [esp], 1
call sym._calloc
mov dword [ebx], eax
mov eax, dword [ebx]
test eax, eax
jne 0x472c4c
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__.52
mov dword [esp + 4], 0xd7
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [0x588abc]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [eax], 0
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x4729ec
mov dword [ebp - 0xc], 0
jmp 0x472d73
mov eax, dword [ebp - 0xc]
add eax, 2
lea edx, [eax*4]
mov eax, dword [0x588ab8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._realloc
mov dword [0x588ab8], eax
mov eax, dword [0x588ab8]
test eax, eax
jne 0x472cfd
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__.52
mov dword [esp + 4], 0xdd
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [0x588ab8]
mov edx, dword [ebp - 0xc]
shl edx, 2
lea ebx, [eax + edx]
mov dword [esp + 4], 0x41
mov dword [esp], 1
call sym._calloc
mov dword [ebx], eax
mov eax, dword [ebx]
test eax, eax
jne 0x472d6f
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__.52
mov dword [esp + 4], 0xde
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0xc]
shl edx, 2
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x472c89
mov dword [esp], 0x400
call dbg.queue_init
mov dword [0x588ac0], eax
mov dword [esp + 4], 0
mov dword [esp], 0x588ac8
call dbg.pthread_rwlock_init
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x472dec
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4fd60e
mov dword [esp + 8], global___func__.52
mov dword [esp + 4], 0xee
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], dbg.wm_sca_dump_db_thread
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
call eax
sub esp, 0x18
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x472e51
mov dword [esp + 0xc], 0x4fd62c
mov dword [esp + 8], global___func__.52
mov dword [esp + 4], 0xf4
mov dword [esp], str.wazuh_modules_wm_sca.c
call dbg._merror_exit
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.wm_sca_start
mov eax, 0
mov ebx, dword [ebp - 4]
leave
ret 4