Function at 0x42be60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get local ipv4 addresses
Get socket information
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x586a9b
mov eax, dword fs:[0]
push eax
sub esp, 0x1bc
mov eax, dword [0x615000]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x19c], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
push 0
push 1
mov eax, dword [ebp - 0x19c]
add eax, 0x58
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x42bece
push str.Tcp_connection_already_in_fixing__break._n
push 0x5f2db4
call fcn.0040c050
add esp, 8
jmp 0x42c455
mov dword [ebp - 0x14], 1
push str.Trying_to_fix_connection_for_tcp_report..._n
push 0x5f2e40
call fcn.0040c050
add esp, 8
cmp dword [ebp + 8], 0
je 0x42bf3d
cmp dword [ebp + 0xc], 0
je 0x42bf3d
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1a0], ecx
mov edx, dword [ebp - 0x1a0]
add edx, 1
mov dword [ebp - 0x1a4], edx
mov eax, dword [ebp - 0x1a0]
mov cl, byte [eax]
mov byte [ebp - 0x1a5], cl
add dword [ebp - 0x1a0], 1
cmp byte [ebp - 0x1a5], 0
jne 0x42bf0b
mov edx, dword [ebp - 0x1a0]
sub edx, dword [ebp - 0x1a4]
mov dword [ebp - 0x1ac], edx
jne 0x42bf54
push str.Err:_IP_addr__port_params_invalid__break__n
push 0x5f2ed4
call fcn.0040c050
add esp, 8
jmp 0x42c455
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.Tip:_Try_connect_to_ip_S__port_d_..._n
push 0x5f2f58
call fcn.0040c050
add esp, 0x10
mov edx, dword [ebp - 0x19c]
cmp dword [edx], 0xffffffff
je 0x42bf84
mov ecx, dword [ebp - 0x19c]
call fcn.0042b6d0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x19c]
mov dword [ecx], eax
mov edx, dword [ebp - 0x19c]
cmp dword [edx], 0xffffffff
jne 0x42bfc1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Err:_socket___ret_INVALID_SOCKET_err_d__break__n
push 0x5f2ff8
call fcn.0040c050
add esp, 0xc
jmp 0x42c455
mov dword [ebp - 0x4c], 0xbb8
push 4
lea eax, [ebp - 0x4c]
push eax
push 0x1005
push 0xffff
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x42c005
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_setsockopt_send_timeout_500ms_err_d__continue..._n
push 0x5f30a4
call fcn.0040c050
add esp, 0xc
push 4
lea eax, [ebp - 0x4c]
push eax
push 0x1006
push 0xffff
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x42c042
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_setsockopt_receive_timeout_500ms_err_d__continue..._n
push 0x5f3150
call fcn.0040c050
add esp, 0xc
mov byte [ebp - 0x19], 1
push 1
lea eax, [ebp - 0x19]
push eax
push 1
push 6
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x42c07d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_setsockopt_tcp_no_delay_err_d__continue..._n
push 0x5f31f0
call fcn.0040c050
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x16c], eax
mov dword [ebp - 0x168], eax
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x160], eax
mov ecx, 2
mov word [ebp - 0x16c], cx
movzx edx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x16a], ax
mov eax, dword [ebp + 8]
push eax
call sub.WS2_32.dll_inet_addr
mov dword [ebp - 0x168], eax
mov dword [ebp - 0x18], 1
lea ecx, [ebp - 0x18]
push ecx
push 0x8004667e
mov edx, dword [ebp - 0x19c]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x42c106
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Err:_async_ioctlsocket___set_nonblock__err_d_break__n
push 0x5f3298
call fcn.0040c050
add esp, 0xc
jmp 0x42c455
push 0x10
lea ecx, [ebp - 0x16c]
push ecx
mov edx, dword [ebp - 0x19c]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x42c14e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x42c14e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_connect___err_d_break__n
push 0x5f330c
call fcn.0040c050
add esp, 0xc
jmp 0x42c455
mov dword [ebp - 0x190], 1
mov dword [ebp - 0x18c], 0
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x194], 0
jmp 0x42c187
mov ecx, dword [ebp - 0x194]
add ecx, 1
mov dword [ebp - 0x194], ecx
mov edx, dword [ebp - 0x194]
cmp edx, dword [ebp - 0x15c]
jae 0x42c1b0
mov eax, dword [ebp - 0x194]
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ebp + eax*4 - 0x158]
cmp edx, dword [ecx]
jne 0x42c1ae
jmp 0x42c1b0
jmp 0x42c178
mov eax, dword [ebp - 0x194]
cmp eax, dword [ebp - 0x15c]
jne 0x42c1eb
cmp dword [ebp - 0x15c], 0x40
jae 0x42c1eb
mov ecx, dword [ebp - 0x194]
mov edx, dword [ebp - 0x19c]
mov eax, dword [edx]
mov dword [ebp + ecx*4 - 0x158], eax
mov ecx, dword [ebp - 0x15c]
add ecx, 1
mov dword [ebp - 0x15c], ecx
xor edx, edx
jne 0x42c16c
lea eax, [ebp - 0x190]
push eax
push 0
lea ecx, [ebp - 0x15c]
push ecx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x42c22f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_async_select____err_d_break__n
push 0x5f338c
call fcn.0040c050
add esp, 0xc
jmp 0x42c455
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x18]
push edx
push 0x8004667e
mov eax, dword [ebp - 0x19c]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x42c271
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_ioctlsocket___set_block__err_d_break__n
push 0x5f341c
call fcn.0040c050
add esp, 0xc
jmp 0x42c455
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str.Tip:_Reconnect_to_report_server_successed__ip_S__port_d
push 0x5f34c8
call fcn.0040c050
add esp, 0x10
mov dword [ebp - 0x10], 1
push 0xc8
push 0x7530
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ecx]
push edx
mov ecx, dword [ebp - 0x19c]
call fcn.0042bd40
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x42c2c5
mov dword [ebp - 0x1b0], 0x5f34fc
jmp 0x42c2cf
mov dword [ebp - 0x1b0], 0x5f3508
mov eax, dword [ebp - 0x1b0]
push eax
push str.Tip:_SetSocketTcpAlive_1s_30s_ret_s...
push 0x5f3514
call fcn.0040c050
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x48], cx
xor edx, edx
mov dword [ebp - 0x46], edx
mov dword [ebp - 0x42], edx
mov dword [ebp - 0x3e], edx
mov word [ebp - 0x3a], dx
mov dword [ebp - 0x50], 0x10
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x19c]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x42c342
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WAR:_getsockname___err_d_break__n
push 0x5f35e0
call fcn.0040c050
add esp, 0xc
jmp 0x42c455
mov byte [ebp - 0x30], 0
xor ecx, ecx
mov dword [ebp - 0x2f], ecx
mov dword [ebp - 0x2b], ecx
mov dword [ebp - 0x27], ecx
mov word [ebp - 0x23], cx
mov byte [ebp - 0x21], cl
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00430df0
add esp, 8
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebp - 0x19c]
add ecx, 4
call fcn.00405fb0
movzx edx, word [ebp - 0x46]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
mov ecx, dword [ebp - 0x19c]
add ecx, 4
call fcn.00406030
push eax
push str.Tip:_Reconnect_using_local_IP_S__port_d_...
push 0x5f367c
call fcn.0040c050
add esp, 0x10
lea ecx, [ebp - 0x188]
call fcn.00405ec0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x188]
push ecx
mov edx, dword [ebp - 0x19c]
add edx, 0x20
push edx
mov eax, dword [ebp - 0x19c]
add eax, 0x3c
push eax
mov ecx, dword [ebp - 0x19c]
add ecx, 4
push ecx
call fcn.0040ca10
add esp, 0x10
lea ecx, [ebp - 0x188]
call fcn.00406030
push eax
mov ecx, dword [ebp - 0x19c]
add ecx, 0x20
call fcn.00406030
push eax
mov ecx, dword [ebp - 0x19c]
add ecx, 0x3c
call fcn.00406030
push eax
mov ecx, dword [ebp - 0x19c]
add ecx, 4
call fcn.00406030
push eax
push str.TIP:_Find_ip_S_gateway_S_belong_ethernet_guid_S__descript_S...
push 0x5f373c
call fcn.0040c050
add esp, 0x18
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x188]
call fcn.00405f70
xor edx, edx
jne 0x42be9f
cmp dword [ebp - 0x10], 0
je 0x42c573
cmp dword [ebp + 8], 0
je 0x42c573
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1b4], eax
mov ecx, dword [ebp - 0x1b4]
add ecx, 1
mov dword [ebp - 0x1b8], ecx
mov edx, dword [ebp - 0x1b4]
mov al, byte [edx]
mov byte [ebp - 0x1b9], al
add dword [ebp - 0x1b4], 1
cmp byte [ebp - 0x1b9], 0
jne 0x42c481
mov ecx, dword [ebp - 0x1b4]
sub ecx, dword [ebp - 0x1b8]
mov dword [ebp - 0x1c0], ecx
je 0x42c573
push 0xc8
mov ecx, dword [ebp - 0x19c]
add ecx, 0x3c
call fcn.00406030
push eax
call fcn.0040df60
add esp, 8
mov dword [ebp - 0x198], eax
cmp dword [ebp - 0x198], 0
je 0x42c4ee
mov dword [ebp - 0x1c4], 0x5f3770
jmp 0x42c4f8
mov dword [ebp - 0x1c4], 0x5f377c
mov edx, dword [ebp - 0x1c4]
push edx
mov ecx, dword [ebp - 0x19c]
add ecx, 0x3c
call fcn.00406030
push eax
push str.Tip:_Reconnected_router_IP_S_ICMP_test_ret_s_...
push 0x5f37f4
call fcn.0040c050
add esp, 0x10
push 0xc8
mov eax, dword [ebp + 8]
push eax
call fcn.0040df60
add esp, 8
mov dword [ebp - 0x198], eax
cmp dword [ebp - 0x198], 0
je 0x42c54c
mov dword [ebp - 0x1c8], 0x5f3828
jmp 0x42c556
mov dword [ebp - 0x1c8], 0x5f3834
mov ecx, dword [ebp - 0x1c8]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.Tip:_Reconnected_target_host_IP_S_ICMP_test_ret_s_...
push str.CSafeLogging::CTcpCommunicator::ReConnectReportSrv
call fcn.0040c050
add esp, 0x10
cmp dword [ebp - 0x14], 0
je 0x42c5b7
cmp dword [ebp - 0x10], 0
jne 0x42c5a5
mov eax, dword [ebp - 0x19c]
cmp dword [eax], 0
jbe 0x42c5a5
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x19c]
mov dword [eax], 0xffffffff
push 0
mov ecx, dword [ebp - 0x19c]
add ecx, 0x58
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0055abea
mov esp, ebp
pop ebp
ret 8