Function at 0x1400bf660
Capabilities:
Create raw socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push rbp
mov rbp, rsp
push r14
push r13
mov r13, rcx
mov ecx, 1
push r12
push rbx
mov rbx, rdx
mov edx, 0x368
and rsp, 0xfffffffffffffff0
sub rsp, 0x60
call sub.msvcrt.dll_calloc
mov r12, rax
test rax, rax
je 0x1400bf954
mov dword [rax + 0x34], 3
mov dword [rax + 0x50], 0x100
call fcn.140104670
mov edx, 0x2000
mov ecx, 1
mov qword [r12 + 0x278], rbx
mov qword [r12 + 0x38], rax
mov qword [r12 + 0x80], 0x2000
mov qword [r12 + 0x60], 0x2000
call sub.msvcrt.dll_calloc
mov edx, 0x2000
mov ecx, 1
mov qword [r12 + 0x58], rax
call sub.msvcrt.dll_calloc
mov ecx, 2
xor r8d, r8d
mov dword [r12 + 0x260], 0x2019
mov qword [r12 + 0x70], rax
mov edx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [r12], rax
mov rcx, rax
cmp rax, 0xffffffffffffffff
je 0x1400bf918
lea r9, [rsp + 0x40]
mov r8d, 0x1002
mov edx, 0xffff
mov dword [rsp + 0x40], 0x400
mov dword [rsp + 0x20], 4
mov rbx, qword [sym.imp.WS2_32.dll_setsockopt]
call rbx
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x44]
mov rcx, qword [r12]
mov dword [rsp + 0x44], 1
mov r8d, 4
mov edx, 0xffff
call rbx
test eax, eax
js 0x1400bf880
lea r8, [rsp + 0x48]
mov edx, 0x8004667e
mov rcx, qword [r12]
mov dword [rsp + 0x48], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, 2
mov ecx, 0x7f000001
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
lea r14, [rsp + 0x50]
mov word [rsp + 0x50], ax
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [r12]
mov r8d, 0x10
mov rdx, r14
mov dword [rsp + 0x54], eax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1400bf850
mov dword [rsp + 0x4c], 0x64
mov rcx, qword [r12]
lea r8, [rsp + 0x4c]
mov rdx, r14
call qword [sym.imp.WS2_32.dll_getsockname]
movzx eax, word [rsp + 0x52]
mov word [r12 + 0x1c], ax
mov ecx, 0x10
mov edx, 0x10
call qword [sym.imp.msvcrt.dll__aligned_malloc]
mov qword [r12 + 0x2f0], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeSListHead]
test r13, r13
je 0x1400bf839
mov rdx, r12
mov rcx, r13
call fcn.1400beb00
test eax, eax
jne 0x1400bf8b8
lea rsp, [rbp - 0x20]
mov rax, r12
pop rbx
pop r12
pop r13
pop r14
pop rbp
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], eax
lea rax, [0x1402be0e3]
lea r8, str.dap_context
mov qword [rsp + 0x20], rax
call fcn.14005a150
jmp 0x1400bf800
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, 5
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], eax
lea rax, str.Cant_set_up_REUSEADDR_flag_to_the_socket__err:__d
lea r8, str.dap_context
mov qword [rsp + 0x20], rax
call fcn.14005a150
jmp 0x1400bf778
mov r13, qword [sym.imp.msvcrt.dll__errno]
call r13
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx], eax
call r13
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov eax, dword [rax]
lea r8, str.dap_context
mov dword [rsp + 0x30], eax
mov rax, qword [r12]
mov qword [rsp + 0x28], rax
lea rax, str.Cant_add_esocket__llu_to_polling__err__d
mov qword [rsp + 0x20], rax
call fcn.14005a150
lea rsp, [rbp - 0x20]
mov rax, r12
pop rbx
pop r12
pop r13
pop r14
pop rbp
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], eax
lea rax, str.Error_creating_socket_for_TYPE_QUEUE:__d
lea r8, str.dap_context
mov qword [rsp + 0x20], rax
call fcn.14005a150
mov rcx, r12
xor r12d, r12d
call sub.msvcrt.dll_free
jmp 0x1400bf839
lea rax, str.Cant_allocate_esocket_
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.dap_context
call fcn.14005a150
jmp 0x1400bf839