Function at 0x1400666d0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xe8
mov rbx, rdx
mov rsi, rcx
movzx eax, byte [0x14034be90]
mov rcx, qword [0x14034bdf0]
test rcx, rcx
jne 0x140066715
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x140066c05
mov rcx, rax
mov qword [0x14034bdf0], rax
mov r8d, 0x18
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x140066c05
mov rdi, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov byte [rax + 0x10], 0
mov r14, qword [rbx + 0x18]
cmp r14, 0xffffffffffffffff
je 0x140066c05
xorps xmm0, xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x2c], 0x80
lea rdx, [rsp + 0x60]
lea r8, [rsp + 0x2c]
mov rcx, r14
call sub.ws2_32.dll_getpeername
cmp eax, 0xffffffff
je 0x1400667ed
mov eax, dword [rsp + 0x2c]
movzx ecx, word [rsp + 0x60]
cmp ecx, 0x17
je 0x140066803
cmp ecx, 2
jne 0x14006684f
cmp eax, 0xf
jbe 0x140066c05
mov eax, dword [rsp + 0x64]
movzx ecx, word [rsp + 0x62]
rol cx, 8
movzx r12d, cx
shl r12, 0x20
or r12, rax
xor ebp, ebp
mov qword [rsp + 0x40], rax
jmp 0x14006685f
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
mov bp, 2
jmp 0x14006685a
cmp eax, 0x1b
jbe 0x140066c05
mov rax, qword [rsp + 0x70]
mov r12, qword [rsp + 0x68]
movzx ecx, word [rsp + 0x62]
rol cx, 8
mov word [rsp + 0x3e], cx
mov ecx, dword [rsp + 0x64]
mov dword [rsp + 0x5c], ecx
mov rbx, rax
shld rbx, r12, 0x20
mov ecx, dword [rsp + 0x78]
mov dword [rsp + 0x58], ecx
shl r12, 0x10
shr rax, 0x20
mov qword [rsp + 0x40], rax
mov bp, 1
jmp 0x14006685f
mov bp, 2
lea rbx, str.invalid_argument8
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x2c], 0x80
lea rdx, [rsp + 0x60]
lea r8, [rsp + 0x2c]
mov rcx, r14
call sub.ws2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x140066931
mov eax, dword [rsp + 0x2c]
movzx ecx, word [rsp + 0x60]
cmp ecx, 2
je 0x140066975
cmp ecx, 0x17
jne 0x1400669e6
mov dword [rsp + 0x38], ebp
cmp eax, 0x1b
jbe 0x140066c05
mov rax, qword [rsp + 0x70]
mov r13, qword [rsp + 0x68]
movzx ecx, word [rsp + 0x62]
rol cx, 8
mov edx, dword [rsp + 0x64]
mov r14, rax
shld r14, r13, 0x20
mov r8d, dword [rsp + 0x78]
shl r13, 0x10
shr rax, 0x20
mov qword [rsp + 0x48], rax
mov bp, 1
cmp bp, 2
sete r15b
cmp word [rsp + 0x38], 2
jne 0x1400669b1
jmp 0x140066a19
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r14d, eax
shl r14, 0x20
or r14, 2
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
mov eax, dword [rsp + 0x32]
mov dword [rsi + 0x1a], eax
movzx eax, word [rsp + 0x36]
mov word [rsi + 0x1e], ax
mov r15b, 1
cmp bp, 2
je 0x140066a42
jmp 0x140066a60
mov dword [rsp + 0x38], ebp
cmp eax, 0xf
jbe 0x140066c05
mov eax, dword [rsp + 0x64]
movzx ecx, word [rsp + 0x62]
rol cx, 8
movzx r13d, cx
shl r13, 0x20
or r13, rax
xor ebp, ebp
mov qword [rsp + 0x48], rax
cmp bp, 2
sete r15b
cmp word [rsp + 0x38], 2
je 0x140066a19
cmp bp, 2
je 0x140066a19
mov dword [rsp + 0x50], r8d
mov dword [rsp + 0x54], edx
mov word [rsp + 0x3c], cx
movzx eax, byte [0x14034be90]
mov rcx, qword [0x14034bdf0]
test rcx, rcx
je 0x140066b2d
mov r15, qword [rsp + 0x48]
jmp 0x140066b4b
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
mov eax, dword [rsp + 0x32]
mov dword [rsi + 0x1a], eax
movzx eax, word [rsp + 0x36]
mov word [rsi + 0x1e], ax
mov r15b, 1
lea r14, str.invalid_argument8
cmp bp, 2
je 0x140066a42
jmp 0x140066a60
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
mov eax, dword [rsp + 0x32]
mov dword [rsi + 0x1a], eax
movzx eax, word [rsp + 0x36]
mov word [rsi + 0x1e], ax
cmp word [rsp + 0x38], 2
jne case.0x140066a55.0
mov eax, ebx
and eax, 3
lea rcx, [0x1403396b0]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
test r15b, r15b
je 0x140066bf1
mov eax, r14d
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x140066bf1
test rax, rax
je 0x140066bf1
lea rsi, [r14 - 1]
mov rdi, qword [r14 - 1]
mov rbx, qword [r14 + 7]
mov rcx, rdi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x140066ab2
cmp qword [rbx + 0x10], 0x11
jb 0x140066aa0
mov rdi, qword [rdi - 8]
mov rcx, qword [0x14034bdf0]
xor edx, edx
mov r8, rdi
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, qword [0x14034bdf0]
xor edx, edx
mov r8, rsi
add rsp, 0xe8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.kernel32.dll_HeapFree]
lea rsi, [rbx - 1]
mov rdi, qword [rbx - 1]
mov rbx, qword [rbx + 7]
mov rcx, rdi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x140066b0d
cmp qword [rbx + 0x10], 0x11
jb 0x140066afb
mov rdi, qword [rdi - 8]
mov rcx, qword [0x14034bdf0]
xor edx, edx
mov r8, rdi
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, qword [0x14034bdf0]
xor edx, edx
mov r8, rsi
call qword [sym.imp.kernel32.dll_HeapFree]
test r15b, r15b
jne 0x140066a60
jmp 0x140066bf1
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
mov r15, qword [rsp + 0x48]
je 0x140066c05
mov rcx, rax
mov qword [0x14034bdf0], rax
mov r8d, 0x40
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x140066c05
mov ecx, dword [rsp + 0x38]
mov word [rax], cx
mov dword [rax + 2], r12d
shr r12, 0x20
mov word [rax + 6], r12w
mov qword [rax + 8], rbx
mov rcx, qword [rsp + 0x40]
mov dword [rax + 0x10], ecx
mov ecx, dword [rsp + 0x5c]
mov dword [rax + 0x14], ecx
mov ecx, dword [rsp + 0x58]
mov dword [rax + 0x18], ecx
movzx ecx, word [rsp + 0x3e]
mov word [rax + 0x1c], cx
mov word [rax + 0x20], bp
mov dword [rax + 0x22], r13d
shr r13, 0x20
mov word [rax + 0x26], r13w
mov qword [rax + 0x28], r14
mov dword [rax + 0x30], r15d
mov ecx, dword [rsp + 0x54]
mov dword [rax + 0x34], ecx
mov ecx, dword [rsp + 0x50]
mov dword [rax + 0x38], ecx
movzx ecx, word [rsp + 0x3c]
mov word [rax + 0x3c], cx
mov qword [rsi], rax
lea rax, method.__5_.virtual_0
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
movzx eax, word [rsp + 0x36]
mov word [rsi + 0x1e], ax
mov eax, dword [rsp + 0x32]
mov dword [rsi + 0x1a], eax
add rsp, 0xe8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2