Function at 0x140001ef0
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xc0
mov rax, qword [0x140012008]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov eax, dword [rdx + 0xc]
mov r14, rdx
mov r9d, dword [rdx]
mov rsi, rcx
mov r8d, dword [rcx]
mov ecx, 5
mov dword [rsp + 0x30], eax
mov eax, dword [rdx + 8]
mov dword [rsp + 0x28], eax
mov eax, dword [rdx + 4]
lea rdx, str.Client__d_command_len__d_ver__d_msg__d_tag__d
mov dword [rsp + 0x20], eax
call fcn.140005ad0
mov r9d, dword [rsi + 0x34]
test r9d, r9d
je 0x140001f96
mov r8d, dword [rsi]
lea rdx, str.Client__d_command_received_in_the_wrong_state__got__d_but_want__d
xor edi, edi
mov qword [rsp + 0x20], rdi
lea ecx, [rdi + 1]
call fcn.140005ad0
mov edx, dword [r14 + 0xc]
lea r8d, [rdi + 1]
mov rcx, rsi
call fcn.140001760
test eax, eax
js 0x140002e1a
mov rcx, rsi
call fcn.1400013f0
lea eax, [rdi - 1]
jmp 0x140002e34
mov r9d, dword [r14 + 4]
cmp r9d, 2
jb 0x140001fcb
mov r8d, dword [rsi]
lea rdx, str.Client__d_version_mismatch:_expected_0_or_1__got__d
mov ecx, 4
call fcn.140005ad0
mov edx, dword [r14 + 0xc]
mov r8d, 6
mov rcx, rsi
call fcn.140001760
jmp 0x140002e32
mov r9d, dword [r14 + 8]
mov eax, r9d
sub eax, 2
je 0x140002dbb
sub eax, 1
je 0x140002d43
cmp eax, 5
je 0x14000200c
mov r8d, dword [rsi]
lea rdx, str.Client__d_invalid_command__d
mov ecx, 1
call fcn.140005ad0
mov edx, dword [r14 + 0xc]
mov r8d, 1
jmp 0x140002e0e
mov dword [rsi + 0x38], 1
lea rcx, [r14 + 0x10]
mov edx, dword [r14]
lea r8, [rbp - 0x59]
xor edi, edi
sub edx, 0x10
mov qword [rbp - 0x59], rdi
call qword [sym.imp.plist.dll_plist_from_xml]
mov rcx, qword [rbp - 0x59]
test rcx, rcx
jne 0x14000204d
lea rdx, str.Could_not_parse_plist_from_payload_
lea ecx, [rdi + 1]
call fcn.140005ad0
lea eax, [rdi - 1]
jmp 0x140002e34
lea rdx, str.MessageType
mov qword [rbp - 0x31], rdi
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov rbx, rax
test rax, rax
je 0x140002d1e
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002d1e
lea rdx, [rbp - 0x31]
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_string_val]
cmp qword [rbp - 0x31], rdi
jne 0x1400020b4
lea rdx, str.Could_not_extract_MessageType_from_plist_
mov ecx, 1
call fcn.140005ad0
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov eax, 0xffffffff
jmp 0x140002e34
mov r15, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_new_dict]
lea rdx, str.BundleID
mov rcx, r15
mov rbx, rax
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov r12, rax
test rax, rax
je 0x140002103
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002103
mov rcx, r12
call qword [sym.imp.plist.dll_plist_copy]
lea rdx, str.BundleID
mov rcx, rbx
mov r8, rax
call qword [sym.imp.plist.dll_plist_dict_set_item]
lea rdx, str.ClientVersionString
mov rcx, r15
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov r12, rax
test rax, rax
je 0x140002145
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002145
mov rcx, r12
call qword [sym.imp.plist.dll_plist_copy]
lea rdx, str.ClientVersionString
mov rcx, rbx
mov r8, rax
call qword [sym.imp.plist.dll_plist_dict_set_item]
lea rdx, str.ProgName
mov rcx, r15
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov r12, rax
test rax, rax
je 0x140002187
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002187
mov rcx, r12
call qword [sym.imp.plist.dll_plist_copy]
lea rdx, str.ProgName
mov rcx, rbx
mov r8, rax
call qword [sym.imp.plist.dll_plist_dict_set_item]
lea rdx, str.kLibUSBMuxVersion
mov rcx, r15
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov r15, rax
test rax, rax
je 0x1400021c9
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 1
jne 0x1400021c9
mov rcx, r15
call qword [sym.imp.plist.dll_plist_copy]
lea rdx, str.kLibUSBMuxVersion
mov rcx, rbx
mov r8, rax
call qword [sym.imp.plist.dll_plist_dict_set_item]
mov rcx, qword [rsi + 0x40]
call qword [sym.imp.plist.dll_plist_free]
mov qword [rsi + 0x40], rbx
lea rdx, str.Listen
mov rbx, qword [rbp - 0x31]
mov rcx, rdi
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400022a0
cmp rcx, 7
jne 0x1400021e5
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
xor r8d, r8d
mov rcx, rsi
call fcn.140001760
test eax, eax
js 0x140002e1a
mov r8d, dword [rsi]
lea rdx, str.Client__d_now_LISTENING
mov ecx, 5
call fcn.140005ad0
lea rdx, [rbp - 0x49]
mov qword [rbp - 0x49], rdi
xor ecx, ecx
mov dword [rsi + 0x34], 1
call fcn.140005960
mov r15, qword [rbp - 0x49]
mov ebx, eax
mov r14, r15
test r15, r15
je 0x140002299
nop
cmp edi, ebx
jge 0x140002290
mov rdx, r14
mov rcx, rsi
call fcn.140001cc0
add r14, 0x20
test eax, eax
js 0x14000227b
inc edi
jmp 0x140002260
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebx, 0xffffffff
mov eax, ebx
jmp 0x140002e34
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, ebx
jmp 0x140002e34
mov rcx, rdi
lea rdx, str.Connect
nop word [rax + rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400023d6
cmp rcx, 8
jne 0x1400022b0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
lea rdx, str.DeviceID
call qword [sym.imp.plist.dll_plist_dict_get_item]
test rax, rax
jne 0x14000230e
lea rdx, str.Received_connect_request_without_device_id_
lea ecx, [rax + 1]
call fcn.140005ad0
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
mov r8d, 2
jmp 0x140002e0e
lea rdx, [rbp - 0x51]
mov qword [rbp - 0x51], rdi
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_uint_val]
mov rcx, qword [rbp - 0x59]
lea rdx, str.PortNumber
mov r15d, dword [rbp - 0x51]
call qword [sym.imp.plist.dll_plist_dict_get_item]
test rax, rax
jne 0x140002361
lea rdx, str.Received_connect_request_without_port_number_
lea ecx, [rax + 1]
call fcn.140005ad0
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
mov r8d, 1
jmp 0x140002e0e
lea rdx, [rbp - 0x51]
mov qword [rbp - 0x51], rdi
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_uint_val]
mov rcx, qword [rbp - 0x59]
movzx ebx, word [rbp - 0x51]
call qword [sym.imp.plist.dll_plist_free]
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov r8d, dword [rsi]
lea rdx, str.Client__d_requesting_connection_to_device__d_port__d
movzx eax, ax
mov r9d, r15d
mov ecx, 5
mov dword [rsp + 0x20], eax
call fcn.140005ad0
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov r8, rsi
mov ecx, r15d
movzx edx, ax
call fcn.1400042e0
mov ecx, dword [r14 + 0xc]
test eax, eax
js 0x140002e07
mov dword [rsi + 0x2c], ecx
mov dword [rsi + 0x30], r15d
jmp 0x140002e2b
lea rdx, str.ListDevices
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
mov rcx, rbx
test eax, eax
jne 0x1400024f9
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov eax, dword [r14 + 0xc]
mov dword [rbp - 0x51], eax
call qword [sym.imp.plist.dll_plist_new_dict]
mov r13, rax
call qword [sym.imp.plist.dll_plist_new_array]
lea rdx, [rbp - 0x41]
mov qword [rbp - 0x41], rdi
xor ecx, ecx
mov r15, rax
call fcn.140005960
mov r14, qword [rbp - 0x41]
mov r12d, eax
mov ebx, edi
test r14, r14
je 0x140002466
cmp ebx, r12d
jge 0x14000245c
mov rcx, r14
call fcn.140001830
add r14, 0x20
test rax, rax
je 0x140002458
mov rdx, rax
mov rcx, r15
call qword [sym.imp.plist.dll_plist_array_append_item]
inc ebx
jmp 0x140002436
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, r15
lea rdx, str.DeviceList
mov rcx, r13
call qword [sym.imp.plist.dll_plist_dict_set_item]
lea r8, [rbp - 0x41]
mov qword [rbp - 0x49], rdi
lea rdx, [rbp - 0x49]
mov dword [rbp - 0x41], edi
mov rcx, r13
call qword [sym.imp.plist.dll_plist_to_xml]
mov r9, qword [rbp - 0x49]
test r9, r9
je 0x1400024ce
mov eax, dword [rbp - 0x41]
mov r8d, 8
mov edx, dword [rbp - 0x51]
mov rcx, rsi
mov dword [rsp + 0x20], eax
call fcn.140001580
mov rcx, qword [rbp - 0x49]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
call qword [sym.imp.plist.dll_plist_free]
test ebx, ebx
jmp 0x140002e18
lea r8, str.send_plist_pkt
mov ecx, 1
lea rdx, str._s:_Could_not_convert_plist_to_xml
call fcn.140005ad0
mov rcx, r13
call qword [sym.imp.plist.dll_plist_free]
mov eax, 0xffffffff
jmp 0x140002e34
lea rdx, str.ListListeners
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
mov rcx, rbx
test eax, eax
jne 0x14000252d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
mov rcx, rsi
call fcn.140001970
jmp 0x140002e16
lea rdx, str.ReadBUID
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
mov rcx, rbx
test eax, eax
jne 0x1400025b4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov ebx, dword [r14 + 0xc]
lea rcx, [rbp - 0x49]
mov qword [rbp - 0x49], rdi
call fcn.140003a40
call qword [sym.imp.plist.dll_plist_new_dict]
mov rcx, qword [rbp - 0x49]
mov rdi, rax
call qword [sym.imp.plist.dll_plist_new_string]
lea rdx, str.BUID
mov rcx, rdi
mov r8, rax
call qword [sym.imp.plist.dll_plist_dict_set_item]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, rdi
mov edx, ebx
mov rcx, rsi
call fcn.1400016c0
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.plist.dll_plist_free]
test ebx, ebx
jmp 0x140002e18
lea rdx, str.ReadPairRecord
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
mov rcx, rbx
test eax, eax
jne 0x140002792
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbp - 0x59]
test rbx, rbx
je 0x14000276b
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 5
jne 0x140002767
lea rdx, str.PairRecordID
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov rbx, rax
test rax, rax
je 0x140002761
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002761
lea rdx, [rbp - 0x49]
mov qword [rbp - 0x49], rdi
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_string_val]
mov rcx, qword [rbp - 0x59]
mov r15, qword [rbp - 0x49]
call qword [sym.imp.plist.dll_plist_free]
mov r14d, dword [r14 + 0xc]
mov qword [rbp - 0x51], rdi
mov qword [rbp - 0x41], rdi
test r15, r15
je 0x140002778
call fcn.140003450
lea rdx, [rbp - 0x19]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
test eax, eax
je 0x140002673
mov rcx, rbx
call fcn.140003660
call fcn.140003450
lea r9, str..plist
mov qword [rsp + 0x20], rdi
mov r8, r15
lea rdx, [0x14000c190]
mov rcx, rax
call fcn.1400092b0
lea r8, [rbp - 0x41]
mov rcx, rax
lea rdx, [rbp - 0x51]
mov rbx, rax
call fcn.140009400
mov rdi, qword [rbp - 0x51]
test rdi, rdi
jne 0x1400026d5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov r8, rbx
lea rdx, str.ERROR:_Failed_to_read__s:__s
mov r9, rax
lea ecx, [rdi + 1]
call fcn.140005ad0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test rdi, rdi
je 0x14000273e
call qword [sym.imp.plist.dll_plist_new_dict]
mov rdx, qword [rbp - 0x41]
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.plist.dll_plist_new_data]
lea rdx, str.PairRecordData
mov rcx, rbx
mov r8, rax
call qword [sym.imp.plist.dll_plist_dict_set_item]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, rbx
mov edx, r14d
mov rcx, rsi
call fcn.1400016c0
mov rcx, rbx
mov edi, eax
call qword [sym.imp.plist.dll_plist_free]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test edi, edi
jmp 0x140002e18
mov r8d, 2
mov edx, r14d
mov rcx, rsi
call fcn.140001760
mov rcx, r15
mov edi, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test edi, edi
jmp 0x140002e18
mov rcx, qword [rbp - 0x59]
jmp 0x14000276e
mov rbx, qword [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_free]
mov r14d, dword [r14 + 0xc]
mov r8d, socket
mov edx, r14d
mov rcx, rsi
call fcn.140001760
mov edi, eax
test eax, eax
jmp 0x140002e18
lea rdx, str.SavePairRecord
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
mov rcx, rbx
test eax, eax
jne 0x140002ba8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbp - 0x59]
test rbx, rbx
je 0x140002803
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 5
jne 0x140002803
lea rdx, str.PairRecordID
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov rbx, rax
test rax, rax
je 0x140002803
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002803
lea rdx, [rbp - 0x41]
mov qword [rbp - 0x41], rdi
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_string_val]
mov r13, qword [rbp - 0x41]
jmp 0x140002806
mov r13, rdi
mov rcx, qword [rbp - 0x59]
lea rdx, str.PairRecordData
mov qword [rbp - 0x49], rdi
mov qword [rbp - 0x29], rdi
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov rbx, rax
test rax, rax
je 0x140002846
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 7
jne 0x140002846
lea r8, [rbp - 0x29]
mov rcx, rbx
lea rdx, [rbp - 0x49]
call qword [sym.imp.plist.dll_plist_get_data_val]
mov rcx, qword [rbp - 0x49]
test r13, r13
je 0x140002b87
test rcx, rcx
je 0x140002b87
mov rax, qword [rbp - 0x29]
mov ebx, edi
cmp rax, 8
jb 0x140002b6f
movabs rdx, 0x30307473696c7062
mov qword [rbp - 0x51], rdi
cmp qword [rcx], rdx
lea r8, [rbp - 0x51]
mov edx, eax
jne 0x14000288d
call qword [sym.imp.plist.dll_plist_from_bin]
jmp 0x140002893
call qword [sym.imp.plist.dll_plist_from_xml]
mov rcx, qword [rbp - 0x51]
test rcx, rcx
je 0x140002b6f
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 5
jne 0x140002b60
call fcn.140003450
lea rdx, [rbp - 0x19]
mov rcx, rax
mov r15, rax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
test eax, eax
je 0x1400028d0
mov rcx, r15
call fcn.140003660
call fcn.140003450
lea r9, str..plist
mov qword [rsp + 0x20], rdi
mov r8, r13
lea rdx, [0x14000c190]
mov rcx, rax
call fcn.1400092b0
mov rcx, rax
mov r15, rax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
mov rcx, qword [rbp - 0x51]
mov rdx, r15
call fcn.140009510
test eax, eax
jne 0x140002939
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov r8, r15
lea rdx, str.Could_not_open__s_for_writing:__s
mov r9, rax
mov ecx, 5
call fcn.140005ad0
mov ebx, 0xfffffffe
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x51]
test rcx, rcx
je 0x140002951
call qword [sym.imp.plist.dll_plist_free]
test ebx, ebx
js 0x140002b74
mov rcx, qword [rbp - 0x59]
lea rdx, str.DeviceID
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov rbx, rax
test rax, rax
je 0x140002b78
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 1
jne 0x140002b78
lea rdx, [rbp - 0x51]
mov qword [rbp - 0x51], rdi
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_uint_val]
cmp dword [rbp - 0x51], edi
jbe 0x140002b78
lea rcx, [0x1400128f0]
mov r12d, edi
call qword [sym.imp.pthreadVC3.dll_pthread_mutex_lock]
mov r15d, dword [0x140012850]
movsxd rbx, r15d
lea rcx, [rbx*8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
movsxd r8, dword [0x140012850]
mov rcx, rax
mov rdx, qword [0x140012848]
shl r8, 3
mov qword [rbp - 0x39], rax
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [0x1400128f0]
call qword [sym.imp.pthreadVC3.dll_pthread_mutex_unlock]
shl rbx, 5
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, qword [rbp - 0x39]
mov qword [rbp - 0x21], rax
test r15d, r15d
jle 0x140002ab6
lea r9, [rax + 0x10]
mov r10, rbx
mov r11d, r15d
nop dword [rax]
mov r8, qword [r10]
test r8, r8
je 0x140002aa8
cmp dword [r8 + 0xc], 1
jne 0x140002aa8
mov eax, dword [r8 + 8]
mov rdx, rdi
mov dword [r9 - 0x10], eax
mov rax, qword [r8]
cmp qword [rax], rdx
lea rcx, [rax + 0xa]
cmovne rdx, rcx
mov qword [r9 - 8], rdx
mov rax, qword [r8]
cmp qword [rax], rdi
jne 0x140002a60
mov ecx, edi
jmp 0x140002a6d
movzx ecx, byte [rax + 8]
movzx eax, byte [rax + 9]
shl ecx, 0x10
or ecx, eax
mov dword [r9], ecx
mov rax, qword [r8]
cmp qword [rax], rdi
jne 0x140002a7d
movzx eax, di
jmp 0x140002a84
movzx eax, word [rax + 0x152]
mov word [r9 + 4], ax
mov rax, qword [r8]
cmp qword [rax], rdi
jne 0x140002a96
mov rax, rdi
jmp 0x140002a9d
mov rax, qword [rax + 0x140]
inc r12d
mov qword [r9 + 8], rax
add r9, 0x20
add r10, 8
sub r11, 1
jne 0x140002a20
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbp - 0x21]
mov r10d, edi
mov r9, rbx
test rbx, rbx
je 0x140002b30
mov r11, qword [rbp - 0x51]
cmp r10d, r12d
jge 0x140002b30
cmp dword [r9], r11d
jne 0x140002b07
mov rax, qword [r9 + 8]
mov r8, r13
sub r8, rax
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140002b03
inc rax
test ecx, ecx
jne 0x140002af0
test edx, edx
je 0x140002b10
inc r10d
add r9, 0x20
jmp 0x140002ad2
mov ecx, r11d
call fcn.140003320
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x49]
jmp 0x140002b8c
mov r8d, dword [rbp - 0x51]
lea rdx, str.ERROR:_SavePairRecord:_DeviceID__d___s__is_not_connected_n
mov r9, r13
mov ecx, 1
call fcn.140005ad0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x49]
jmp 0x140002b8c
mov rcx, qword [rbp - 0x51]
test rcx, rcx
je 0x140002b6f
call qword [sym.imp.plist.dll_plist_free]
mov ebx, 0xffffffea
neg ebx
mov edi, ebx
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x49]
jmp 0x140002b8c
mov edi, socket
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
mov r8d, edi
jmp 0x140002e0e
lea rdx, str.DeletePairRecord
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x140002ce7
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbp - 0x59]
test rbx, rbx
je 0x140002ccf
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 5
jne 0x140002ccb
lea rdx, str.PairRecordID
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_dict_get_item]
mov rbx, rax
test rax, rax
je 0x140002cc5
mov rcx, rax
call qword [sym.imp.plist.dll_plist_get_node_type]
cmp eax, 3
jne 0x140002cc5
lea rdx, [rbp - 0x39]
mov qword [rbp - 0x39], rdi
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_get_string_val]
mov rcx, qword [rbp - 0x59]
mov r15, qword [rbp - 0x39]
call qword [sym.imp.plist.dll_plist_free]
test r15, r15
je 0x140002cd8
mov ebx, edi
call fcn.140003450
lea r9, str..plist
mov qword [rsp + 0x20], rdi
mov r8, r15
lea rdx, [0x14000c190]
mov rcx, rax
call fcn.1400092b0
mov rcx, rax
mov r12, rax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
test eax, eax
je 0x140002c9e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [rax]
neg ebx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov r8, r12
lea rdx, str.Could_not_remove__s:__s
mov r9, rax
mov ecx, 5
call fcn.140005ad0
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [r14 + 0xc]
mov r8d, ebx
neg r8d
test ebx, ebx
cmovns r8d, edi
jmp 0x140002e0e
mov rcx, qword [rbp - 0x59]
jmp 0x140002cd2
mov rbx, qword [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
mov r8d, socket
jmp 0x140002e0e
mov r8, rbx
lea rdx, str.Unexpected_command__s_received_
mov ecx, 1
call fcn.140005ad0
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov edx, dword [r14 + 0xc]
mov r8d, 1
jmp 0x140002e0e
lea rdx, str.Could_not_read_valid_MessageType_node_from_plist_
mov ecx, 1
call fcn.140005ad0
mov rcx, qword [rbp - 0x59]
call qword [sym.imp.plist.dll_plist_free]
mov eax, 0xffffffff
jmp 0x140002e34
mov edx, dword [r14 + 0xc]
xor r8d, r8d
mov rcx, rsi
call fcn.140001760
test eax, eax
js 0x140002e1a
mov r8d, dword [rsi]
lea rdx, str.Client__d_now_LISTENING
mov ecx, 5
call fcn.140005ad0
xor edi, edi
mov dword [rsi + 0x34], 1
lea rdx, [rbp - 0x39]
mov qword [rbp - 0x39], rdi
xor ecx, ecx
call fcn.140005960
mov r15, qword [rbp - 0x39]
mov ebx, eax
mov r14, r15
test r15, r15
je 0x140002299
cmp edi, ebx
jge 0x140002290
mov rdx, r14
mov rcx, rsi
call fcn.140001cc0
add r14, 0x20
test eax, eax
js 0x14000227b
inc edi
jmp 0x140002d98
movzx ecx, word [r14 + 0x14]
call qword [sym.imp.WS2_32.dll_ntohs]
mov r9d, dword [r14 + 0x10]
lea rdx, str.Client__d_connection_request_to_device__d_port__d
mov r8d, dword [rsi]
mov ecx, 5
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140005ad0
movzx ecx, word [r14 + 0x14]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [r14 + 0x10]
mov r8, rsi
movzx edx, ax
call fcn.1400042e0
mov ecx, dword [r14 + 0xc]
test eax, eax
jns 0x140002e21
neg eax
mov edx, ecx
mov r8d, eax
mov rcx, rsi
call fcn.140001760
test eax, eax
jns 0x140002e32
mov eax, 0xffffffff
jmp 0x140002e34
mov dword [rsi + 0x2c], ecx
mov eax, dword [r14 + 0x10]
mov dword [rsi + 0x30], eax
mov dword [rsi + 0x34], 2
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140009690
mov rbx, qword [rsp + 0x110]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret