Function at 0x100309c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084b70
mov eax, dword fs:[0]
push eax
mov eax, 0x103c
call fcn.10053a00
mov eax, dword [0x100a94c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1020], ecx
mov eax, dword [ebp + 8]
push 0x400
mov dword [ebp - 0x102c], eax
lea eax, [ebp - 0x478]
push 0
push eax
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x1c
push str.AdbSocketConnect::InitConnect
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x478]
push str._s_t__d__d___INFO____s:_d__initConnect_n
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030a66
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
lea eax, [ebp - 0x1018]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1020]
cmp eax, 0xffffffff
push 0x400
push 0
mov dword [ecx + 0x80], eax
lea eax, [ebp - 0x478]
push eax
jne 0x10030b28
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
push 0x23
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x478]
push str._s_t__d__d___ERROR____s:_d__Create_Socket_Failed___n
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030b08
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
xor al, al
jmp 0x10031137
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
mov eax, dword [ebp - 0x1020]
push dword [eax + 0x80]
push 0x26
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x478]
push str._s_t__d__d___INFO____s:_d__Create_Socket_Success_with_socket___d___n
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030b80
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
call fcn.10045f70
mov ecx, eax
test ecx, ecx
je 0x10031154
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1044], 0
mov dword [ebp - 0x1048], eax
mov eax, dword [ebp - 0x102c]
xorps xmm0, xmm0
add eax, 0x15
mov dword [ebp - 4], 0
push eax
push str.adb__s__s
lea eax, [ebp - 0x78]
movq qword [ebp - 0x58], xmm0
push 0x28
push eax
movups xmmword [ebp - 0x78], xmm0
movups xmmword [ebp - 0x68], xmm0
call fcn.10031aa0
mov eax, dword [ebp - 0x1020]
xorps xmm0, xmm0
movq qword [ebp - 0x30], xmm0
mov word [ebp - 0x28], 0
movq qword [ebp - 0x3c], xmm0
push dword [eax + 0x80]
lea eax, [ebp - 0x30]
mov word [ebp - 0x34], 0
push str.222_d
push 0xa
push eax
call fcn.10031aa0
mov eax, dword [ebp - 0x1020]
push dword [eax + 0x80]
lea eax, [ebp - 0x3c]
push str.555_d
push 0xa
push eax
call fcn.10031aa0
lea eax, [ebp - 0x30]
push eax
call fcn.10066341
cdq
mov ecx, 0x186a0
idiv ecx
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x1024], edx
call fcn.10066341
cdq
mov ecx, 0x186a0
idiv ecx
push 0x400
lea eax, [ebp - 0xa78]
mov dword [ebp - 0x1028], edx
push 0
push eax
call fcn.10056280
add esp, 0x44
lea eax, [ebp - 0x678]
push 0x200
push 0
push eax
call fcn.10056280
lea eax, [ebp - 0x78]
push eax
push str._s_shell_am_broadcast__a_com.tdtech.esuite.STOP_CONNECT_SERVICE
lea eax, [ebp - 0x678]
push 0x200
push eax
call fcn.10031aa0
add esp, 0x1c
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.1003feb0
push 0x400
push 0
lea eax, [ebp - 0x478]
push eax
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
lea eax, [ebp - 0xa78]
push eax
push 0x3a
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x478]
push str._s_t__d__d___INFO____s:_d__run_adb_STOP_CONNECT_SERVICE_response___s___n
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x20
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030d30
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x200
lea eax, [ebp - 0x678]
push 0
push eax
call fcn.10056280
push 0x400
lea eax, [ebp - 0xa78]
push 0
push eax
call fcn.10056280
push dword [ebp - 0x1024]
lea eax, [ebp - 0x78]
push eax
push str._s_shell_am_broadcast__a_com.tdtech.esuite.START_CONNECT_SERVICE___ei_socket_port__d
lea eax, [ebp - 0x678]
push 0x200
push eax
call fcn.10031aa0
add esp, 0x2c
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.1003feb0
push 0x400
lea eax, [ebp - 0x478]
push 0
push eax
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
lea eax, [ebp - 0xa78]
push eax
push 0x42
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x478]
push str._s_t__d__d___INFO____s:_d__run_adb_START_CONNECT_SERVICE_response___s___n
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x20
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030e10
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x200
lea eax, [ebp - 0x678]
push 0
push eax
call fcn.10056280
push 0x400
lea eax, [ebp - 0xa78]
push 0
push eax
call fcn.10056280
push dword [ebp - 0x1024]
lea eax, [ebp - 0x78]
push eax
push str._s_forward___remove_tcp:_d
lea eax, [ebp - 0x678]
push 0x200
push eax
call fcn.10031aa0
add esp, 0x2c
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.1003feb0
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x200
lea eax, [ebp - 0x678]
push 0
push eax
call fcn.10056280
push 0x400
lea eax, [ebp - 0xa78]
push 0
push eax
call fcn.10056280
push dword [ebp - 0x1024]
lea eax, [ebp - 0x78]
push dword [ebp - 0x1028]
push eax
push str._s_forward_tcp:_d_tcp:_d
lea eax, [ebp - 0x678]
push 0x200
push eax
call fcn.10031aa0
add esp, 0x30
lea eax, [ebp - 0xa78]
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.1003feb0
push 0x400
lea eax, [ebp - 0x478]
push 0
push eax
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
lea eax, [ebp - 0xa78]
push eax
push 0x51
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
push str._s_t__d__d___INFO____s:_d__run_adb_forward_response___s___n
lea eax, [ebp - 0x478]
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10030f58
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 2
push str.127.0.0.1
mov word [ebp - 0xe88], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp - 0x1028]
mov dword [ebp - 0xe84], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe86], ax
lea eax, [ebp - 0xe88]
push 0x10
push eax
mov eax, dword [ebp - 0x1020]
push dword [eax + 0x80]
call dword [sym.imp.WS2_32.dll_connect]
push 0x400
push 0
cmp eax, 0xffffffff
jne 0x10031048
lea eax, [ebp - 0x478]
push eax
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
call fcn.10040e60
push 0x5b
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x478]
push str._s_t__d__d___ERROR____s:_d__client_connect_to_Service_SOCKET_ERROR....._n
push eax
call fcn.10008e20
lea ecx, [ebp - 0x478]
add esp, 0x1c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10031023
sub ecx, edx
lea eax, [ebp - 0x478]
push ecx
push eax
call fcn.10040fb0
add esp, 8
mov byte [ebp - 0x1019], 0
jmp 0x1003110c
lea eax, [ebp - 0xe78]
push eax
call fcn.10056280
add esp, 0xc
mov dword [ebp - 0x40], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x50]
movups xmmword [ebp - 0x50], xmm0
call fcn.10040e60
push 0x5e
push str.AdbSocketConnect::InitConnect
call esi
push eax
call edi
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xe78]
push str._s_t__d__d___INFO____s:_d__client_connect_to_Service_SUCCESS......_n
push eax
call fcn.10008e20
lea ecx, [ebp - 0xe78]
add esp, 0x1c
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100310a0
sub ecx, edx
lea eax, [ebp - 0xe78]
push ecx
push eax
call fcn.10040fb0
mov ecx, dword [ebp - 0x1020]
add esp, 8
mov edx, dword [ebp - 0x102c]
mov dword [ebp - 0x1030], 0x7d0
mov eax, dword [ecx + 0x80]
mov dword [edx + 0x54], eax
mov eax, dword [ecx + 0x80]
or eax, 0xfff0000
push 4
mov dword [edx + 0x50], eax
lea eax, [ebp - 0x1030]
push eax
push 0x1006
push 0xffff
push dword [ecx + 0x80]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov byte [ebp - 0x1019], 1
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov esi, dword [ebp - 0x1048]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10031131
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x1019]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10052bc3
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.1002f2a0
int3