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

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rbx, rcx
xor ebp, ebp
mov edi, 0x9951
xor ecx, ecx
mov word [rax + 8], di
mov rsi, rbp
mov r15d, ebp
call fcn.18001ab60
xor ecx, ecx
mov qword [rbx + 0xd70], rax
call fcn.18001ab60
mov ecx, edi
add rax, 0x12c
mov qword [rbx + 0xd78], rax
lea eax, [rbp + 2]
mov word [rbx + 0xd80], ax
call qword [sym.imp.WS2_32.dll_htons]
mov dword [rbx + 0xd84], 0x10000e0
mov rdi, rbp
mov dword [rsp + 0x98], ebp
mov r13d, ebp
mov word [rbx + 0xd82], ax
mov r12d, ebp
xor r8d, r8d
lea rax, [rsp + 0x98]
mov r9, rdi
lea edx, [r8 + 0x2e]
mov qword [rsp + 0x20], rax
lea ecx, [rdx - 0x2c]
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
mov ebp, eax
cmp eax, 0x6f
jne 0x180022d15
test rdi, rdi
je 0x180022cdc
mov rcx, qword [0x180059270]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8d, dword [rsp + 0x98]
mov rcx, qword [0x180059270]
xor edx, edx
add r8d, 0xb8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x180022d10
inc r12d
cmp r12d, 0xa
jb 0x180022c9f
xor r12d, r12d
jmp 0x180022d1d
mov ebp, 8
xor r12d, r12d
cmp ebp, r12d
je 0x180022d36
cmp rdi, r12
je 0x180022d50
mov rcx, qword [0x180059270]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180022d50
mov rax, rdi
cmp rdi, r12
je 0x180022d4a
mov rax, qword [rax + 8]
inc r13d
cmp rax, r12
jne 0x180022d3e
mov rsi, rdi
mov r15d, r13d
cmp ebp, r12d
lea rax, [0x18002281c]
mov r13d, 2
cmovne rsi, r12
lea rbp, [rbx + 0xdb0]
lea r9, [rsp + 0x90]
mov qword [rsp + 0x48], rbp
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
mov r8d, r13d
mov edx, r13d
mov rcx, rbx
mov dword [rsp + 0x28], 1
mov qword [rsp + 0xa0], rsi
mov dword [rsp + 0x20], 1
call fcn.180033e44
mov edi, eax
cmp eax, r12d
jne 0x180022e2e
mov rcx, qword [rbp]
mov dword [rsp + 0x90], r12d
lea r9, [rsp + 0x90]
mov rcx, qword [rcx]
lea r8d, [r13 + 9]
xor edx, edx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp rsi, r12
je 0x180022e18
mov r12, rsi
xor esi, esi
mov rcx, qword [rbp]
mov r8d, dword [r12 + 4]
lea rdx, [rbx + 0xd84]
mov rcx, qword [rcx]
call fcn.180033ce0
mov r12, qword [r12 + 8]
cmp r12, rsi
jne 0x180022de9
mov rsi, qword [rsp + 0xa0]
xor r12d, r12d
jmp 0x180022e2e
mov rcx, qword [rbp]
lea rdx, [rbx + 0xd84]
xor r8d, r8d
mov rcx, qword [rcx]
call fcn.180033ce0
mov rdx, qword [rbp]
cmp rdx, r12
jne 0x180022e40
cmp qword [rbx + 0xdb8], r12
je 0x180022e87
mov edi, r12d
cmp rdx, r12
je 0x180022e64
mov rcx, rbx
call fcn.180033d5c
mov edi, eax
cmp eax, r12d
je 0x180022e64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, r12d
jne 0x180022e87
mov rdx, qword [rbx + 0xdb8]
cmp rdx, r12
je 0x180022e87
mov rcx, rbx
call fcn.180033d5c
mov edi, eax
cmp eax, r12d
je 0x180022e87
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x180059270]
xor edx, edx
cmp rsi, r12
je 0x18002301e
lea r8d, [r15 + r15*8]
shl r8d, 4
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx + 0xdc0], rax
cmp rax, r12
je 0x1800230ea
mov r14d, r12d
mov rbp, rsi
xor r15d, r15d
cmp dword [rbp + 0x68], 1
jne 0x180023002
mov rax, qword [rbp + 0x18]
cmp rax, r15
je 0x180023002
mov r13, qword [rax + 0x10]
cmp r13, r15
je 0x180023002
cmp dword [rax + 0x18], 0x10
jne 0x180023002
mov ecx, 0x9951
call qword [sym.imp.WS2_32.dll_htons]
xor r8d, r8d
mov word [r13 + 2], ax
lea eax, [r8 + 2]
mov edx, eax
mov ecx, eax
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rbx + 0xdc0]
mov qword [r12 + rcx], rax
mov rax, qword [rbx + 0xdc0]
mov rcx, qword [rax + r12]
cmp rcx, 0xffffffffffffffff
je 0x180022ffe
mov r8d, 0x10
mov rdx, r13
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, r15d
jne 0x180022feb
mov eax, r14d
mov r8d, 0x10
mov rdx, r13
lea rcx, [rax + rax*8]
mov rax, qword [rbx + 0xdc0]
add rcx, rcx
lea rcx, [rax + rcx*8 + 8]
call sub.ntdll.dll_memcpy
mov r11, qword [rbx + 0xdc0]
mov r13d, 4
mov dword [r11 + r12 + 0x88], 0x10
mov rcx, qword [rbx + 0xdc0]
mov dword [rsp + 0x90], 0x32
mov rcx, qword [rcx + r12]
lea r9, [rsp + 0x90]
lea r8d, [r13 + 6]
xor edx, edx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0xdc0]
mov dword [rsp + 0x90], r15d
mov rcx, qword [rcx + r12]
lea r9, [rsp + 0x90]
lea r8d, [r13 + 7]
xor edx, edx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WS2_32.dll_setsockopt]
inc r14d
add r12, 0x90
jmp 0x180023002
mov rcx, qword [rbx + 0xdc0]
mov rcx, qword [rcx + r12]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180023002
mov qword [rax + r12], r15
mov rbp, qword [rbp + 8]
cmp rbp, r15
jne 0x180022ec0
mov dword [rbx + 0xdc8], r14d
xor r12d, r12d
jmp 0x1800230ea
mov r8d, 0x90
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx + 0xdc0], rax
cmp rax, r12
je 0x180023101
xor r8d, r8d
mov edx, r13d
mov ecx, r13d
mov dword [rbx + 0xdc8], 1
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rbx + 0xdc0]
mov qword [rcx], rax
mov rax, qword [rbx + 0xdc0]
cmp qword [rax], 0xffffffffffffffff
je 0x1800230e7
lea rcx, [rax + 8]
xor edx, edx
mov r8d, 0x80
call sub.ntdll.dll_memset
mov r11, qword [rbx + 0xdc0]
mov esi, 4
mov dword [r11 + 0x88], r12d
mov rcx, qword [rbx + 0xdc0]
mov dword [rsp + 0x90], 0x32
mov rcx, qword [rcx]
lea r9, [rsp + 0x90]
lea r8d, [rsi + 6]
xor edx, edx
mov dword [rsp + 0x20], esi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0xdc0]
mov dword [rsp + 0xa0], r12d
mov rcx, qword [rcx]
lea r9, [rsp + 0xa0]
lea r8d, [rsi + 7]
xor edx, edx
mov dword [rsp + 0x20], esi
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x180023101
mov qword [rax], r12
cmp rsi, r12
je 0x180023101
mov rcx, qword [0x180059270]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov rbx, qword [rsp + 0xa8]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret