Function at 0x4146c4
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, 0x30074
call fcn.004d7290
sub esp, eax
mov dword [ebp - 0x10], 0
mov dword [esp + 8], 0x10001
mov dword [esp + 4], 0
lea eax, [ebp - 0x2001e]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x10001
mov dword [esp + 4], 0
lea eax, [ebp - 0x1001d]
mov dword [esp], eax
call sym._memset
mov eax, dword [0x5701f4]
mov edx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, ecx
add eax, eax
add eax, ecx
shl eax, 3
add eax, edx
mov eax, dword [eax + 8]
cmp eax, 6
jne 0x41483e
mov eax, dword [ebp - 0x10]
lea edx, [eax + 1]
mov dword [ebp - 0x10], edx
test eax, eax
jne 0x41524b
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
mov dword [esp + 8], 0x10000
lea edx, [ebp - 0x1001d]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.OS_RecvSecureTCP
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jg 0x41487c
cmp dword [ebp - 0xc], 0
je 0x414810
cmp dword [ebp - 0xc], 0
jg 0x414834
cmp dword [ebp - 0xc], 0xfffffffa
je 0x4147a4
cmp dword [ebp - 0xc], 0xffffffff
je 0x4147ca
jmp 0x414834
mov dword [esp + 0xc], 0x4ecea8
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x3b
mov dword [esp], str.client_agent_receiver.c
call dbg._merror
jmp 0x414834
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov ebx, eax
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [esp], eax
call dbg.win_strerror
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4eceeb
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x46
mov dword [esp], str.client_agent_receiver.c
call dbg._merror
jmp 0x414834
mov dword [esp + 0xc], str.Manager_disconnected.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x4b
mov dword [esp], str.client_agent_receiver.c
call dbg._mdebug1
mov eax, 0xffffffff
jmp 0x415254
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
mov edx, eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10000
lea eax, [ebp - 0x1001d]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.WSOCK32.DLL_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x41524e
lea edx, [ebp - 0x1001d]
mov eax, dword [ebp - 0xc]
add eax, edx
mov byte [eax], 0
mov eax, dword [0x5701f4]
mov edx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, ecx
add eax, eax
add eax, ecx
shl eax, 3
add eax, edx
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
sub edx, 1
mov ecx, edx
lea edx, [ebp - 0x20024]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x2001e]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1001d]
mov dword [esp + 4], eax
mov dword [esp], 0x5701c0
call dbg.ReadSecMSG
test eax, eax
jne 0x4148ff
mov eax, dword [ebp - 0x20024]
test eax, eax
jne 0x41494a
mov eax, dword [0x5701f4]
mov edx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, ecx
add eax, eax
add eax, ecx
shl eax, 3
add eax, edx
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4ecf1c
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x5c
mov dword [esp], str.client_agent_receiver.c
call dbg._mwarn
jmp 0x415246
mov eax, dword [ebp - 0x20024]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Received_message:__s
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x60
mov dword [esp], str.client_agent_receiver.c
call dbg._mdebug2
mov eax, dword [ebp - 0x20024]
movzx eax, byte [eax]
cmp al, 0x23
jne 0x4151a1
mov eax, dword [ebp - 0x20024]
add eax, 1
movzx eax, byte [eax]
cmp al, 0x21
jne 0x4151a1
mov eax, dword [ebp - 0x20024]
add eax, 2
movzx eax, byte [eax]
cmp al, 0x2d
jne 0x4151a1
mov eax, dword [ebp - 0x20024]
add eax, 3
mov dword [ebp - 0x20024], eax
mov eax, dword [ebp - 0x20024]
test eax, eax
je 0x4151a1
mov dword [0x57ff24], 0
mov dword [esp], 0
call sym._time_4
mov dword [0x5701a0], eax
mov dword [esp + 4], 0x5701a0
mov dword [esp], 2
call dbg.w_agentd_state_update
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 6
mov dword [esp + 4], 0x4ecf60
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x414a64
mov eax, dword [ebp - 0x20024]
add eax, 6
mov dword [ebp - 0x20024], eax
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0xc]
test eax, eax
js 0x415233
mov eax, dword [ebp - 0x20024]
mov dword [esp], eax
call sym._strdup
mov edx, eax
mov eax, dword [0x57fac0]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.queue_push_ex
jmp 0x415233
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0xf
mov dword [esp + 4], str.force_reconnect
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x414aed
mov dword [esp + 0xc], str.Wazuh_Agent_will_be_reconnected_because_a_reconnect_message_was_received
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x7d
mov dword [esp], str.client_agent_receiver.c
call dbg._minfo
call dbg.os_setwait
mov dword [esp + 4], 0xd
mov dword [esp], 0
call dbg.w_agentd_state_update
mov dword [esp], 0
call dbg.start_agent
call dbg.os_delwait
mov dword [esp + 4], 0xc
mov dword [esp], 0
call dbg.w_agentd_state_update
jmp 0x415246
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 9
mov dword [esp + 4], 0x4ecfc1
mov dword [esp], eax
call sym._strncmp
test eax, eax
je 0x414b9b
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 9
mov dword [esp + 4], 0x4ecfcb
mov dword [esp], eax
call sym._strncmp
test eax, eax
je 0x414b9b
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 0x4ecfd5
mov dword [esp], eax
call sym._strncmp
test eax, eax
je 0x414b9b
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0x11
mov dword [esp + 4], 0x4ecfe3
mov dword [esp], eax
call sym._strncmp
test eax, eax
je 0x414b9b
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0x13
mov dword [esp + 4], 0x4ecff5
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x414bae
mov eax, dword [ebp - 0x20024]
mov dword [esp], eax
call dbg.ag_send_syscheck
jmp 0x415246
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0xd
mov dword [esp + 4], str.syscollector_
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x414be3
mov eax, dword [ebp - 0x20024]
mov dword [esp], eax
call dbg.wmcom_send
jmp 0x415246
mov eax, dword [ebp - 0x20024]
mov dword [esp + 4], 0x4ed017
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x415239
mov eax, dword [ebp - 0x20024]
movzx eax, byte [eax]
cmp al, 0x72
jne 0x414c5e
mov eax, dword [ebp - 0x20024]
add eax, 1
movzx eax, byte [eax]
cmp al, 0x65
jne 0x414c5e
mov eax, dword [ebp - 0x20024]
add eax, 2
movzx eax, byte [eax]
cmp al, 0x71
jne 0x414c5e
mov eax, dword [ebp - 0x20024]
add eax, 3
movzx eax, byte [eax]
test al, al
je 0x414c5e
mov eax, dword [ebp - 0x1c]
lea edx, [eax - 7]
mov eax, dword [ebp - 0x20024]
add eax, 4
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.req_push
jmp 0x415246
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 8
mov dword [esp + 4], 0x4ed022
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x414c93
mov eax, dword [ebp - 0x20024]
mov dword [esp], eax
call dbg.wm_sca_push_request_win
jmp 0x415246
mov eax, dword [0x57fac4]
test eax, eax
je 0x414cb3
mov eax, dword [0x57fac4]
mov dword [esp], eax
call sym._fclose
mov dword [0x57fac4], 0
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 8
mov dword [esp + 4], str.up_file
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x414e47
mov eax, dword [ebp - 0x20024]
add eax, 8
mov dword [ebp - 0x20024], eax
mov eax, dword [ebp - 0x20024]
mov dword [esp + 4], 0x20
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x41523f
mov eax, dword [ebp - 0x18]
mov byte [eax], 0
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0x21
mov dword [esp + 4], eax
mov dword [esp], 0x57fae0
call sym._strncpy
add dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20024], eax
mov eax, dword [ebp - 0x20024]
mov dword [esp + 4], 0xa
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x414d69
mov eax, dword [ebp - 0x18]
mov byte [eax], 0
jmp 0x414d69
mov eax, dword [ebp - 0x18]
mov byte [eax], 0x2d
mov eax, dword [ebp - 0x20024]
mov dword [esp + 4], 0x2f
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x414d63
mov eax, dword [ebp - 0x20024]
movzx eax, byte [eax]
cmp al, 0x2e
jne 0x414d9e
mov eax, dword [ebp - 0x20024]
mov byte [eax], 0x2d
mov eax, dword [ebp - 0x20024]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.shared
mov dword [esp + 8], 0x4ed03b
mov dword [esp + 4], 0x400
mov dword [esp], 0x57fb20
call sym._snprintf_11
mov dword [esp + 4], 0x4ed041
mov dword [esp], 0x57fb20
call sym._fopen
mov dword [0x57fac4], eax
mov eax, dword [0x57fac4]
test eax, eax
jne 0x415245
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 + 0x18], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x57fb20
mov dword [esp + 0xc], 0x4ed044
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0xf8
mov dword [esp], str.client_agent_receiver.c
call dbg._merror
jmp 0x415245
mov eax, dword [ebp - 0x20024]
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.close_file
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x415178
movzx eax, byte [0x57fb20]
test al, al
je 0x415245
mov dword [esp + 8], 1
lea eax, [ebp - 0x30049]
mov dword [esp + 4], eax
mov dword [esp], 0x57fb20
call dbg.OS_MD5_File
test eax, eax
jns 0x414eb6
mov dword [esp], 0x57fb20
call sym._unlink
mov byte [0x57fb20], 0
jmp 0x415245
mov dword [esp + 4], 0x57fae0
lea eax, [ebp - 0x30049]
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x414f0d
mov dword [esp + 0x10], 0x57fb20
mov dword [esp + 0xc], str.Failed_md5_for:__s____deleting.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x10b
mov dword [esp], str.client_agent_receiver.c
call dbg._mdebug1
mov dword [esp], 0x57fb20
call sym._unlink
jmp 0x41516c
mov dword [esp + 4], 0x2f
mov dword [esp], 0x57fb20
call sym._strrchr
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x415160
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [esp + 4], str.merged.mg
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x41516c
mov dword [esp + 4], 4
mov dword [esp], 2
call sym._calloc
mov dword [ebp - 0x20028], eax
mov eax, dword [ebp - 0x20028]
test eax, eax
jne 0x414fb8
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], 0x4ed0b4
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x116
mov dword [esp], str.client_agent_receiver.c
call dbg._merror_exit
mov ebx, dword [ebp - 0x20028]
mov dword [esp], str.merged.mg
call sym._strdup
mov dword [ebx], eax
mov eax, dword [ebx]
test eax, eax
jne 0x41501a
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], 0x4ed0b4
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x117
mov dword [esp], str.client_agent_receiver.c
call dbg._merror_exit
lea eax, [ebp - 0x20028]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], str.shared
mov dword [esp], 0x57fb20
call dbg.UnmergeFiles
test eax, eax
jne 0x415095
mov dword [esp + 0x14], 0x4ece80
mov dword [esp + 0x10], 0x4ed0e9
mov dword [esp + 0xc], 0x31
mov dword [esp + 8], 0x4ed0f5
mov dword [esp + 4], 0x10000
lea eax, [ebp - 0x30028]
mov dword [esp], eax
call sym._snprintf_11
mov dword [esp + 4], 0xffffffff
lea eax, [ebp - 0x30028]
mov dword [esp], eax
call dbg.send_msg
jmp 0x415150
mov eax, dword [ebp - 0x20028]
mov dword [esp + 4], eax
mov dword [esp], str.shared
call dbg.cldir_ex_ignore
test eax, eax
je 0x4150d3
mov dword [esp + 0xc], str.Could_not_clean_up_shared_directory.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x120
mov dword [esp], str.client_agent_receiver.c
call dbg._mwarn
call dbg.clear_merged_hash_cache
mov eax, dword [0x5701f4]
movzx eax, byte [eax + 0x44]
and eax, 2
test al, al
je 0x415150
call dbg.verifyRemoteConf
test eax, eax
jne 0x415150
mov eax, dword [0x5701f4]
movzx eax, byte [eax + 0x44]
and eax, 1
test al, al
je 0x41512c
mov dword [esp + 0xc], str.Agent_is_restarting_due_to_shared_configuration_changes.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x125
mov dword [esp], str.client_agent_receiver.c
call dbg._minfo
call dbg.restartAgent
jmp 0x415150
mov dword [esp + 0xc], str.Shared_agent_configuration_has_been_updated.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x128
mov dword [esp], str.client_agent_receiver.c
call dbg._minfo
mov eax, dword [ebp - 0x20028]
mov dword [esp], eax
call dbg.free_strarray
jmp 0x41516c
mov dword [esp], 0x57fb20
call sym._unlink
mov byte [0x57fb20], 0
jmp 0x415245
mov dword [esp + 0xc], str.Unknown_message_received_from_server.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x139
mov dword [esp], str.client_agent_receiver.c
call dbg._mwarn
jmp 0x415245
mov eax, dword [0x57fac4]
test eax, eax
je 0x4151f3
mov dword [esp], 0
call sym._time_4
mov dword [0x5701a0], eax
mov dword [esp + 4], 0x5701a0
mov dword [esp], 2
call dbg.w_agentd_state_update
mov edx, dword [ebp - 0x20024]
mov eax, dword [0x57fac4]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x4ed1ba
mov dword [esp], eax
call sym._fprintf
jmp 0x414717
mov eax, dword [0x57ff24]
test eax, eax
jne 0x414717
mov dword [esp + 0xc], str.Unknown_message_received._No_action_defined.
mov dword [esp + 8], global___func__.259
mov dword [esp + 4], 0x144
mov dword [esp], str.client_agent_receiver.c
call dbg._mwarn
mov dword [0x57ff24], 1
jmp 0x414717
nop
jmp 0x414717
nop
jmp 0x414717
nop
jmp 0x414717
nop
jmp 0x414717
nop
jmp 0x41524f
nop
mov eax, 0
mov ebx, dword [ebp - 4]
leave
ret