Function at 0x140006e40
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push r12
push r14
lea rbp, [rsp - 0x2a0]
sub rsp, 0x3a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x280], rax
mov rbx, rcx
mov dword [rsp + 0x54], 0x80
mov r9d, edx
lea r8, [0x140024c1c]
or esi, 0xffffffff
lea rcx, [rbp + 0x228]
lea edx, [rsi + 0xb]
call fcn.140006280
mov r9, rbx
lea r8, [0x140024c20]
mov edx, 0x100
lea rcx, [0x14002b600]
call fcn.140006280
lea r14, [0x14002b5e8]
mov rcx, r14
lea r9, [rbp + 0x228]
lea r8, [0x140024c20]
lea edx, [rsi + 9]
call fcn.140006280
xor eax, eax
lea r9, [rsp + 0x48]
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x60], rax
lea rdx, [rbp + 0x228]
xor r12d, r12d
mov dword [rsp + 0x60], 1
mov rcx, rbx
mov dword [rsp + 0x5c], r12d
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x140006f6a
mov qword [rsp + 0x30], r12
lea rbx, [0x14002b1e0]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov r8, rbx
lea rdx, str.____getaddrinfo___failed:__s_n
xor ecx, ecx
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___DNS_name_resolution_failed_r_n
call fcn.140007ea0
or eax, esi
jmp 0x140007578
mov qword [rsp + 0x3e0], rdi
lea rdi, [0x14002a588]
mov qword [rsp + 0x398], r13
mov qword [rsp + 0x390], r15
mov r15, qword [rsp + 0x48]
test r15, r15
je 0x14000737e
lea r13, [0x140000000]
nop
mov r8d, dword [r15 + 0xc]
mov edx, dword [r15 + 8]
mov ecx, dword [r15 + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
test eax, eax
jns 0x140007013
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp qword [0x14002a588], r12
mov ebx, eax
jne 0x140006fd1
xor ecx, ecx
call fcn.14000da14
mov qword [rsp + 0x30], r12
mov r9d, 0x400
mov dword [rsp + 0x28], r12d
mov r8d, ebx
xor edx, edx
mov qword [rsp + 0x20], rdi
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov r8, qword [0x14002a588]
lea rdx, str.____socket___failed:__s_r_n
mov ecx, 1
call fcn.140008230
jmp 0x140007365
mov edx, dword [r15 + 0x10]
lea r8, [0x14002b600]
mov rcx, qword [r15 + 0x20]
mov r9d, 0x100
mov dword [rsp + 0x30], 0xa
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], r14
call qword [sym.imp.WS2_32.dll_getnameinfo]
movsxd rdi, esi
lea r8, [rsp + 0x50]
mov rcx, rdi
mov dword [rsp + 0x50], 1
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rdx, str.___connecting..._n
mov ecx, 1
call fcn.140008230
mov r8d, dword [r15 + 0x10]
mov rcx, rdi
mov rdx, qword [r15 + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x140007372
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400070b6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x1400070b6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
jne 0x1400072fe
xor ecx, ecx
call fcn.14000d5c4
mov rbx, rax
lea rax, [rbp + 0x220]
mov dword [rbp + 0x220], r12d
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x10]
mov dword [rbp + 0x224], 0x186a0
xor edx, edx
mov qword [rbp + 0x18], rdi
lea ecx, [rsi + 1]
mov dword [rbp + 0x10], 1
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x140007145
xor ecx, ecx
call fcn.14000d5c4
lea rcx, [rbx + 3]
cmp rcx, rax
jge 0x1400070c0
lea rdx, str.____connect:_timeout_n
mov ecx, 1
call fcn.140008230
cmp dword [0x14002a218], r12d
jne 0x140007134
lea rcx, str.UNKNOWN___no_connection___timeout_r_n
call fcn.140007ea0
movsxd rcx, esi
call qword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x140007560
cmp esi, 0xffffffff
je 0x1400072f7
lea rax, [rsp + 0x50]
mov dword [rsp + 0x50], 4
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x1400071af
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140008290
mov r8, rax
lea rdx, str.____getsockopt___error:__s_n
mov ecx, 1
call fcn.140008230
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
jmp 0x1400072f7
cmp dword [rsp + 0x40], r12d
je 0x140007372
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [rsp + 0x40]
or esi, 0xffffffff
lea eax, [rdx - 0x2714]
cmp eax, 0x3d
ja case.0x1400071ef.10010
cdqe
movzx eax, byte [rax + r13 + 0x75b4]
mov ecx, dword [r13 + rax*4 + 0x7598]
add rcx, r13
jmp rcx
lea rdx, str.____connect_time_out_n
mov ecx, 1
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___timeout_r_n
call fcn.140007ea0
jmp 0x1400072f7
lea rdx, str.____connect_refused_n
mov ecx, 1
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___refused__RST__r_n
call fcn.140007ea0
jmp 0x1400072f7
lea rdx, str.____connect_reset_n
mov ecx, 1
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___connection_closed__RST__r_n
call fcn.140007ea0
jmp 0x1400072f7
lea rdx, str.____connect_ICMP_net_unreachable_n
mov ecx, 1
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___network_unreachable__ICMP_error__r_n
call fcn.140007ea0
jmp 0x1400072f7
lea rdx, str.____connect_ICMP_host_unreachable_n
mov ecx, 1
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___host_unreachable__ICMP_error__r_n
call fcn.140007ea0
jmp 0x1400072f7
lea rdx, str.____access_denied____probably_broadcast_address_.0_or_.255_r_n
mov ecx, 1
call fcn.140008230
lea rcx, str.UNKNOWN___no_connection___broadcast_address_r_n
call fcn.140007ea0
jmp 0x1400072f7
mov ecx, edx
call fcn.140008290
mov r9d, dword [rsp + 0x40]
lea rdx, str.____connect_failed:__s___d____d__r_n
mov r8, rax
mov dword [rsp + 0x20], 0xffffffff
mov ecx, 1
call fcn.140008230
mov ecx, dword [rsp + 0x40]
call fcn.140008290
mov rdx, rax
lea rcx, str.UNKNOWN___no_connection___failed:__s_r_n
call fcn.140007ea0
lea r14, [0x14002b5e8]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2714
je 0x140007341
sub eax, 0x38
je 0x140007341
cmp eax, 1
je 0x140007338
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140008290
mov r8, rax
lea rdx, str.____no_connection____s_n
mov ecx, 1
call fcn.140008230
jmp 0x140007352
lea rdx, str.____no_connection___refused__RST__n
jmp 0x140007348
lea rdx, str.____not_connection___time_out_n
mov ecx, 1
call fcn.140008230
movsxd rcx, esi
call qword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
lea rdi, [0x14002a588]
mov r15, qword [r15 + 0x28]
test r15, r15
jne 0x140006fa0
mov r15, qword [rsp + 0x48]
lea rdi, [0x14002a588]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp esi, 0xffffffff
jne 0x14000745c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2714
je 0x140007448
sub eax, 9
je 0x140007434
sub eax, 0x2f
je 0x140007448
cmp eax, 1
je 0x140007420
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp qword [0x14002a588], r12
mov ebx, eax
jne 0x1400073d0
xor ecx, ecx
call fcn.14000da14
mov qword [rsp + 0x30], r12
mov r9d, 0x400
mov dword [rsp + 0x28], r12d
mov r8d, ebx
xor edx, edx
mov qword [rsp + 0x20], rdi
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rbx, qword [0x14002a588]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
or r9d, 0xffffffff
lea rcx, str.UNKNOWN___connect_failed:__s___d____d__r_n
mov r8d, eax
mov rdx, rbx
call fcn.140007ea0
or eax, 0xffffffff
jmp 0x140007560
lea rcx, str.UNKNOWN___no_connection___refused__RST__r_n
call fcn.140007ea0
or eax, 0xffffffff
jmp 0x140007560
lea rcx, str.UNKNOWN___no_connection___broadcast_address_r_n
call fcn.140007ea0
or eax, 0xffffffff
jmp 0x140007560
lea rcx, str.UNKNOWN___no_connection___timeout_r_n
call fcn.140007ea0
or eax, 0xffffffff
jmp 0x140007560
movsxd rbx, esi
lea r8, [rsp + 0x54]
mov rcx, rbx
lea rdx, [rbp - 0x70]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400074cd
mov edx, dword [rsp + 0x54]
lea rax, [rbp + 0x220]
mov dword [rsp + 0x30], 0xa
lea r8, [rbp + 0x240]
mov dword [rsp + 0x28], 8
lea rcx, [rbp - 0x70]
mov r9d, 0x40
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x1400074cd
lea r9, [rbp + 0x220]
lea r8, [rbp + 0x240]
lea rdx, str.___connected_from___s_:_s_n
lea ecx, [rax + 1]
call fcn.140008230
mov edx, 6
mov dword [rsp + 0x40], 1
lea r9, [rsp + 0x40]
mov dword [rsp + 0x50], 4
mov rcx, rbx
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rax, [rsp + 0x50]
mov edx, 0xffff
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r8d, 0x1002
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14000755e
cmp dword [rsp + 0x40], 0x4000
jae 0x14000755e
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], 0x4000
mov edx, 0xffff
mov dword [rsp + 0x50], 4
mov r8d, 0x1002
mov dword [rsp + 0x20], 4
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
mov eax, esi
mov r13, qword [rsp + 0x398]
mov rdi, qword [rsp + 0x3e0]
mov r15, qword [rsp + 0x390]
mov rcx, qword [rbp + 0x280]
xor rcx, rsp
call fcn.1400083c0
add rsp, 0x3a0
pop r14
pop r12
pop rsi
pop rbx
pop rbp
ret