Function at 0x140185070
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x978
mov rax, qword [0x1402a25c0]
xor rax, rsp
mov qword [rsp + 0x968], rax
mov dword [rsp + 0x21c], 0
mov dword [rsp + 0x218], 0x20
mov qword [rsp + 0x450], 0
mov qword [rsp + 0x458], 0
lea rdx, [rsp + 0x50]
mov cx, 0x101
call qword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, 0xffffffff
jne 0x1401850e8
mov eax, 0xffffffff
jmp 0x1401858e2
mov rcx, qword [rsp + 0x980]
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov qword [rsp + 0x440], rax
cmp qword [rsp + 0x440], 0
jne 0x140185113
mov eax, 0xffffffff
jmp 0x1401858e2
mov r8, qword [rsp + 0x440]
mov r8, qword [r8 + 0x18]
mov r9d, 4
mov r8, qword [r8]
mov edx, 4
lea rcx, [rsp + 0x448]
call fcn.1400a815c
mov ecx, dword [rsp + 0x448]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov qword [rsp + 0x450], rax
mov r8d, 1
mov edx, 3
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x220], rax
mov rcx, qword [rsp + 0x450]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x1f4], eax
mov eax, 2
mov word [rsp + 0x1f0], ax
call fcn.1400ab1c0
mov word [rsp + 0x1f2], ax
mov dword [rsp + 0x460], 0x10
mov dword [rsp + 0x464], 0
mov dword [rsp + 0x208], 0
mov dword [rsp + 0x20c], 0
mov eax, dword [rsp + 0x988]
imul eax, eax, 0x3e8
mov dword [rsp + 0x20c], eax
call fcn.1400ab1c0
movzx ecx, ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x214], ax
mov byte [rsp + 0x211], 0
mov byte [rsp + 0x210], 8
mov dword [rsp + 0x478], 0
mov dword [rsp + 0x200], 1
mov eax, dword [rsp + 0x990]
cmp dword [rsp + 0x478], eax
jge 0x1401858c7
mov r8d, 4
lea rdx, [rsp + 0x494]
lea rcx, [rsp + 0x1f4]
call fcn.1400ab0e0
test eax, eax
je 0x1401858c7
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x200]
mov r8d, 4
xor edx, edx
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x1401852b2
call qword [sym.imp.WS2_32.dll_WSACleanup]
cmp qword [rsp + 0x458], 0
je 0x1401852a8
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x918], rax
mov rcx, qword [rsp + 0x918]
call fcn.140071ab0
mov eax, 0xffffffff
jmp 0x1401858e2
movsxd rcx, dword [rsp + 0x218]
add rcx, 8
call fcn.140071aa8
mov qword [rsp + 0x920], rax
mov rax, qword [rsp + 0x920]
mov qword [rsp + 0x458], rax
movzx eax, word [rsp + 0x21c]
mov word [rsp + 0x960], ax
movzx ecx, word [rsp + 0x960]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x216], ax
mov eax, dword [rsp + 0x21c]
add eax, 1
mov dword [rsp + 0x21c], eax
xor eax, eax
mov word [rsp + 0x212], ax
mov r9d, 8
lea r8, [rsp + 0x210]
mov edx, 8
mov rcx, qword [rsp + 0x458]
call fcn.1400a815c
movsxd r8, dword [rsp + 0x218]
mov rcx, qword [rsp + 0x458]
add rcx, 8
mov edx, 0x78
call fcn.1400a8070
movsxd rax, dword [rsp + 0x218]
add rax, 8
mov edx, eax
mov rcx, qword [rsp + 0x458]
call fcn.140184f40
movzx ecx, ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x212], ax
mov r9d, 8
lea r8, [rsp + 0x210]
mov edx, 8
mov rcx, qword [rsp + 0x458]
call fcn.1400a815c
mov dword [rsp + 0x4a0], 0
mov byte [rsp + 0x4a4], 0
mov eax, dword [rsp + 0x998]
cmp dword [rsp + 0x4a0], eax
jge 0x1401857f0
movsxd rcx, dword [rsp + 0x218]
add rcx, 8
mov dword [rsp + 0x28], reloc.OLEAUT32.dll_SafeArrayGetDim
lea rax, [rsp + 0x1f0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, ecx
mov rdx, qword [rsp + 0x458]
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_sendto]
mov dword [rsp + 0x464], eax
lea rcx, [rsp + 0x480]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
cmp dword [rsp + 0x464], 0xffffffff
jne 0x140185464
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x928], rax
mov rcx, qword [rsp + 0x928]
call fcn.140071ab0
mov eax, 0xffffffff
jmp 0x1401858e2
mov dword [rsp + 0x230], 0
mov dword [rsp + 0x4c0], 0
jmp 0x14018548d
mov eax, dword [rsp + 0x4c0]
add eax, 1
mov dword [rsp + 0x4c0], eax
mov eax, dword [rsp + 0x230]
cmp dword [rsp + 0x4c0], eax
jae 0x1401854ba
mov ecx, dword [rsp + 0x4c0]
mov rax, qword [rsp + 0x220]
cmp qword [rsp + rcx*8 + 0x238], rax
jne 0x1401854b8
jmp 0x1401854ba
jmp 0x14018547c
mov eax, dword [rsp + 0x230]
cmp dword [rsp + 0x4c0], eax
jne 0x1401854fc
cmp dword [rsp + 0x230], 0x40
jae 0x1401854fc
mov ecx, dword [rsp + 0x4c0]
mov rax, qword [rsp + 0x220]
mov qword [rsp + rcx*8 + 0x238], rax
mov eax, dword [rsp + 0x230]
add eax, 1
mov dword [rsp + 0x230], eax
xor eax, eax
test eax, eax
jne 0x14018546f
lea rax, [rsp + 0x208]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x230]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov dword [rsp + 0x464], eax
cmp dword [rsp + 0x464], 0xffffffff
jne 0x140185575
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x930], rax
mov rcx, qword [rsp + 0x930]
call fcn.140071ab0
mov eax, 0xffffffff
jmp 0x1401858e2
cmp dword [rsp + 0x464], 0
jle 0x1401857da
lea rdx, [rsp + 0x230]
mov rcx, qword [rsp + 0x220]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1401857da
mov ecx, 0x5dc
call fcn.140071aa8
mov qword [rsp + 0x938], rax
mov rax, qword [rsp + 0x938]
mov qword [rsp + 0x4d0], rax
lea rax, [rsp + 0x460]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x490]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x5dc
mov rdx, qword [rsp + 0x4d0]
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rsp + 0x464], eax
cmp dword [rsp + 0x464], 0xffffffff
jne 0x140185664
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x940], rax
mov rcx, qword [rsp + 0x940]
call fcn.140071ab0
mov rax, qword [rsp + 0x4d0]
mov qword [rsp + 0x948], rax
mov rcx, qword [rsp + 0x948]
call fcn.140071ab0
mov eax, 0xffffffff
jmp 0x1401858e2
lea rcx, [rsp + 0x468]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
mov byte [rsp + 0x4a4], 1
mov qword [rsp + 0x4c8], 0
mov rax, qword [rsp + 0x4d0]
add rax, 0x14
mov qword [rsp + 0x4c8], rax
movsxd rax, dword [rsp + 0x464]
sub rax, 0x14
mov dword [rsp + 0x4d8], eax
mov r9d, 8
mov r8, qword [rsp + 0x4c8]
mov edx, 8
lea rcx, [rsp + 0x4e0]
call fcn.1400a815c
mov r9d, reloc.OLEAUT32.dll_SafeArrayLock
mov r8, qword [rsp + 0x4d0]
mov edx, reloc.OLEAUT32.dll_SafeArrayLock
lea rcx, [rsp + 0x4a8]
call fcn.1400a815c
movzx r11d, word [rsp + 0x4e4]
mov word [rsp + 0x4e4], r11w
movzx eax, word [rsp + 0x4e6]
mov word [rsp + 0x4e6], ax
movzx ecx, word [rsp + 0x4e2]
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x4e2], ax
mov edx, dword [rsp + 0x4d8]
mov rcx, qword [rsp + 0x4c8]
call fcn.140184e70
movzx eax, al
test eax, eax
je 0x1401857bd
movzx eax, word [rsp + 0x474]
movzx ecx, word [rsp + 0x48c]
sub eax, ecx
mov dword [rsp + 0x4e8], eax
cmp dword [rsp + 0x4e8], 0
jge 0x140185774
mov eax, dword [rsp + 0x4e8]
add eax, 0x3c
mov dword [rsp + 0x4e8], eax
movzx ecx, word [rsp + 0x476]
movzx eax, word [rsp + 0x48e]
sub ecx, eax
call fcn.1400b10b4
mov dword [rsp + 0x4f0], eax
mov dword [rsp + 0x4ec], 0
mov ecx, dword [rsp + 0x4e8]
imul ecx, ecx, 0x3e8
sub ecx, dword [rsp + 0x4f0]
call fcn.1400b10b4
mov dword [rsp + 0x4ec], eax
mov rax, qword [rsp + 0x4d0]
mov qword [rsp + 0x950], rax
mov rcx, qword [rsp + 0x950]
call fcn.140071ab0
mov eax, dword [rsp + 0x4a0]
add eax, 1
mov dword [rsp + 0x4a0], eax
jmp 0x1401853b9
movzx eax, byte [rsp + 0x4a4]
test eax, eax
jne 0x140185801
jmp 0x140185883
mov eax, dword [rsp + 0x4b4]
mov dword [rsp + 0x910], eax
mov ecx, dword [rsp + 0x910]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov qword [rsp + 0x4f8], rax
mov dword [rsp + 0x30], 8
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x401
lea r8, [rsp + 0x500]
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rcx, [rsp + 0x490]
call qword [sym.imp.WS2_32.dll_getnameinfo]
cmp eax, 0xffffffff
jne 0x140185883
mov r9, 0xffffffffffffffff
lea r8, str.Error_resolving_host_name
mov edx, 0x401
lea rcx, [rsp + 0x500]
call fcn.1400ab1ec
mov eax, dword [rsp + 0x478]
add eax, 1
mov dword [rsp + 0x478], eax
mov eax, dword [rsp + 0x200]
add eax, 1
mov dword [rsp + 0x200], eax
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x958], rax
mov rcx, qword [rsp + 0x958]
call fcn.140071ab0
jmp 0x140185218
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [rsp + 0x478]
mov rcx, qword [rsp + 0x968]
xor rcx, rsp
call fcn.1400a8040
add rsp, 0x978
ret