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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rbx, rcx
mov dword [rsp + 0x50], 0x80
mov r9d, edx
lea r8, [0x14002d38c]
or edi, 0xffffffff
lea rcx, [rbp + 0x18]
lea edx, [rdi + 0xb]
call fcn.140008740
mov r9, rbx
lea r8, [0x14002d390]
mov edx, 0x100
lea rcx, [0x140033580]
call fcn.140008740
lea r12, [0x140033568]
mov rcx, r12
lea r9, [rbp + 0x18]
lea r8, [0x14002d390]
lea edx, [rdi + 9]
call fcn.140008740
xor eax, eax
lea r9, [rsp + 0x48]
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x60], rax
lea rdx, [rbp + 0x18]
xor esi, esi
mov dword [rsp + 0x60], 1
mov rcx, rbx
mov dword [rsp + 0x5c], esi
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 0x140009348
mov qword [rsp + 0x30], rsi
lea rbx, [0x140033160]
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.14000a300
lea rcx, str.no_connection___DNS_name_resolution_failed_r_n
call fcn.14000a030
or eax, edi
jmp 0x140009886
mov rsi, qword [rsp + 0x48]
mov qword [rsp + 0x1c0], r14
mov qword [rsp + 0x1c8], r15
test rsi, rsi
je 0x1400096a3
lea r15, [0x140000000]
nop dword [rax]
mov r8d, dword [rsi + 0xc]
mov edx, dword [rsi + 8]
mov ecx, dword [rsi + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
test eax, eax
jns 0x1400093ad
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.14000a360
mov r8, rax
lea rdx, str.____socket___failed:__s_n
mov ecx, 1
call fcn.14000a300
jmp 0x140009691
mov edx, dword [rsi + 0x10]
lea r8, [0x140033580]
mov rcx, qword [rsi + 0x20]
mov r9d, 0x100
mov dword [rsp + 0x30], 0xa
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], r12
call qword [sym.imp.WS2_32.dll_getnameinfo]
movsxd r14, edi
lea r8, [rbp + 0x10]
mov rcx, r14
mov dword [rbp + 0x10], 1
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rdx, str.___connecting..._n
mov ecx, 1
call fcn.14000a300
mov r8d, dword [rsi + 0x10]
mov rcx, r14
mov rdx, qword [rsi + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x14000969e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x14000944d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x14000944d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
jne 0x140009631
xor ecx, ecx
call fcn.14000f850
mov ecx, edi
mov rbx, rax
call fcn.1400087a0
test eax, eax
jne 0x140009481
add rbx, 4
xor ecx, ecx
call fcn.14000f850
cmp rbx, rax
jl 0x14000970e
mov ecx, edi
call fcn.1400087a0
test eax, eax
je 0x140009466
cmp edi, 0xffffffff
je 0x140009631
lea rax, [rbp + 0x10]
mov dword [rbp + 0x10], 4
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, r14
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x1400094e9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.14000a360
mov r8, rax
lea rdx, str.____getsockopt___error:__s_r_n
mov ecx, 1
call fcn.14000a300
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
jmp 0x140009631
cmp dword [rsp + 0x40], 0
je 0x14000969e
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [rsp + 0x40]
or edi, 0xffffffff
lea eax, [rdx - 0x2714]
cmp eax, 0x3d
ja case.0x140009529.10010
cdqe
movzx eax, byte [r15 + rax + 0x98bc]
mov ecx, dword [r15 + rax*4 + 0x98a0]
add rcx, r15
jmp rcx
lea rdx, str.____connect_time_out_r_n
mov ecx, 1
call fcn.14000a300
lea rcx, str.no_connection___timeout_r_n
call fcn.14000a030
jmp 0x140009631
lea rdx, str.____connect_refused_r_n
mov ecx, 1
call fcn.14000a300
lea rcx, str.no_connection___refused__RST__r_n
call fcn.14000a030
jmp 0x140009631
lea rdx, str.____connect_reset_r_n
mov ecx, 1
call fcn.14000a300
lea rcx, str.no_connection___connection_closed__RST__r_n
call fcn.14000a030
jmp 0x140009631
lea rdx, str.____connect_ICMP_net_unreachable_r_n
mov ecx, 1
call fcn.14000a300
lea rcx, str.no_connection___network_unreachable__ICMP_error__r_n
call fcn.14000a030
jmp 0x140009631
lea rdx, str.____connect_ICMP_host_unreachable_r_n
mov ecx, 1
call fcn.14000a300
lea rcx, str.no_connection___host_unreachable__ICMP_error__r_n
call fcn.14000a030
jmp 0x140009631
lea rdx, str.____access_denied____probably_broadcast_address_.0_or_.255_r_n
mov ecx, 1
call fcn.14000a300
lea rcx, str.no_connection___broadcast_address_r_n
call fcn.14000a030
jmp 0x140009631
mov ecx, edx
call fcn.14000a360
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.14000a300
mov ecx, dword [rsp + 0x40]
call fcn.14000a360
mov rdx, rax
lea rcx, str.no_connection___failed:__s_r_n
call fcn.14000a030
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2714
je 0x140009674
sub eax, 0x38
je 0x140009674
cmp eax, 1
je 0x14000966b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.14000a360
mov r8, rax
lea rdx, str.____no_connection____s_r_n
mov ecx, 1
call fcn.14000a300
jmp 0x140009685
lea rdx, str.____no_connection___refused__RST__r_n
jmp 0x14000967b
lea rdx, str.____not_connection___time_out_r_n
mov ecx, 1
call fcn.14000a300
movsxd rcx, edi
call qword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x140009370
mov rsi, qword [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp edi, 0xffffffff
jne 0x140009781
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2714
je 0x14000976d
sub eax, 9
je 0x140009759
sub eax, 0x2f
je 0x14000976d
cmp eax, 1
je 0x140009745
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.14000a360
mov rdx, rax
lea rcx, str.connect_failed:__s___d____d__r_n
or r9d, edi
mov r8d, ebx
call fcn.14000a030
or eax, edi
jmp 0x140009876
lea rdx, str.____connect:_timeout_n
mov ecx, 1
call fcn.14000a300
cmp dword [0x1400321a4], 0
jne 0x140009734
lea rcx, str.no_connection___timeout_r_n
call fcn.14000a030
movsxd rcx, edi
call qword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x140009876
lea rcx, str.no_connection___refused__RST__r_n
call fcn.14000a030
or eax, 0xffffffff
jmp 0x140009876
lea rcx, str.no_connection___broadcast_address_r_n
call fcn.14000a030
or eax, 0xffffffff
jmp 0x140009876
lea rcx, str.no_connection___timeout_r_n
call fcn.14000a030
or eax, 0xffffffff
jmp 0x140009876
movsxd rbx, edi
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, [rbp - 0x70]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400097e6
mov edx, dword [rsp + 0x50]
lea rax, [rbp + 0x10]
mov dword [rsp + 0x30], 0xa
lea r8, [rbp + 0x30]
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 0x1400097e6
lea r9, [rbp + 0x10]
lea r8, [rbp + 0x30]
lea rdx, str.___connected_from___s_:_s_n
lea ecx, [rax + 1]
call fcn.14000a300
mov edx, 6
mov dword [rsp + 0x40], 1
lea r9, [rsp + 0x40]
mov dword [rbp + 0x10], 4
mov rcx, rbx
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rax, [rbp + 0x10]
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 0x140009874
cmp dword [rsp + 0x40], 0x4000
jae 0x140009874
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], 0x4000
mov edx, 0xffff
mov dword [rbp + 0x10], 4
mov r8d, 0x1002
mov dword [rsp + 0x20], 4
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
mov eax, edi
mov r14, qword [rsp + 0x1c0]
mov r15, qword [rsp + 0x1c8]
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.14000a520
add rsp, 0x180
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret