Function at 0x140016af0
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push rbp
push rbx
push r14
lea rbp, [rsp - 0x1d20]
mov eax, 0x1e20
call fcn.14003b0c0
sub rsp, rax
mov rax, qword [0x140050010]
xor rax, rsp
mov qword [rbp + 0x1d00], rax
mov qword [rsp + 0x1e48], rsi
mov rbx, rcx
mov qword [rsp + 0x1e18], r13
xor edx, edx
lea r13, [rcx + 0x100014]
mov qword [rsp + 0x1e10], r15
mov rcx, r13
mov r8d, 0x800000
call fcn.14001f1b0
mov r15d, 2
lea rdx, [rbp - 0x70]
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_WSAStartup]
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
xor r14d, r14d
mov qword [0x140108b30], rax
lea rsi, [rbx + 8]
cmp dword [rbx + 0x9000a8], r14d
jne 0x1400172fc
mov qword [rsp + 0x1e50], rdi
mov qword [rsp + 0x1e58], r12
cmp dword [rbx + 0x9000ac], 1
jne 0x140016d53
cmp dword [rsi], 1
je 0x140016d48
cmp dword [rbx + 0x9000a0], 0
je 0x140016d48
call qword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x14166ac00]
cmp eax, ecx
jge 0x140016bcc
test ecx, ecx
jne 0x140016d48
movzx ecx, word [rbx + 0x900094]
add eax, 0x3e8
xorps xmm0, xmm0
mov dword [0x14166ac00], eax
movups xmmword [rsp + 0x50], xmm0
call qword [sym.imp.WS2_32.dll_htons]
lea rcx, [rbx + 0x900014]
mov word [rsp + 0x50], r15w
mov word [rsp + 0x52], ax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x54], eax
cmp eax, 0xffffffff
jne 0x140016c30
lea rcx, [rbx + 0x900014]
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140016d48
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov dword [rsp + 0x54], eax
mov edx, 1
mov ecx, r15d
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], 1
mov rcx, rax
mov qword [0x140108b28], rax
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rdx, qword [0x140108b30]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, qword [0x140108b28]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [0x140108b28]
lea rdx, [rsp + 0x50]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
mov rcx, qword [0x140108b28]
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov dword [rsp + 0x30], r14d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, gethostbyname
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rdx, qword [0x140108b30]
lea r8, [0x140108af0]
mov rcx, qword [0x140108b28]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test byte [0x140108af0], 0x10
mov rcx, qword [0x140108b28]
jne 0x140016cf7
mov dword [rbx + 0x9000ac], r14d
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x140016d48
mov rdx, qword [0x140108b30]
mov r8d, 0x21
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [0x140108b28]
lea r9, [rsp + 0x34]
mov edx, 0xffff
mov dword [rsi], 1
mov r8d, 0x1002
mov qword [rbx + 0x9000ac], 0
mov dword [rsp + 0x34], 0x1000000
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rsi], 1
jne 0x140016e39
cmp dword [rbx + 0x9000a4], 0
je 0x140016d87
mov r8d, dword [rbx + 0x90009c]
lea rdx, [rbx + 0x14]
mov rcx, qword [0x140108b28]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbx + 0x9000a4], r14d
mov rdx, qword [0x140108b30]
lea r8, [0x140108af0]
mov rcx, qword [0x140108b28]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x1400172df
mov eax, dword [0x140108af0]
test al, 0x20
je 0x140016dca
mov rcx, qword [0x140108b28]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rsi], r14d
jmp 0x1400172df
test al, 1
je 0x140016e39
mov rcx, qword [0x140108b28]
xor r9d, r9d
mov r8d, 0x800000
mov rdx, r13
mov rdi, r14
call qword [sym.imp.WS2_32.dll_recv]
movsxd rdx, eax
test eax, eax
jle 0x1400172df
nop word [rax + rax]
movsxd rcx, dword [rbx + 0x11000c4]
movzx eax, byte [rdi + r13]
mov byte [rcx + rbx + 0x9000c4], al
inc dword [rbx + 0x11000c4]
cmp dword [rbx + 0x11000c4], 0x800000
jb 0x140016e2c
mov dword [rbx + 0x11000c4], r14d
inc rdi
cmp rdi, rdx
jl 0x140016e00
jmp 0x1400172df
cmp dword [rbx + 0x9000b0], 0
je 0x140016e62
cmp dword [rsi], 1
jne 0x140016e57
mov rcx, qword [0x140108b28]
mov dword [rsi], r14d
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x9000ac], 0
cmp dword [rbx + 0x9000b4], 1
jne 0x140016f5f
cmp dword [rbx + 0xc], 0
jne 0x140016f5f
cmp dword [rbx + 0x9000a0], 1
jne 0x140016f5f
xor ecx, ecx
mov qword [rsp + 0x68], r14
call qword [sym.imp.WS2_32.dll_htonl]
movzx ecx, word [rbx + 0x900094]
mov dword [rsp + 0x64], eax
call qword [sym.imp.WS2_32.dll_htons]
xor r8d, r8d
mov word [rsp + 0x60], r15w
mov edx, r15d
mov word [rsp + 0x62], ax
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x60]
mov rcx, rax
mov qword [0x140108b38], rax
call qword [sym.imp.WS2_32.dll_bind]
mov rdx, qword [0x140108b30]
mov r8d, 1
mov rcx, qword [0x140108b38]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [0x140108b38]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov dword [rsp + 0x38], 0x1000000
mov r8d, 0x1002
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
xorps xmm0, xmm0
lea rcx, [rbx + 0x900014]
movups xmmword [rsp + 0x70], xmm0
call qword [sym.imp.WS2_32.dll_inet_addr]
movzx ecx, word [rbx + 0x900094]
mov dword [rsp + 0x74], eax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x72], ax
mov word [rsp + 0x70], r15w
mov dword [rbx + 0x9000b4], r14d
mov dword [rbx + 0xc], 1
cmp dword [rbx + 0xc], 1
jne 0x140017039
cmp dword [rbx + 0x9000a4], 0
je 0x140016fa6
mov r8d, dword [rbx + 0x90009c]
lea rax, [rsp + 0x70]
mov rcx, qword [0x140108b38]
lea rdx, [rbx + 0x14]
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov dword [rbx + 0x9000a4], r14d
mov rdx, qword [0x140108b30]
lea r8, [0x140108af0]
mov rcx, qword [0x140108b38]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x1400172df
test byte [0x140108af0], 1
je 0x140017039
mov rcx, qword [0x140108b38]
xor r9d, r9d
mov r8d, 0x800000
mov rdx, r13
mov rdi, r14
call qword [sym.imp.WS2_32.dll_recv]
movsxd rdx, eax
test eax, eax
jle 0x1400172df
nop word [rax + rax]
movsxd rcx, dword [rbx + 0x11000c4]
movzx eax, byte [rdi + r13]
mov byte [rcx + rbx + 0x9000c4], al
inc dword [rbx + 0x11000c4]
cmp dword [rbx + 0x11000c4], 0x800000
jb 0x14001702c
mov dword [rbx + 0x11000c4], r14d
inc rdi
cmp rdi, rdx
jl 0x140017000
jmp 0x1400172df
cmp dword [rbx + 0x9000b8], 1
jne 0x140017060
cmp dword [rbx + 0xc], 1
jne 0x140017060
mov rcx, qword [0x140108b38]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rbx + 0x9000b8], r14d
mov dword [rbx + 0xc], r14d
cmp dword [rbx + 0x9000bc], 1
jne 0x140017228
cmp dword [rbx + 0x10], 0
jne 0x140017228
cmp dword [rbx + 0x9000a0], 1
jne 0x140017228
xor r8d, r8d
mov edx, r15d
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
movzx ecx, word [rbx + 0x900098]
mov qword [0x140108b20], rax
mov qword [rbp - 0x78], r14
mov word [rbp - 0x80], r15w
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [0x140108b20]
lea rdx, [rbp - 0x80]
mov r8d, reloc.WS2_32.dll_recv
mov word [rbp - 0x7e], ax
mov dword [rbp - 0x7c], r14d
call qword [sym.imp.WS2_32.dll_bind]
lea r8, [rbx + 0x900014]
mov dword [rsp + 0x3c], 0x1b80
lea rdx, [rbp + 0x1cb0]
call fcn.140017390
lea rdx, [rsp + 0x3c]
lea rcx, [rbp + 0x130]
call qword [sym.imp.IPHLPAPI.DLL_GetAdaptersInfo]
test eax, eax
jne 0x140017191
movzx r14d, byte [rbp + 0x1cb2]
lea rsi, [rbp + 0x130]
movzx r15d, byte [rbp + 0x1cb1]
movzx r12d, byte [rbp + 0x1cb0]
lea rdi, [rsi + 0x1c0]
mov rdx, rdi
lea rcx, str.address:__s_n
call fcn.140016a10
mov r8, rdi
lea rdx, [rbp + 0x1cb8]
call fcn.140017390
cmp byte [rbp + 0x1cb8], r12b
jne 0x14001717e
cmp byte [rbp + 0x1cb9], r15b
jne 0x14001717e
cmp byte [rbp + 0x1cba], r14b
jne 0x14001717e
lea rcx, [rbp + 0x1cc0]
sub rcx, rdi
nop dword [rax]
movzx eax, byte [rdi]
mov byte [rcx + rdi], al
lea rdi, [rdi + 1]
test al, al
jne 0x140017170
mov rsi, qword [rsi]
test rsi, rsi
jne 0x140017123
xor r14d, r14d
lea rsi, [rbx + 8]
lea r15d, [r14 + 2]
lea rcx, [rbx + 0x900054]
call qword [sym.imp.WS2_32.dll_inet_addr]
lea rcx, [rbp + 0x1cc0]
mov dword [rsp + 0x48], eax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov rcx, qword [0x140108b20]
lea r9, [rsp + 0x48]
xor edx, edx
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x20], 8
lea r8d, [rdx + 0xc]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rdx, qword [0x140108b30]
mov r8d, 1
mov rcx, qword [0x140108b20]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [0x140108b20]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov dword [rsp + 0x40], 0x1000000
mov r8d, 0x1002
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rbx + 0x9000bc], r14d
mov dword [rbx + 0x10], 1
cmp dword [rbx + 0x10], 1
jne 0x1400172b8
mov rdx, qword [0x140108b30]
lea r8, [0x140108af0]
mov rcx, qword [0x140108b20]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x1400172df
test byte [0x140108af0], 1
je 0x1400172b8
mov rcx, qword [0x140108b20]
xor r9d, r9d
mov r8d, 0x800000
mov rdx, r13
mov rdi, r14
call qword [sym.imp.WS2_32.dll_recv]
movsxd rdx, eax
test eax, eax
jle 0x1400172df
movsxd rcx, dword [rbx + 0x11000c4]
movzx eax, byte [rdi + r13]
mov byte [rcx + rbx + 0x9000c4], al
inc dword [rbx + 0x11000c4]
cmp dword [rbx + 0x11000c4], 0x800000
jb 0x1400172ae
mov dword [rbx + 0x11000c4], r14d
inc rdi
cmp rdi, rdx
jl 0x140017282
jmp 0x1400172df
cmp dword [rbx + 0x9000c0], 1
jne 0x1400172df
cmp dword [rbx + 0x10], 1
jne 0x1400172df
mov rcx, qword [0x140108b20]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rbx + 0x9000b8], r14d
mov dword [rbx + 0xc], r14d
cmp dword [rbx + 0x9000a8], 0
je 0x140016b91
mov r12, qword [rsp + 0x1e58]
mov rdi, qword [rsp + 0x1e50]
cmp dword [rsi], 1
mov rsi, qword [rsp + 0x1e48]
mov r15, qword [rsp + 0x1e10]
mov r13, qword [rsp + 0x1e18]
jne 0x140017326
mov rcx, qword [0x140108b28]
call qword [sym.imp.WS2_32.dll_closesocket]
cmp dword [rbx + 0xc], 1
jne 0x140017339
mov rcx, qword [0x140108b38]
call qword [sym.imp.WS2_32.dll_closesocket]
cmp dword [rbx + 0x10], 1
jne 0x14001734c
mov rcx, qword [0x140108b20]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [0x140108b30]
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov dword [rbx + 0x9000a8], r14d
mov rcx, qword [rbp + 0x1d00]
xor rcx, rsp
call fcn.14001d8e0
add rsp, 0x1e20
pop r14
pop rbx
pop rbp
ret