Function at 0x140012a30
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push rbx
push rsi
sub rsp, 0x58
mov rax, qword [0x140295010]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rsi, rcx
mov ecx, 0x2b10
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x140012a69
call qword [0x140295070]
xor eax, eax
jmp 0x140012de5
xor edx, edx
mov qword [rsp + 0x80], rdi
mov r8d, 0x2b10
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
mov ecx, 0x72000
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140012aae
call qword [0x140295070]
mov rcx, rbx
mov qword [rbx + 0x28], rdi
call qword [0x140295068]
xor eax, eax
jmp 0x140012ddd
mov qword [rsp + 0x78], rbp
xor edx, edx
mov r8d, 0x72000
mov qword [rsp + 0x50], r14
mov rcx, rdi
mov qword [rbx + 0x28], rdi
call sub.VCRUNTIME140.dll_memset
mov r14d, 2
xor r8d, r8d
mov edx, r14d
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx], rax
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140012daf
xor ebp, ebp
test rsi, rsi
je 0x140012b33
movzx ecx, word [rsi + 4]
mov qword [rsp + 0x40], rbp
mov word [rsp + 0x38], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3a], ax
lea r8d, [r14 + 0xe]
mov eax, dword [rsi]
mov rcx, rdi
lea rdx, [rsp + 0x38]
mov dword [rsp + 0x3c], eax
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x140012daf
mov rcx, qword [rbx]
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov dword [rsp + 0x30], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rcx, qword [rbx]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov dword [rsp + 0x30], 1
mov r8d, 0x20
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov dword [rsp + 0x30], 0x40000
mov r8d, 0x1002
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov dword [rsp + 0x30], 0x40000
mov r8d, 0x1001
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test rsi, rsi
je 0x140012c0d
mov rcx, qword [rbx]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov dword [rsp + 0x30], setsockopt
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x140012c06
mov eax, dword [rsp + 0x3c]
movzx ecx, word [rsp + 0x3a]
mov dword [rbx + 8], eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rbx + 0xc], ax
jmp 0x140012c0d
mov rax, qword [rsi]
mov qword [rbx + 8], rax
mov dword [rbx + 0x20], ebx
call qword [sym.imp.WINMM.dll_timeGetTime]
add dword [rbx + 0x20], eax
mov eax, dword [rbx + 0x20]
ror eax, 0x10
mov dword [rbx + 0x20], eax
lea rax, [rbx + 0x48]
mov qword [rbx + 0x30], 0x400
mov qword [rax], rax
mov qword [rax + 8], rax
imul rax, qword [rbx + 0x30], 0x1c8
mov rsi, qword [rbx + 0x28]
add rax, rsi
mov qword [rbx + 0x38], 1
mov qword [rbx + 0x10], rbp
mov dword [rbx + 0x18], ebp
mov dword [rbx + 0x24], ebp
mov dword [rbx + 0x1c], 0x578
mov qword [rbx + 0x670], rbp
mov qword [rbx + 0xa88], rbp
mov qword [rbx + 0xa90], rbp
mov dword [rbx + 0x2ab8], ebp
mov word [rbx + 0x2abc], bp
mov qword [rbx + 0x2ac0], rbp
mov qword [rbx + 0x2ac8], rbp
mov qword [rbx + 0x2ad0], rbp
mov qword [rbx + 0x2ad8], rbp
mov qword [rbx + 0x2ae8], rbp
mov qword [rbx + 0x2af0], rbp
mov qword [rbx + 0x2af8], 0xfff
mov qword [rbx + 0x2b00], 0x2000000
mov qword [rbx + 0x2b08], 0x2000000
mov qword [rbx + 0xa98], rbp
mov qword [rbx + 0xaa0], rbp
mov qword [rbx + 0xaa8], rbp
mov qword [rbx + 0xab0], rbp
mov qword [rbx + 0x2ae0], rbp
cmp rsi, rax
jae 0x140012daa
lea rdi, [rsi + 0xf8]
movabs r14, 0x23ee08fb823ee09
nop word [rax + rax]
mov qword [rdi - 0xe8], rbx
mov rcx, rsi
sub rcx, qword [rbx + 0x28]
mov rax, r14
imul rcx
mov rcx, rsi
mov word [rdi - 0xd8], 0xffff
sar rdx, 2
mov rax, rdx
mov qword [rdi - 0xc8], rbp
shr rax, 0x3f
add rdx, rax
lea rax, [rdi - 0x18]
mov qword [rax], rax
mov qword [rdi - 0x10], rax
lea rax, [rdi - 8]
mov qword [rax], rax
mov qword [rdi], rax
lea rax, [rdi + 8]
mov qword [rax], rax
mov qword [rdi + 0x10], rax
lea rax, [rdi + 0x18]
mov qword [rax], rax
mov qword [rdi + 0x20], rax
lea rax, [rdi + 0x28]
mov qword [rax], rax
mov qword [rdi + 0x30], rax
mov word [rdi - 0xde], dx
call fcn.140013a80
imul rax, qword [rbx + 0x30], 0x1c8
add rsi, 0x1c8
lea rdi, [rdi + 0x1c8]
add rax, qword [rbx + 0x28]
cmp rsi, rax
jb 0x140012d10
mov rax, rbx
jmp 0x140012dd3
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x140012dbe
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rbx + 0x28]
call qword [0x140295068]
mov rcx, rbx
call qword [0x140295068]
xor eax, eax
mov rbp, qword [rsp + 0x78]
mov r14, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401e8230
add rsp, 0x58
pop rsi
pop rbx
ret