Function at 0x49a50f
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x394
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14c], 0x128
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call eax
lea edx, [ebp - 0x24]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x28
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
call eax
sub esp, 0x10
test eax, eax
jne 0x49a655
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x3f0
jne 0x49a61f
mov dword [esp], 2
mov eax, dword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
call eax
sub esp, 4
test eax, eax
jne 0x49a5ba
mov dword [esp + 0x10], str.os_get_win32_process_list____ImpersonateSelf
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0xf2
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, 0
jmp 0x49aaa1
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call eax
lea edx, [ebp - 0x24]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x28
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
call eax
sub esp, 0x10
test eax, eax
jne 0x49a655
mov dword [esp + 0x10], str.os_get_win32_process_list____OpenThread
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0xf9
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, 0
jmp 0x49aaa1
mov dword [esp + 0x10], str.os_get_win32_process_list____OpenThread
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0xfd
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, 0
jmp 0x49aaa1
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 1
mov dword [esp], eax
call dbg.w_os_win32_setdebugpriv
test eax, eax
jne 0x49a6b2
mov dword [esp + 0x10], str.w_os_win32_setdebugpriv
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0x104
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, 0
jmp 0x49aaa1
mov dword [esp + 4], 0
mov dword [esp], 2
call sym._CreateToolhelp32Snapshot_8
sub esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x49a708
mov dword [esp + 0x10], str.CreateToolhelp32Snapshot
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0x10c
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, 0
jmp 0x49aaa1
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._Process32First_8
sub esp, 8
test eax, eax
jne 0x49a786
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._Process32Next_8
sub esp, 8
test eax, eax
jne 0x49a786
mov dword [esp + 0x10], str.Process32First
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0x112
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, 0
jmp 0x49aaa1
call dbg.OSList_Create
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x49aa5b
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [esp + 0x10], str._1290_:_Unable_to_create_a_new_list__calloc_.
mov dword [esp + 0xc], str.w_os_get_process_list
mov dword [esp + 8], 0x11b
mov dword [esp + 4], str.shared_os_utils.c
mov dword [esp], str.wazuh_remoted
call dbg._mterror
mov eax, 0
jmp 0x49aaa1
lea eax, [ebp - 0x14c]
add eax, 0x24
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x49a840
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], 0x505904
mov dword [esp + 8], str.w_os_get_process_list
mov dword [esp + 4], 0x126
mov dword [esp], str.shared_os_utils.c
call dbg._merror_exit
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x370], 0x224
mov eax, dword [ebp - 0x144]
mov dword [esp + 4], eax
mov dword [esp], 8
call sym._CreateToolhelp32Snapshot_8
sub esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x49a8d3
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x49a9d3
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], 0x505904
mov dword [esp + 8], str.w_os_get_process_list
mov dword [esp + 4], 0x131
mov dword [esp], str.shared_os_utils.c
call dbg._merror_exit
lea eax, [ebp - 0x370]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._Module32First_8
sub esp, 8
test eax, eax
jne 0x49a95f
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x49a9d3
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], 0x505904
mov dword [esp + 8], str.w_os_get_process_list
mov dword [esp + 4], 0x135
mov dword [esp], str.shared_os_utils.c
call dbg._merror_exit
lea eax, [ebp - 0x370]
add eax, 0x120
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x49a9c3
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], 0x505904
mov dword [esp + 8], str.w_os_get_process_list
mov dword [esp + 4], 0x137
mov dword [esp], str.shared_os_utils.c
call dbg._merror_exit
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov dword [esp + 4], 8
mov dword [esp], 1
call sym._calloc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x49aa38
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], 0x505904
mov dword [esp + 8], str.w_os_get_process_list
mov dword [esp + 4], 0x13b
mov dword [esp], str.shared_os_utils.c
call dbg._merror_exit
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x18]
mov dword [eax], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.OSList_AddData
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._Process32Next_8
sub esp, 8
test eax, eax
jne 0x49a7de
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 0
mov dword [esp], eax
call dbg.w_os_win32_setdebugpriv
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 4]
leave
ret