Function at 0x405ec0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
test byte [ebp + 0xc], 1
je 0x405fc6
lea esi, [ebp - 0x14]
mov ebx, 8
jmp 0x405ee8
sub ebx, eax
add esi, eax
test ebx, ebx
jle 0x405f25
push edi
push ebx
push esi
mov ecx, dword [ebp + 8]
push ecx
call dbg.adb_read
add esp, 0x10
cmp eax, 0
jg 0x405ee0
je 0x405f08
call sym.__errno
cmp dword [eax], 4
je 0x405ee4
test byte [0x43cb58], 8
jne 0x4061d1
sub esp, 0xc
push str.cannot_read_transport_registration_socket
call dbg.fatal_errno
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
test eax, eax
jne 0x405fce
test byte [0x43cb58], 8
jne 0x4060a7
sub esp, 0xc
lea eax, [edi + 0x20]
push eax
call dbg.fdevent_remove
mov ecx, dword [edi + 0x18]
pop ebx
push ecx
call dbg.adb_close
mov dword [esp], 0x43cb68
call fcn.0041dcdc
mov edx, dword [edi]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov eax, dword [edi + 4]
mov dword [eax], edx
push 0x43cb68
call fcn.0041dce4
push edi
call dbg.run_transport_disconnects
mov eax, dword [edi + 0x58]
add esp, 0x10
test eax, eax
je 0x405f95
sub esp, 0xc
push eax
call sym._free
add esp, 0x10
mov eax, dword [edi + 0x54]
test eax, eax
je 0x405fa8
sub esp, 0xc
push eax
call sym._free
add esp, 0x10
push edx
push 0x74
push 0xee
push edi
call sym._memset
mov dword [esp], edi
call sym._free
call dbg.update_transports
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [edi + 0x44], 5
je 0x40605e
sub esp, 0xc
mov dword [edi + 0x3c], 2
lea eax, [ebp - 0x1c]
push eax
call dbg.adb_socketpair
add esp, 0x10
test eax, eax
jne 0x406192
test byte [0x43cb58], 8
jne 0x40611a
mov eax, dword [ebp - 0x1c]
lea ebx, [edi + 0x20]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x18], eax
push edi
push dbg.transport_socket_events
mov eax, dword [edi + 0x1c]
push eax
push ebx
call dbg.fdevent_install
pop esi
pop eax
push 1
push ebx
call dbg.fdevent_set
add esp, 0xc
push edi
push 0
push dbg.input_thread
call sym.__beginthread
add esp, 0x10
inc eax
je 0x4061bc
push ecx
push edi
push 0
push dbg.output_thread
call sym.__beginthread
add esp, 0x10
inc eax
je 0x4061a7
sub esp, 0xc
push 0x43cb68
call fcn.0041dcdc
mov eax, dword [0x41f084]
mov dword [edi], 0x41f080
mov dword [edi + 4], eax
mov dword [0x41f084], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
push 0x43cb68
call fcn.0041dce4
lea eax, [edi + 0x64]
mov dword [edi + 0x70], eax
mov dword [edi + 0x6c], eax
add esp, 0xc
call dbg.update_transports
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov ebx, dword [0x43d3d8]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.43
push str.system_core_adb_transport.c
push 0x4208c4
push ebx
call sym._fprintf_2
call sym.__errno
mov dword [eax], esi
mov eax, dword [edi + 0x1c]
push eax
mov eax, dword [edi + 0x54]
push eax
push str.transport:__s_removing_and_freeing__d_n
push ebx
call sym._fprintf_2
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x405f40
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov ebx, dword [0x43d3d8]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.43
push str.system_core_adb_transport.c
push 0x4208c4
push ebx
call sym._fprintf_2
call sym.__errno
mov dword [eax], esi
pop eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [edi + 0x54]
push eax
push str.transport:__s___d__d__starting_n
push ebx
call sym._fprintf_2
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x406003
sub esp, 0xc
push str.cannot_open_transport_socketpair
call dbg.fatal_errno
add esp, 0x10
jmp 0x405ff6
sub esp, 0xc
push str.cannot_create_output_thread
call dbg.fatal_errno
add esp, 0x10
jmp 0x40605e
sub esp, 0xc
push 0x42120c
call dbg.fatal_errno
add esp, 0x10
jmp 0x406046
call sym.__errno
sub esp, 0xc
mov edi, dword [eax]
push 0x43cb38
call fcn.0041dcdc
mov esi, dword [0x43d3d8]
add esp, 0xc
add esi, 0x40
push str.transport_read_action
push str.system_core_adb_transport.c
push 0x4208c4
push esi
call sym._fprintf_2
call sym.__errno
mov dword [eax], edi
call sym.__errno
pop edx
mov eax, dword [eax]
push eax
call sym._strerror
mov ebx, eax
call sym.__errno
mov dword [esp], ebx
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push eax
push str.transport_read_action:_on_fd__d__error__d:__s_n
push esi
call sym._fprintf_2
add esp, 0x14
push esi
call sym._fflush
mov dword [esp], 0x43cb38
call fcn.0041dce4
add esp, 0xc
call sym.__errno
mov dword [eax], edi
jmp 0x405f15