Function at 0x401940
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x410004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], ebx
push dword [edi + 0xc]
push dword [edi + 8]
push dword [edi + 4]
push dword [edi]
push dword [ebx]
push str.Client__d_command_len__d_ver__d_msg__d_tag__d
push 5
call fcn.004052a0
mov eax, dword [ebx + 0x28]
add esp, 0x1c
test eax, eax
je 0x4019c6
push 0
push eax
push dword [ebx]
push str.Client__d_command_received_in_the_wrong_state__got__d_but_want__d
push 1
call fcn.004052a0
mov edx, dword [edi + 0xc]
add esp, 0x14
mov ecx, ebx
push 1
call fcn.00401340
add esp, 4
test eax, eax
js 0x402854
mov ecx, ebx
call fcn.00401100
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
test eax, eax
je 0x401a03
cmp eax, 1
je 0x401a03
push eax
push dword [ebx]
push str.Client__d_version_mismatch:_expected_0_or_1__got__d
push 4
call fcn.004052a0
mov edx, dword [edi + 0xc]
mov ecx, ebx
push 6
call fcn.00401340
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 8]
mov eax, ecx
sub eax, 2
je 0x40290e
sub eax, 1
je 0x402868
sub eax, 5
je 0x401a42
push ecx
push dword [ebx]
push str.Client__d_invalid_command__d
push 1
call fcn.004052a0
mov edx, dword [edi + 0xc]
mov ecx, ebx
push 1
call fcn.00401340
add esp, 0x14
jmp 0x40295e
lea eax, [ebp - 0x30]
mov dword [ebx + 0x2c], 1
push eax
mov eax, dword [edi]
sub eax, 0x10
mov dword [ebp - 0x30], 0
push eax
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.plist.dll_plist_from_xml]
mov eax, dword [ebp - 0x30]
add esp, 0xc
test eax, eax
jne 0x401a91
push str.Could_not_parse_plist_from_payload_
push 1
call fcn.004052a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
push str.MessageType
push eax
mov dword [ebp - 0x40], 0
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x40283c
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x40283c
lea eax, [ebp - 0x40]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_string_val]
add esp, 8
cmp dword [ebp - 0x40], 0
jne 0x401ae2
push str.Could_not_extract_MessageType_from_plist_
jmp 0x402841
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edi
call dword [sym.imp.plist.dll_plist_new_dict]
push str.BundleID
push edi
mov esi, eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
test edi, edi
je 0x401b2e
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x401b2e
push edi
call dword [sym.imp.plist.dll_plist_copy]
add esp, 4
push eax
push str.BundleID
push esi
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push str.ClientVersionString
push dword [ebp - 0x2c]
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
test edi, edi
je 0x401b6e
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x401b6e
push edi
call dword [sym.imp.plist.dll_plist_copy]
add esp, 4
push eax
push str.ClientVersionString
push esi
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push str.ProgName
push dword [ebp - 0x2c]
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
test edi, edi
je 0x401bae
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x401bae
push edi
call dword [sym.imp.plist.dll_plist_copy]
add esp, 4
push eax
push str.ProgName
push esi
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push str.kLibUSBMuxVersion
push dword [ebp - 0x2c]
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
test edi, edi
je 0x401bee
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 1
jne 0x401bee
push edi
call dword [sym.imp.plist.dll_plist_copy]
add esp, 4
push eax
push str.kLibUSBMuxVersion
push esi
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push dword [ebx + 0x34]
mov edi, dword [sym.imp.plist.dll_plist_free]
call edi
mov dword [ebx + 0x34], esi
add esp, 4
mov esi, dword [ebp - 0x40]
mov ecx, str.Listen
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401c30
test dl, dl
je 0x401c2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401c30
add eax, 2
add ecx, 2
test dl, dl
jne 0x401c10
xor eax, eax
jmp 0x401c35
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401cfd
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0x30]
call edi
mov edx, dword [ebp - 0x3c]
add esp, 4
mov ecx, ebx
mov edx, dword [edx + 0xc]
push 0
call fcn.00401340
add esp, 4
test eax, eax
js 0x402854
push dword [ebx]
push str.Client__d_now_LISTENING
push 5
call fcn.004052a0
add esp, 0xc
mov dword [ebp - 0x2c], 0
lea edx, [ebp - 0x2c]
mov dword [ebx + 0x28], 1
xor ecx, ecx
call fcn.00404f50
mov edi, dword [ebp - 0x2c]
xor esi, esi
mov ebx, eax
test edi, edi
je 0x401cea
nop dword [eax]
cmp esi, ebx
jge 0x401cdc
mov ecx, dword [ebp - 0x34]
mov edx, edi
call fcn.004017f0
add edi, 0x18
test eax, eax
js 0x401cb8
inc esi
jmp 0x401ca0
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call eax
add esp, 4
or ebx, 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call eax
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov ecx, str.Connect
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401d24
test dl, dl
je 0x401d20
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401d24
add eax, 2
add ecx, 2
test dl, dl
jne 0x401d04
xor eax, eax
jmp 0x401d29
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401e37
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 4
push str.DeviceID
push dword [ebp - 0x30]
call edi
add esp, 8
test eax, eax
jne 0x401d78
push str.Received_connect_request_without_device_id_
push 1
call fcn.004052a0
push dword [ebp - 0x30]
mov eax, dword [sym.imp.plist.dll_plist_free]
call eax
mov edx, dword [ebp - 0x3c]
add esp, 0xc
mov edx, dword [edx + 0xc]
push 2
jmp 0x402954
mov esi, dword [sym.imp.plist.dll_plist_get_uint_val]
lea ecx, [ebp - 0x50]
push ecx
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x50], xmm0
call esi
mov eax, dword [ebp - 0x50]
push str.PortNumber
push dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
call edi
add esp, 0x10
test eax, eax
jne 0x401dca
push str.Received_connect_request_without_port_number_
push 1
call fcn.004052a0
push dword [ebp - 0x30]
mov eax, dword [sym.imp.plist.dll_plist_free]
call eax
mov edx, dword [ebp - 0x3c]
add esp, 0xc
mov edx, dword [edx + 0xc]
push 1
jmp 0x402954
lea ecx, [ebp - 0x50]
xorps xmm0, xmm0
push ecx
push eax
movlpd qword [ebp - 0x50], xmm0
call esi
push dword [ebp - 0x30]
mov eax, dword [sym.imp.plist.dll_plist_free]
movzx edi, word [ebp - 0x50]
call eax
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
add esp, 0xc
push edi
call esi
movzx eax, ax
push eax
push dword [ebp - 0x34]
push dword [ebx]
push str.Client__d_requesting_connection_to_device__d_port__d
push 5
call fcn.004052a0
add esp, 0x14
push ebx
push edi
call esi
mov esi, dword [ebp - 0x34]
mov edx, eax
mov ecx, esi
call fcn.00403c10
mov edx, dword [ebp - 0x3c]
add esp, 4
mov ecx, dword [edx + 0xc]
test eax, eax
js 0x40294f
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x24], esi
jmp 0x40297f
mov ecx, str.ListDevices
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401e60
test dl, dl
je 0x401e5c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401e60
add eax, 2
add ecx, 2
test dl, dl
jne 0x401e40
xor eax, eax
jmp 0x401e65
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401f94
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0x30]
call edi
mov edx, dword [ebp - 0x3c]
add esp, 4
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.plist.dll_plist_new_dict]
call eax
mov dword [ebp - 0x3c], eax
call dword [sym.imp.plist.dll_plist_new_array]
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x38], eax
xor ecx, ecx
mov dword [ebp - 0x2c], 0
call fcn.00404f50
mov edi, dword [ebp - 0x2c]
mov ecx, eax
xor esi, esi
mov dword [ebp - 0x44], ecx
test edi, edi
je 0x401ef2
mov ebx, dword [ebp - 0x38]
nop dword [eax]
cmp esi, ecx
jge 0x401ee3
mov ecx, edi
call fcn.00401440
add edi, 0x18
test eax, eax
je 0x401edd
push eax
push ebx
call dword [sym.imp.plist.dll_plist_array_append_item]
add esp, 8
mov ecx, dword [ebp - 0x44]
inc esi
jmp 0x401ec0
push dword [ebp - 0x2c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebx, dword [ebp - 0x34]
add esp, 4
push dword [ebp - 0x38]
mov edi, dword [ebp - 0x3c]
push str.DeviceList
push edi
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [ebp - 0x2c]
add esp, 0xc
test eax, eax
je 0x401f61
push dword [ebp - 0x34]
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
push eax
push 8
call fcn.00401250
add esp, 0xc
mov esi, eax
push dword [ebp - 0x2c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [sym.imp.plist.dll_plist_free]
add esp, 4
push edi
call eax
add esp, 4
test esi, esi
jmp 0x402960
push str.send_plist_pkt
push str._s:_Could_not_convert_plist_to_xml
push 1
call fcn.004052a0
mov eax, dword [sym.imp.plist.dll_plist_free]
add esp, 0xc
push edi
call eax
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov ecx, str.ListListeners
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401fc0
test dl, dl
je 0x401fbc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401fc0
add eax, 2
add ecx, 2
test dl, dl
jne 0x401fa0
xor eax, eax
jmp 0x401fc5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401fed
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0x30]
call edi
mov edx, dword [ebp - 0x3c]
add esp, 4
mov ecx, ebx
mov edx, dword [edx + 0xc]
call fcn.00401540
jmp 0x40295e
mov ecx, str.ReadBUID
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402014
test dl, dl
je 0x402010
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402014
add eax, 2
add ecx, 2
test dl, dl
jne 0x401ff4
xor eax, eax
jmp 0x402019
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4020d8
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
push dword [ebp - 0x30]
call edi
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
add esp, 4
mov dword [ebp - 0x2c], 0
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x4c], eax
call fcn.00403110
mov eax, dword [sym.imp.plist.dll_plist_new_dict]
call eax
push dword [ebp - 0x2c]
mov edi, eax
call dword [sym.imp.plist.dll_plist_new_string]
add esp, 4
push eax
push str.BUID
push edi
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push dword [ebp - 0x2c]
call esi
add esp, 4
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
lea eax, [ebp - 0x38]
push eax
push edi
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [ebp - 0x38]
add esp, 0xc
test eax, eax
je 0x401f61
push dword [ebp - 0x34]
mov edx, dword [ebp - 0x4c]
mov ecx, ebx
push eax
push 8
call fcn.00401250
add esp, 0xc
mov esi, eax
push dword [ebp - 0x38]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [sym.imp.plist.dll_plist_free]
add esp, 4
push edi
call eax
add esp, 4
test esi, esi
jmp 0x402960
mov ecx, str.ReadPairRecord
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402100
test dl, dl
je 0x4020fc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402100
add eax, 2
add ecx, 2
test dl, dl
jne 0x4020e0
xor eax, eax
jmp 0x402105
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402359
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
call edi
mov esi, dword [ebp - 0x30]
add esp, 4
test esi, esi
je 0x402332
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 5
jne 0x40232f
push str.PairRecordID
push esi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x40232a
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x40232a
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0
push eax
mov eax, dword [sym.imp.plist.dll_plist_get_string_val]
push esi
call eax
push dword [ebp - 0x30]
mov eax, dword [sym.imp.plist.dll_plist_free]
call eax
mov edx, dword [ebp - 0x3c]
add esp, 0xc
cmp dword [ebp - 0x38], 0
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
movlpd qword [ebp - 0x58], xmm0
mov esi, dword [edx + 0xc]
je 0x402342
call fcn.00402ea0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x4c], eax
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat32]
add esp, 8
test eax, eax
je 0x4021c4
mov ecx, dword [ebp - 0x4c]
call fcn.00403060
call fcn.00402ea0
push 0
push str..plist
push dword [ebp - 0x38]
push 0x40ad30
push eax
call fcn.00408550
add esp, 0x14
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x2c]
push ecx
mov ecx, eax
call fcn.00408630
add esp, 4
cmp dword [ebp - 0x2c], 0
jne 0x40221f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [ebp - 0x34]
push str.ERROR:_Failed_to_read__s:__s
push 1
call fcn.004052a0
add esp, 0x10
push dword [ebp - 0x34]
call edi
add esp, 4
cmp dword [ebp - 0x2c], 0
je 0x402305
mov eax, dword [sym.imp.plist.dll_plist_new_dict]
call eax
push dword [ebp - 0x54]
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x58]
push dword [ebp - 0x2c]
call dword [sym.imp.plist.dll_plist_new_data]
add esp, 0xc
push eax
push str.PairRecordData
push dword [ebp - 0x3c]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push dword [ebp - 0x2c]
call edi
add esp, 4
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
or edi, 0xffffffff
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x3c]
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [ebp - 0x2c]
add esp, 0xc
test eax, eax
je 0x4022d0
push dword [ebp - 0x34]
mov edx, esi
mov ecx, ebx
push eax
push 8
call fcn.00401250
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
mov edi, eax
push dword [ebp - 0x2c]
call esi
add esp, 4
push dword [ebp - 0x3c]
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
push dword [ebp - 0x38]
call esi
add esp, 4
test edi, edi
jmp 0x402960
push str.send_plist_pkt
push str._s:_Could_not_convert_plist_to_xml
push 1
call fcn.004052a0
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
push dword [ebp - 0x3c]
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
push dword [ebp - 0x38]
call esi
add esp, 4
test edi, edi
jmp 0x402960
push 2
mov edx, esi
mov ecx, ebx
call fcn.00401340
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov edi, eax
push dword [ebp - 0x38]
call esi
add esp, 4
test edi, edi
jmp 0x402960
push dword [ebp - 0x30]
jmp 0x402333
mov esi, dword [ebp - 0x30]
push esi
call dword [sym.imp.plist.dll_plist_free]
mov edx, dword [ebp - 0x3c]
add esp, 4
mov esi, dword [edx + 0xc]
push 0x16
mov edx, esi
mov ecx, ebx
call fcn.00401340
mov edi, eax
add esp, 4
test edi, edi
jmp 0x402960
mov ecx, str.SavePairRecord
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402380
test dl, dl
je 0x40237c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402380
add eax, 2
add ecx, 2
test dl, dl
jne 0x402360
xor eax, eax
jmp 0x402385
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402693
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [ebp - 0x30]
add esp, 4
test esi, esi
je 0x4023ea
mov edi, dword [sym.imp.plist.dll_plist_get_node_type]
push esi
call edi
add esp, 4
cmp eax, 5
jne 0x4023ea
push str.PairRecordID
push esi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x4023ea
push esi
call edi
add esp, 4
cmp eax, 3
jne 0x4023ea
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
mov eax, dword [sym.imp.plist.dll_plist_get_string_val]
push esi
call eax
mov edi, dword [ebp - 0x44]
add esp, 8
jmp 0x4023ec
xor edi, edi
push str.PairRecordData
push dword [ebp - 0x30]
xorps xmm0, xmm0
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], 0
movlpd qword [ebp - 0x60], xmm0
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x402436
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 7
jne 0x402436
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_data_val]
add esp, 0xc
mov eax, dword [ebp - 0x34]
test edi, edi
je 0x40266a
test eax, eax
je 0x40266a
mov ecx, dword [ebp - 0x60]
xor esi, esi
cmp dword [ebp - 0x5c], esi
ja 0x40245c
cmp ecx, 8
jb 0x402650
cmp dword [eax], 0x696c7062
mov dword [ebp - 0x38], esi
jne 0x40247e
cmp dword [eax + 4], 0x30307473
jne 0x40247e
lea edx, [ebp - 0x38]
push edx
push ecx
push eax
call dword [sym.imp.plist.dll_plist_from_bin]
jmp 0x40248a
lea edx, [ebp - 0x38]
push edx
push ecx
push eax
call dword [sym.imp.plist.dll_plist_from_xml]
mov eax, dword [ebp - 0x38]
add esp, 0xc
test eax, eax
je 0x402650
push eax
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 5
jne 0x40263f
call fcn.00402ea0
mov edi, eax
lea eax, [ebp - 0x28]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat32]
add esp, 8
test eax, eax
je 0x4024cb
mov ecx, edi
call fcn.00403060
call fcn.00402ea0
push 0
push str..plist
push dword [ebp - 0x2c]
push 0x40ad30
push eax
call fcn.00408550
add esp, 0x14
mov edi, eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
mov ecx, dword [ebp - 0x38]
mov edx, edi
call fcn.004087c0
add esp, 4
test eax, eax
jne 0x402529
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push edi
push str.Could_not_open__s_for_writing:__s
push 5
call fcn.004052a0
add esp, 0x10
mov esi, 0xfffffffe
push edi
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call edi
mov eax, dword [ebp - 0x38]
add esp, 4
test eax, eax
je 0x402546
push eax
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
test esi, esi
js 0x40265b
push str.DeviceID
push dword [ebp - 0x30]
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x402630
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 1
jne 0x402630
lea eax, [ebp - 0x58]
xorps xmm0, xmm0
push eax
push esi
movlpd qword [ebp - 0x58], xmm0
call dword [sym.imp.plist.dll_plist_get_uint_val]
add esp, 8
cmp dword [ebp - 0x58], 0
jbe 0x402630
lea edx, [ebp - 0x38]
mov dword [ebp - 0x38], 0
mov ecx, 1
call fcn.00404f50
mov esi, dword [ebp - 0x38]
xor edi, edi
mov dword [ebp - 0x4c], eax
test esi, esi
je 0x40260d
nop dword [eax]
cmp edi, eax
jge 0x40260d
mov eax, dword [ebp - 0x58]
cmp dword [esi], eax
jne 0x4025fa
mov ecx, dword [ebp - 0x2c]
mov eax, dword [esi + 4]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4025f1
test dl, dl
je 0x4025ed
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4025f1
add eax, 2
add ecx, 2
test dl, dl
jne 0x4025d1
xor eax, eax
jmp 0x4025f6
sbb eax, eax
or eax, 1
test eax, eax
je 0x402603
mov eax, dword [ebp - 0x4c]
inc edi
add esi, 0x18
jmp 0x4025c0
mov ecx, dword [ebp - 0x58]
call fcn.00402d30
jmp 0x402622
push dword [ebp - 0x2c]
push dword [ebp - 0x58]
push str.ERROR:_SavePairRecord:_DeviceID__d___s__is_not_connected_n
push 1
call fcn.004052a0
add esp, 0x10
push dword [ebp - 0x38]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call edi
add esp, 4
push dword [ebp - 0x2c]
xor esi, esi
call edi
mov eax, dword [ebp - 0x34]
add esp, 4
jmp 0x402675
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x402650
push eax
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, 0xffffffea
push dword [ebp - 0x2c]
neg esi
call edi
mov eax, dword [ebp - 0x34]
add esp, 4
jmp 0x402675
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, 0x16
push eax
call edi
add esp, 4
push dword [ebp - 0x30]
call dword [sym.imp.plist.dll_plist_free]
mov edx, dword [ebp - 0x3c]
add esp, 4
mov edx, dword [edx + 0xc]
push esi
jmp 0x402954
mov ecx, str.DeletePairRecord
mov eax, esi
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4026c0
test dl, dl
je 0x4026bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4026c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4026a0
xor eax, eax
jmp 0x4026c5
sbb eax, eax
or eax, 1
push esi
test eax, eax
jne 0x40280c
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [ebp - 0x30]
add esp, 4
test esi, esi
je 0x4027f6
mov edi, dword [sym.imp.plist.dll_plist_get_node_type]
push esi
call edi
add esp, 4
cmp eax, 5
jne 0x4027ed
push str.PairRecordID
push esi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x4027d1
push esi
call edi
add esp, 4
cmp eax, 3
jne 0x4027d1
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
mov eax, dword [sym.imp.plist.dll_plist_get_string_val]
push esi
call eax
push dword [ebp - 0x30]
mov esi, dword [ebp - 0x34]
call dword [sym.imp.plist.dll_plist_free]
add esp, 0xc
test esi, esi
je 0x4027fc
xor edi, edi
call fcn.00402ea0
push edi
push str..plist
push esi
push 0x40ad30
push eax
call fcn.00408550
add esp, 0x14
mov dword [ebp - 0x44], eax
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
test eax, eax
je 0x4027a5
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call esi
mov edi, dword [eax]
neg edi
call esi
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [ebp - 0x44]
push str.Could_not_remove__s:__s
push 5
call fcn.004052a0
mov esi, dword [ebp - 0x34]
add esp, 0x10
push dword [ebp - 0x44]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [ebp - 0x3c]
mov eax, edi
neg eax
xor ecx, ecx
add esp, 4
test edi, edi
mov edx, dword [edx + 0xc]
cmovns eax, ecx
jmp 0x402953
push dword [ebp - 0x30]
call dword [sym.imp.plist.dll_plist_free]
mov edx, dword [ebp - 0x3c]
add esp, 4
mov eax, 0x16
mov edx, dword [edx + 0xc]
jmp 0x402953
mov esi, dword [ebp - 0x30]
mov edi, dword [sym.imp.plist.dll_plist_free]
push esi
call edi
add esp, 4
mov edx, dword [ebp - 0x3c]
mov eax, 0x16
mov edx, dword [edx + 0xc]
jmp 0x402953
push str.Unexpected_command__s_received_
push 1
call fcn.004052a0
add esp, 0xc
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0x30]
call edi
mov edx, dword [ebp - 0x3c]
add esp, 4
mov edx, dword [edx + 0xc]
push 1
jmp 0x402954
push str.Could_not_read_valid_MessageType_node_from_plist_
push 1
call fcn.004052a0
push dword [ebp - 0x30]
call dword [sym.imp.plist.dll_plist_free]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0xc]
mov ecx, ebx
push 0
call fcn.00401340
add esp, 4
test eax, eax
js 0x402854
push dword [ebx]
push str.Client__d_now_LISTENING
push 5
call fcn.004052a0
add esp, 0xc
mov dword [ebp - 0x40], 0
lea edx, [ebp - 0x40]
mov dword [ebx + 0x28], 1
xor ecx, ecx
call fcn.00404f50
mov edi, dword [ebp - 0x40]
xor esi, esi
mov ebx, eax
test edi, edi
je 0x401cea
cmp esi, ebx
jge 0x4028ee
mov ecx, dword [ebp - 0x34]
mov edx, edi
call fcn.004017f0
add edi, 0x18
test eax, eax
js 0x4028cb
inc esi
jmp 0x4028b3
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
or ebx, 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
movzx eax, word [edi + 0x14]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
push eax
call esi
movzx eax, ax
push eax
push dword [edi + 0x10]
push dword [ebx]
push str.Client__d_connection_request_to_device__d_port__d
push 5
call fcn.004052a0
movzx eax, word [edi + 0x14]
add esp, 0x14
push ebx
push eax
call esi
mov ecx, dword [edi + 0x10]
mov edx, eax
call fcn.00403c10
mov ecx, dword [edi + 0xc]
add esp, 4
test eax, eax
jns 0x402976
neg eax
mov edx, ecx
push eax
mov ecx, ebx
call fcn.00401340
add esp, 4
test eax, eax
jns 0x402986
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408942
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x20], ecx
mov eax, dword [edi + 0x10]
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x28], 2
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408942
mov esp, ebp
pop ebp
ret