Function at 0x4616eb
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, 0x20254
call fcn.004d7290
sub esp, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call dbg.wm_ciscat_setup
mov dword [esp + 0x10], 0x4f94b4
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0x4b
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mtinfo
mov dword [esp + 4], 1
mov dword [esp], 0x10000
call sym._calloc
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4617b2
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], 0x4f94f4
mov dword [esp + 8], global___func__.5
mov dword [esp + 4], 0x4f
mov dword [esp], str.wazuh_modules_wm_ciscat.c
call dbg._merror_exit
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], 0xffff
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call eax
sub esp, 8
test eax, eax
jne 0x461807
mov dword [esp + 0x10], str.Unable_to_find_current_directory._Please_use_full_paths_for_CIS_CAT_configuration.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0x51
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mterror
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax + 0x30]
or edx, 4
mov byte [eax + 0x30], dl
mov dword [esp + 4], 1
mov dword [esp], 0x10000
call sym._calloc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x46186c
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], 0x4f94f4
mov dword [esp + 8], global___func__.5
mov dword [esp + 4], 0x56
mov dword [esp], str.wazuh_modules_wm_ciscat.c
call dbg._merror_exit
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x4619ea
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call dbg.wm_relative_path
test eax, eax
je 0x461893
cmp eax, 1
je 0x4618bd
jmp 0x461901
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f957f
mov dword [esp + 4], 0xffff
lea eax, [ebp - 0x1002c]
mov dword [esp], eax
call sym._snprintf_39
jmp 0x461934
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
test al, al
je 0x4618f8
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f9582
mov dword [esp + 4], 0xffff
lea eax, [ebp - 0x1002c]
mov dword [esp], eax
call sym._snprintf_39
jmp 0x461934
mov dword [ebp - 0x10], 1
jmp 0x461934
mov dword [esp + 0x10], str.Defined_Java_path_is_not_valid._Using_the_default_one.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0x6e
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mterror
mov dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0
jne 0x4619c8
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x461960
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x24], 0
lea eax, [ebp - 0x1002c]
mov dword [esp], eax
call sym._strdup
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x24], edx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
test eax, eax
jne 0x4619ea
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], 0x4f94f4
mov dword [esp + 8], global___func__.5
mov dword [esp + 4], 0x74
mov dword [esp], str.wazuh_modules_wm_ciscat.c
call dbg._merror_exit
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x4619e0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x24], 0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x461ab2
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
mov dword [esp], eax
call dbg.wm_relative_path
test eax, eax
je 0x461a11
cmp eax, 1
je 0x461a3b
jmp 0x461a77
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f957f
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._snprintf_39
jmp 0x461ae9
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
test al, al
je 0x461ae8
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f9582
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._snprintf_39
jmp 0x461ae8
mov dword [esp + 0x10], str.Defined_CIS_CAT_path_is_not_valid.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0x98
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mterror
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax + 0x30]
or edx, 4
mov byte [eax + 0x30], dl
jmp 0x461ae9
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
test al, al
je 0x461ae9
mov dword [esp + 0x10], str.wodlesciscat
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f9582
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._snprintf_39
jmp 0x461ae9
nop
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.IsDir
test eax, eax
jns 0x461b38
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.CIS_CAT_tool_not_found_at__s.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0xa6
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mterror
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax + 0x30]
or edx, 4
mov byte [eax + 0x30], dl
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x30]
shr al, 1
and eax, 1
movzx edx, al
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x4f94de
mov dword [esp], eax
call dbg.sched_scan_get_time_until_next_scan
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x461bd4
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dbg.w_get_timestamp
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x4f9614
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0xb2
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mtdebug2
cmp dword [ebp - 0x20], 0
je 0x461bc9
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dbg.w_sleep_until
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x30]
and eax, 4
test al, al
jne 0x461e1f
mov dword [esp + 0x10], str.Starting_evaluation.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0xb8
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mtinfo
call dbg.os_random
mov ebx, eax
call dbg.os_random
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f963c
mov dword [esp + 4], 0x1ff
lea eax, [ebp - 0x2022c]
mov dword [esp], eax
call sym._snprintf_39
lea eax, [ebp - 0x2022c]
mov dword [esp], eax
call sym._atoi
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jns 0x461c5e
neg dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0xc], eax
jmp 0x461e15
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 0xc]
and eax, 4
test al, al
jne 0x461e0c
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dbg.wm_relative_path
test eax, eax
je 0x461d84
cmp eax, 1
jne 0x461d56
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f9582
mov dword [esp + 4], 0xffff
lea eax, [ebp - 0x2002c]
mov dword [esp], eax
call sym._snprintf_39
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
test eax, eax
je 0x461cee
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0xc]
mov dword [eax + 4], 0
lea eax, [ebp - 0x2002c]
mov dword [esp], eax
call sym._strdup
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
test eax, eax
jne 0x461d87
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], 0x4f94f4
mov dword [esp + 8], global___func__.5
mov dword [esp + 4], 0xd7
mov dword [esp], str.wazuh_modules_wm_ciscat.c
call dbg._merror_exit
mov dword [esp + 0x10], str.Couldnt_find_benchmark_path._Skipping...
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0xda
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mterror
jmp 0x461d88
nop
jmp 0x461d88
nop
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dbg.IsFile
test eax, eax
jns 0x461dd2
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Benchmark_file__s_not_found.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0xde
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mterror
jmp 0x461e0c
mov eax, dword [ebp - 0x18]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.wm_ciscat_run
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax + 0x30]
and edx, 0xfffffffb
mov byte [eax + 0x30], dl
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x461c6c
mov dword [esp + 0x10], str.Evaluation_finished.
mov dword [esp + 0xc], global___func__.5
mov dword [esp + 8], 0xe7
mov dword [esp + 4], str.wazuh_modules_wm_ciscat.c
mov dword [esp], 0x4f94de
call dbg._mtinfo
jmp 0x461b38