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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x436008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
mov ebx, ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
mov dword [edx], 0
mov dword [edx + 4], 0
mov dword [edx + 8], 0
mov dword [edx + 0xc], 0
call fcn.0041bea0
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov esi, eax
add esp, 4
test esi, esi
jle 0x422285
push 0
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jne 0x422277
cmp dword [0x44880c], 3
jl 0x422270
push ebx
push str.socket_receive_timeout
push str._s:_fd_d_recv_returned_0_n
push 2
call edi
add esp, 4
push eax
call fcn.00401090
add esp, 0x10
mov esi, 0xfffffff5
jmp 0x422287
jns 0x422283
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov esi, dword [eax]
neg esi
test esi, esi
jns 0x4222cf
cmp dword [0x448818], 1
jl 0x4222ab
push esi
push str.receive_packet
push str._s:_Error_receiving_packet:__d_n
push 2
call edi
add esp, 4
push eax
call fcn.00401090
add esp, 0x10
push 2
call edi
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
cmp esi, 0x10
jae 0x422322
cmp dword [0x448818], 1
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jl 0x4222fe
push esi
push str.receive_packet
push str._s:_Received_packet_is_too_small__got__d_bytes__n
push 2
call edi
add esp, 4
push eax
call fcn.00401090
add esp, 0x10
push 2
call edi
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x14]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add edi, 0xfffffff0
je 0x42241f
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x28], eax
xor esi, esi
push 0x1388
mov ecx, ebx
call fcn.0041bea0
add esp, 4
test eax, eax
jle 0x42237c
push 0
mov eax, edi
sub eax, esi
push eax
mov eax, dword [ebp - 0x28]
add eax, esi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4223ea
jns 0x42237e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [eax]
neg eax
test eax, eax
js 0x422384
add esi, eax
cmp esi, edi
jb 0x422343
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp esi, edi
je 0x422419
cmp dword [0x448818], 1
jl 0x4223b7
push esi
push edi
push str.receive_packet
push str._s:_Error_receiving_payload_of_size__d__bytes_received:__d__n
push 2
call ebx
add esp, 4
push eax
call fcn.00401090
add esp, 0x14
push 2
call ebx
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push dword [ebp - 0x28]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, 0xffffff98
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
cmp dword [0x44880c], 3
jl 0x422384
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.socket_receive_timeout
push str._s:_fd_d_recv_returned_0_n
push 2
call ebx
add esp, 4
push eax
call fcn.00401090
add esp, 0x10
jmp 0x42238a
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp dword [ebp - 0xc], 8
jne 0x4227d8
mov ebx, dword [ebp - 0x28]
lea eax, [ebp - 0x30]
push eax
push edi
push ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], 0
call sym.fixios.exe_plist_from_xml
add esp, 0xc
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebp - 0x30]
add esp, 4
test edi, edi
jne 0x4224a3
cmp dword [0x448818], 1
jl 0x42247c
push str.receive_packet
push str._s:_Error_getting_plist_from_payload__n
push 2
call esi
add esp, 4
push eax
call fcn.00401090
add esp, 0xc
push 2
call esi
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
mov eax, 0xffffff98
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.MessageType
push edi
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
add esp, 8
test esi, esi
je 0x4227ac
push esi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 3
jne 0x4227ac
lea eax, [ebp - 0x1c]
push eax
push esi
call sym.fixios.exe_plist_get_string_val
mov ebx, dword [ebp - 0x1c]
add esp, 8
test ebx, ebx
je 0x422739
xorps xmm0, xmm0
mov ecx, 0x432178
movlpd qword [ebp - 0x20], xmm0
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x422514
test dl, dl
je 0x422510
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x422514
add eax, 2
add ecx, 2
test dl, dl
jne 0x4224f4
xor eax, eax
jmp 0x422519
sbb eax, eax
or eax, 1
test eax, eax
jne 0x422554
push str.Number
push edi
call sym.fixios.exe_plist_dict_get_item
lea ecx, [ebp - 0x20]
push ecx
push eax
call sym.fixios.exe_plist_get_uint_val
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 4
call eax
mov ecx, dword [ebp - 0x24]
add esp, 0x14
mov dword [ecx], eax
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov dword [ebp - 0xc], 1
jmp 0x422726
mov ecx, str.Attached
mov eax, ebx
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x422580
test dl, dl
je 0x42257c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x422580
add eax, 2
add ecx, 2
test dl, dl
jne 0x422560
xor eax, eax
jmp 0x422585
sbb eax, eax
or eax, 1
test eax, eax
jne 0x422651
push str.Properties
push edi
call sym.fixios.exe_plist_dict_get_item
add esp, 8
test eax, eax
jne 0x422603
cmp dword [0x448818], 1
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jl 0x4225c9
push ebx
push str.receive_packet
push str._s:_Could_not_get_properties_for_message__s_from_plist__n
push 2
call esi
add esp, 4
push eax
call fcn.00401090
add esp, 0x10
push 2
call esi
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push ebx
call esi
add esp, 4
mov ecx, edi
call fcn.00427a00
mov eax, 0xffffff98
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov ecx, eax
call fcn.00421fe0
test eax, eax
jne 0x422639
cmp dword [0x448818], 1
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jl 0x4225c9
push str.receive_packet
push str._s:_Could_not_create_device_record_object_from_properties__n
push 2
call esi
add esp, 4
push eax
call fcn.00401090
add esp, 0xc
jmp 0x4225c9
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], 0x11c
mov dword [ebp - 0xc], 4
mov dword [ecx], eax
jmp 0x42272d
mov ecx, str.Detached
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x422678
test dl, dl
je 0x422674
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x422678
add eax, 2
add ecx, 2
test dl, dl
jne 0x422658
xor eax, eax
jmp 0x42267d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4226bd
push str.DeviceID
push edi
call sym.fixios.exe_plist_dict_get_item
add esp, 8
test eax, eax
je 0x42272d
lea ecx, [ebp - 0x20]
push ecx
push eax
call sym.fixios.exe_plist_get_uint_val
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 4
call eax
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov dword [ebp - 0xc], 5
jmp 0x422723
mov ecx, str.Paired
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4226e4
test dl, dl
je 0x4226e0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4226e4
add eax, 2
add ecx, 2
test dl, dl
jne 0x4226c4
xor eax, eax
jmp 0x4226e9
sbb eax, eax
or eax, 1
test eax, eax
jne 0x422745
push str.DeviceID
push edi
call sym.fixios.exe_plist_dict_get_item
add esp, 8
test eax, eax
je 0x42272d
lea ecx, [ebp - 0x20]
push ecx
push eax
call sym.fixios.exe_plist_get_uint_val
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 4
call eax
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov dword [ebp - 0xc], 6
add esp, 0xc
mov dword [ebp - 0x14], 0x14
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push ebx
call esi
add esp, 4
mov ecx, edi
call fcn.00427a00
jmp 0x4227e0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
push eax
push edi
call sym.fixios.exe_plist_to_xml
mov esi, dword [ebp - 0x1c]
add esp, 0xc
cmp dword [0x448818], 1
jl 0x422789
push esi
push ebx
push str.receive_packet
push str._s:_Unexpected_message__s_in_plist:_n_s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401090
add esp, 0x14
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
jmp 0x4225dd
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 0x10
movups xmm0, xmmword [ebp - 0x14]
mov dword [ecx], edi
movups xmmword [eax], xmm0
mov eax, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov dword [ecx], eax
mov eax, dword [ebp - 0x2c]
movups xmm0, xmmword [ebp - 0x14]
mov ecx, dword [ebp - 4]
pop edi
pop esi
movups xmmword [eax], xmm0
mov eax, dword [ebp - 0x14]
xor ecx, ebp
pop ebx
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret