Function at 0x140185140
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, 0x968
mov rax, qword [0x1402a15c0]
xor rax, rsp
mov qword [rsp + 0x950], 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 0x1401851b8
mov eax, 0xffffffff
jmp 0x140185969
mov rcx, qword [rsp + 0x970]
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov qword [rsp + 0x440], rax
cmp qword [rsp + 0x440], 0
jne 0x1401851e3
mov eax, 0xffffffff
jmp 0x140185969
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.1400a816c
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.1400ab1e0
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 + 0x978]
imul eax, eax, 0x3e8
mov dword [rsp + 0x20c], eax
call fcn.1400ab1e0
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 + 0x980]
cmp dword [rsp + 0x478], eax
jge 0x14018594e
mov r8d, 4
lea rdx, [rsp + 0x494]
lea rcx, [rsp + 0x1f4]
call fcn.1400ab100
test eax, eax
je 0x14018594e
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 0x140185390
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
cmp qword [rsp + 0x458], 0
je 0x140185386
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x918], rax
mov rcx, qword [rsp + 0x918]
call fcn.140071aa8
mov eax, 0xffffffff
jmp 0x140185969
movsxd rcx, dword [rsp + 0x218]
add rcx, 8
call fcn.140071ab0
mov qword [rsp + 0x920], rax
mov rax, qword [rsp + 0x920]
mov qword [rsp + 0x458], rax
movzx eax, word [rsp + 0x21c]
mov word [rsp + 0x948], ax
movzx ecx, word [rsp + 0x948]
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.1400a816c
movsxd r8, dword [rsp + 0x218]
mov rcx, qword [rsp + 0x458]
add rcx, 8
mov edx, 0x78
call fcn.1400a8080
movsxd rax, dword [rsp + 0x218]
add rax, 8
mov edx, eax
mov rcx, qword [rsp + 0x458]
call fcn.140185010
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.1400a816c
mov dword [rsp + 0x4a0], 0
mov byte [rsp + 0x4a4], 0
mov eax, dword [rsp + 0x988]
cmp dword [rsp + 0x4a0], eax
jge 0x140185894
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
mov rax, qword [rsp + 0x458]
mov qword [rsp + 0x928], rax
mov rcx, qword [rsp + 0x928]
call fcn.140071aa8
lea rcx, [rsp + 0x480]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
cmp dword [rsp + 0x464], 0xffffffff
jne 0x140185542
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xffffffff
jmp 0x140185969
mov dword [rsp + 0x230], 0
mov dword [rsp + 0x4c0], 0
jmp 0x14018556b
mov eax, dword [rsp + 0x4c0]
add eax, 1
mov dword [rsp + 0x4c0], eax
mov eax, dword [rsp + 0x230]
cmp dword [rsp + 0x4c0], eax
jae 0x140185598
mov ecx, dword [rsp + 0x4c0]
mov rax, qword [rsp + 0x220]
cmp qword [rsp + rcx*8 + 0x238], rax
jne 0x140185596
jmp 0x140185598
jmp 0x14018555a
mov eax, dword [rsp + 0x230]
cmp dword [rsp + 0x4c0], eax
jne 0x1401855da
cmp dword [rsp + 0x230], 0x40
jae 0x1401855da
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 0x14018554d
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 0x140185636
mov rcx, qword [rsp + 0x220]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xffffffff
jmp 0x140185969
cmp dword [rsp + 0x464], 0
jle 0x14018587e
lea rdx, [rsp + 0x230]
mov rcx, qword [rsp + 0x220]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14018587e
mov ecx, 0x5dc
call fcn.140071ab0
mov qword [rsp + 0x930], rax
mov rax, qword [rsp + 0x930]
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 0x140185708
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 + 0x4d0]
mov qword [rsp + 0x938], rax
mov rcx, qword [rsp + 0x938]
call fcn.140071aa8
mov eax, 0xffffffff
jmp 0x140185969
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.1400a816c
mov r9d, reloc.OLEAUT32.dll_SafeArrayLock
mov r8, qword [rsp + 0x4d0]
mov edx, reloc.OLEAUT32.dll_SafeArrayLock
lea rcx, [rsp + 0x4a8]
call fcn.1400a816c
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.140184f40
movzx eax, al
test eax, eax
je 0x140185861
movzx eax, word [rsp + 0x474]
movzx ecx, word [rsp + 0x48c]
sub eax, ecx
mov dword [rsp + 0x4e8], eax
cmp dword [rsp + 0x4e8], 0
jge 0x140185818
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.1400aaaf8
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.1400aaaf8
mov dword [rsp + 0x4ec], eax
mov rax, qword [rsp + 0x4d0]
mov qword [rsp + 0x940], rax
mov rcx, qword [rsp + 0x940]
call fcn.140071aa8
mov eax, dword [rsp + 0x4a0]
add eax, 1
mov dword [rsp + 0x4a0], eax
jmp 0x140185497
movzx eax, byte [rsp + 0x4a4]
test eax, eax
jne 0x1401858a5
jmp 0x140185927
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 0x140185927
mov r9, 0xffffffffffffffff
lea r8, str.Error_resolving_host_name
mov edx, 0x401
lea rcx, [rsp + 0x500]
call fcn.1400ab20c
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
jmp 0x1401852e8
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 + 0x950]
xor rcx, rsp
call fcn.1400a8050
add rsp, 0x968
ret