Function at 0x46b36b
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x2d0c
call fcn.004d7290
sub esp, eax
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x2cdc], al
mov dword [ebp - 0x2044], 0
lea edx, [ebp - 0x2040]
mov eax, 0
mov ecx, 0x7ff
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x2844], 0
lea edx, [ebp - 0x2840]
mov eax, 0
mov ecx, 0x1ff
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x284c], 0
mov dword [ebp - 0x2848], 0
mov dword [ebp - 0x2c4c], 0
lea edx, [ebp - 0x2c48]
mov eax, 0
mov ecx, 0xff
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [tm_aux.tm_yday], 0
lea edx, [tm_aux.tm_isdst]
mov eax, 0
mov ecx, 0x13
mov edi, edx
rep stosd dword es:[edi], eax
lea edx, [ebp - 0x2cc0]
mov eax, 0
mov ecx, 9
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x20], 0
jmp 0x46beb1
mov dword [ebp - 0x24], 0
jmp 0x46be8d
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ebx
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov ebx, 0x4fb294
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._s__s__s__s
mov dword [esp + 4], 0x3ff
lea eax, [ebp - 0x2c4c]
mov dword [esp], eax
call sym._snprintf_44
mov dword [esp + 8], 4
mov dword [esp + 4], 0
lea eax, [ebp - 0x2cc4]
mov dword [esp], eax
call sym._memset
mov dword [esp + 0xc], 4
lea eax, [ebp - 0x2cc4]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x2c4c]
mov dword [esp], eax
call dbg.wm_state_io
test eax, eax
jns 0x46b516
mov dword [esp + 8], 4
mov dword [esp + 4], 0
lea eax, [ebp - 0x2cc4]
mov dword [esp], eax
call sym._memset
mov dword [esp], 0
call sym._time_17
mov dword [ebp - 0x2cc8], eax
cmp byte [ebp - 0x2cdc], 0
je 0x46b546
mov eax, dword [ebp - 0x2cc4]
test eax, eax
je 0x46b566
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 1]
test al, al
jne 0x46b566
movzx eax, byte [ebp - 0x2cdc]
xor eax, 1
test al, al
je 0x46b6aa
mov eax, dword [ebp - 0x2cc4]
test eax, eax
jne 0x46b6aa
mov eax, dword [ebp - 0x2cc8]
mov dword [ebp - 0x2cc4], eax
mov dword [esp + 0xc], 4
lea eax, [ebp - 0x2cc4]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
lea eax, [ebp - 0x2c4c]
mov dword [esp], eax
call dbg.wm_state_io
test eax, eax
jns 0x46b5cf
mov dword [esp + 0x10], 0x4fb6c5
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0xd9
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mterror
jmp 0x46be88
call dbg.isDebug
test eax, eax
je 0x46be88
lea eax, [ebp - 0x2cc8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2cc0]
mov dword [esp], eax
call sym._gmtime_s_1
lea eax, [ebp - 0x2cc0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4fb6e2
mov dword [esp + 4], 0x50
lea eax, [tm_aux.tm_yday]
mov dword [esp], eax
call sym._strftime
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x1c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, esi
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
lea eax, [tm_aux.tm_yday]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Bookmark_updated_to__s_for_tenant__s_resource__s_and_relationship__s__waiting__d_seconds_to_run_first_scan.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0xdd
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtdebug1
jmp 0x46be88
lea eax, [ebp - 0x2cc4]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2cc0]
mov dword [esp], eax
call sym._gmtime_s_1
lea eax, [ebp - 0x2cc0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4fb6e2
mov dword [esp + 4], 0x50
lea eax, [tm_aux.tm_yday]
mov dword [esp], eax
call sym._strftime
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x44]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4fb76e
mov dword [esp + 4], 0x7ff
lea eax, [ebp - 0x2844]
mov dword [esp], eax
call sym._snprintf_44
lea eax, [ebp - 0x2844]
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0x284c], eax
mov eax, dword [ebp - 0x284c]
test eax, eax
jne 0x46b778
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], 0x4fb5d4
mov dword [esp + 8], global___func__.243
mov dword [esp + 4], 0xe7
mov dword [esp], str.wazuh_modules_wm_ms_graph.c
call dbg._merror_exit
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov ebx, dword [eax]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
lea esi, [tm_aux.tm_yday]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.https:___s__s__s__s__filtercreatedDateTimegt_s
mov dword [esp + 4], 0x1fff
lea eax, [ebp - 0x2044]
mov dword [esp], eax
call sym._snprintf_44
lea eax, [ebp - 0x2044]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Microsoft_Graph_API_Log_URL:__s
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0xf0
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtdebug1
mov byte [ebp - 0x19], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], 0x3c
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4fb7de
lea eax, [ebp - 0x2044]
mov dword [esp + 8], eax
lea eax, [ebp - 0x284c]
mov dword [esp + 4], eax
mov dword [esp], 0x4fb7df
call dbg.wurl_http_request
mov dword [ebp - 0x2c], eax
mov dword [esp], 0
call sym._time_17
mov dword [ebp - 0x2cc8], eax
cmp dword [ebp - 0x2c], 0
je 0x46bcae
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 8]
cmp eax, 0xc8
je 0x46b929
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4fb4cf
mov dword [esp + 4], 4
lea eax, [ebp - 0x2ccc]
mov dword [esp], eax
call sym._snprintf_44
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ebx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [esp + 0x1c], ecx
lea edx, [ebp - 0x2ccc]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Received_unsuccessful_status_code_when_attempting_to_get_relationship__s_logs:_Status_code_was__s__response_was__s
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0xfb
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtwarn
jmp 0x46bca1
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax + 0xc]
test al, al
je 0x46b98a
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Reached_maximum_CURL_size_when_attempting_to_get_relationship__s_logs._Consider_increasing_the_value_of_curl_max_size.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x100
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtwarn
jmp 0x46bca1
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._cJSON_Parse_4
sub esp, 4
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x46bc50
mov dword [esp + 4], 0x4fb8db
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._cJSON_GetObjectItem_8
sub esp, 8
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._cJSON_GetArraySize_4
sub esp, 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jle 0x46bc10
mov dword [ebp - 0x28], 0
jmp 0x46bbfe
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._cJSON_GetArrayItem_8
sub esp, 8
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x46bbce
call sym._cJSON_CreateObject_0
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 4], str.resource
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._cJSON_AddStringToObject_12
sub esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 4], str.relationship
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._cJSON_AddStringToObject_12
sub esp, 0xc
mov eax, 0x4fb294
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4fb8f7
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._cJSON_AddStringToObject_12
sub esp, 0xc
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._cJSON_Duplicate_8
sub esp, 8
mov edx, 0x4fb294
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._cJSON_AddItemToObject_12
sub esp, 0xc
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._cJSON_PrintUnformatted_4
sub esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Sending_log:__s
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x114
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtdebug2
mov ebx, 0x4fb294
mov ecx, dword [0x588a80]
mov esi, dword [0x588a8c]
mov eax, 0xf4240
cdq
idiv esi
mov edx, eax
mov dword [esp + 0x10], 0x31
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dbg.wm_sendmsg
test eax, eax
jns 0x46bba6
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x4fb33f
mov dword [esp + 0x10], 0x4fb918
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x116
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mterror
cmp dword [ebp - 0x44], 0
je 0x46bbbe
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._cJSON_Delete_4
sub esp, 4
jmp 0x46bbfa
mov dword [esp + 0x10], str.Failed_to_parse_log_array_into_singular_log.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x11c
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtwarn
add dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x38]
jl 0x46b9ef
mov byte [ebp - 0x19], 0
jmp 0x46bc40
mov dword [esp + 0x10], str.No_new_logs_received.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x121
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtdebug2
mov byte [ebp - 0x19], 0
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._cJSON_Delete_4
sub esp, 4
jmp 0x46bca1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Failed_to_parse_relationship__s_JSON_body.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x126
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtwarn
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dbg.wurl_free_response
jmp 0x46bd23
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, esi
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.No_response_received_when_attempting_to_get_relationship__s_from_resource__s_on_API_version__s.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x12b
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtwarn
movzx eax, byte [ebp - 0x19]
xor eax, 1
test al, al
je 0x46be64
mov eax, dword [ebp - 0x2cc8]
mov dword [ebp - 0x2cc4], eax
lea eax, [ebp - 0x2cc4]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2cc0]
mov dword [esp], eax
call sym._gmtime_s_1
lea eax, [ebp - 0x2cc0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4fb6e2
mov dword [esp + 4], 0x50
lea eax, [tm_aux.tm_yday]
mov dword [esp], eax
call sym._strftime
mov dword [esp + 0xc], 4
lea eax, [ebp - 0x2cc4]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
lea eax, [ebp - 0x2c4c]
mov dword [esp], eax
call dbg.wm_state_io
test eax, eax
jns 0x46bddb
mov dword [esp + 0x10], 0x4fb6c5
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x136
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mterror
jmp 0x46be64
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x1c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
shl edx, 2
add eax, edx
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, esi
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
lea eax, [tm_aux.tm_yday]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Bookmark_updated_to__s_for_tenant__s_resource__s_and_relationship__s__waiting__d_seconds_to_run_next_scan.
mov dword [esp + 0xc], global___func__.243
mov dword [esp + 8], 0x138
mov dword [esp + 4], str.wazuh_modules_wm_ms_graph.c
mov dword [esp], str.wazuh_modulesd:ms_graph
call dbg._mtdebug1
mov eax, dword [ebp - 0x284c]
test eax, eax
je 0x46be89
mov eax, dword [ebp - 0x284c]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x284c], 0
jmp 0x46be89
nop
add dword [ebp - 0x24], 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
mov edx, dword [ebp - 0x20]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 2
add eax, ecx
mov eax, dword [eax + 8]
cmp dword [ebp - 0x24], eax
jb 0x46b43e
add dword [ebp - 0x20], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x50]
cmp dword [ebp - 0x20], eax
jb 0x46b432
nop
nop
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret