Function at 0x1800584c0
Capabilities:
Get local ipv4 addresses
Get socket information
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xf8
mov rbx, rdx
mov rsi, rcx
movzx eax, byte [0x1801fd9d8]
mov rcx, qword [0x1801fd960]
test rcx, rcx
jne 0x180058505
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x18005897f
mov rcx, rax
mov qword [0x1801fd960], rax
mov r8d, 0x18
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x18005897f
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 0x18005897b
pxor xmm0, xmm0
movdqa xmmword [rsp + 0xe0], xmm0
movdqa xmmword [rsp + 0xd0], xmm0
movdqa xmmword [rsp + 0xc0], xmm0
movdqa xmmword [rsp + 0xb0], xmm0
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmmword [rsp + 0x90], xmm0
movdqa xmmword [rsp + 0x80], xmm0
movdqa xmmword [rsp + 0x70], xmm0
mov dword [rsp + 0x40], 0x80
lea rdx, [rsp + 0x70]
lea r8, [rsp + 0x40]
mov rcx, r14
call sub.ws2_32.dll_getpeername
cmp eax, 0xffffffff
je 0x18005861b
mov eax, dword [rsp + 0x40]
movzx ecx, word [rsp + 0x70]
cmp ecx, 2
je 0x18005862d
cmp ecx, 0x17
jne 0x180058651
cmp eax, 0x1c
jb 0x18005897b
movzx eax, word [rsp + 0x72]
rol ax, 8
mov word [rsp + 0x2a], ax
movdqu xmm0, xmmword [rsp + 0x78]
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x3c], eax
movq rax, xmm0
pshufd xmm1, xmm0, 0xee
movq rbx, xmm1
shld rbx, rax, 0x20
movdqu xmmword [rsp + 0x5a], xmm0
pshufd xmm0, xmm0, 0xff
movd dword [rsp + 0x38], xmm0
mov r15w, 1
jmp 0x180058662
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
jmp 0x18005865d
cmp eax, 0x10
jb 0x18005897b
movzx eax, word [rsp + 0x72]
rol ax, 8
mov ecx, dword [rsp + 0x74]
mov word [rsp + 0x5c], ax
mov dword [rsp + 0x58], ecx
xor r15d, r15d
jmp 0x180058662
lea rbx, str.invalid_argument
mov qword [rsp + 0x5e], rbx
mov r15w, 2
pxor xmm0, xmm0
movdqa xmmword [rsp + 0xe0], xmm0
movdqa xmmword [rsp + 0xd0], xmm0
movdqa xmmword [rsp + 0xc0], xmm0
movdqa xmmword [rsp + 0xb0], xmm0
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmmword [rsp + 0x90], xmm0
movdqa xmmword [rsp + 0x80], xmm0
movdqa xmmword [rsp + 0x70], xmm0
mov dword [rsp + 0x24], 0x80
lea rdx, [rsp + 0x70]
lea r8, [rsp + 0x24]
mov rcx, r14
call sub.ws2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x180058705
mov eax, dword [rsp + 0x24]
movzx ecx, word [rsp + 0x70]
cmp ecx, 0x17
je 0x18005871d
cmp ecx, 2
jne 0x180058772
cmp eax, 0x10
jb 0x18005897b
movzx eax, word [rsp + 0x72]
rol ax, 8
mov ecx, dword [rsp + 0x74]
mov word [rsp + 0x44], ax
mov dword [rsp + 0x40], ecx
xor r13d, r13d
jmp 0x18005877e
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r14d, eax
shl r14, 0x20
or r14, 2
mov r13w, 2
jmp 0x18005877e
cmp eax, 0x1c
jb 0x18005897b
movzx r12d, word [rsp + 0x72]
rol r12w, 8
movdqu xmm0, xmmword [rsp + 0x78]
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x30], eax
mov ebp, dword [rsp + 0x88]
movq rax, xmm0
pshufd xmm1, xmm0, 0xee
movq r14, xmm1
shld r14, rax, 0x20
movdqu xmmword [rsp + 0x42], xmm0
pshufd xmm0, xmm0, 0xff
movd dword [rsp + 0x2c], xmm0
mov r13w, 1
jmp 0x18005877e
mov r13w, 2
lea r14, str.invalid_argument
movzx eax, word [rsp + 0x5c]
mov word [rsp + 0x74], ax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x70], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x24], eax
movzx eax, word [rsp + 0x44]
mov word [rsp + 0x28], ax
cmp r15w, 2
je 0x18005887d
cmp r13w, 2
je 0x18005887d
movzx eax, byte [0x1801fd9d8]
mov rcx, qword [0x1801fd960]
test rcx, rcx
jne 0x1800587e4
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180058990
mov rcx, rax
mov qword [0x1801fd960], rax
mov r8d, 0x40
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x180058990
mov word [rax], r15w
mov ecx, dword [rsp + 0x70]
mov dword [rax + 2], ecx
movzx ecx, word [rsp + 0x74]
mov word [rax + 6], cx
mov qword [rax + 8], rbx
mov ecx, dword [rsp + 0x38]
mov dword [rax + 0x10], ecx
mov ecx, dword [rsp + 0x34]
mov dword [rax + 0x14], ecx
mov ecx, dword [rsp + 0x3c]
mov dword [rax + 0x18], ecx
movzx ecx, word [rsp + 0x2a]
mov word [rax + 0x1c], cx
mov word [rax + 0x20], r13w
mov ecx, dword [rsp + 0x24]
mov dword [rax + 0x22], ecx
movzx ecx, word [rsp + 0x28]
mov word [rax + 0x26], cx
mov qword [rax + 0x28], r14
mov ecx, dword [rsp + 0x2c]
mov dword [rax + 0x30], ecx
mov ecx, dword [rsp + 0x30]
mov dword [rax + 0x34], ecx
mov dword [rax + 0x38], ebp
mov word [rax + 0x3c], r12w
mov qword [rsi], rax
lea rax, [0x1801af908]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
jmp 0x18005890c
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
cmp r15w, 2
jne 0x1800588f0
mov eax, ebx
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x1800588f0
test rax, rax
je 0x1800588f0
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 0x1800588de
cmp qword [rbx + 0x10], 0x11
jb 0x1800588cc
mov rdi, qword [rdi - 8]
mov rcx, qword [0x1801fd960]
xor edx, edx
mov r8, rdi
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, qword [0x1801fd960]
xor edx, edx
mov r8, rsi
call qword [sym.imp.kernel32.dll_HeapFree]
cmp r13w, 2
jne 0x18005890c
mov eax, r14d
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x18005890c
test rax, rax
jne 0x180058920
add rsp, 0xf8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
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 0x180058955
cmp qword [rbx + 0x10], 0x11
jb 0x180058943
mov rdi, qword [rdi - 8]
mov rcx, qword [0x1801fd960]
xor edx, edx
mov r8, rdi
call qword [sym.imp.kernel32.dll_HeapFree]
mov rcx, qword [0x1801fd960]
xor edx, edx
mov r8, rsi
add rsp, 0xf8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.kernel32.dll_HeapFree]
ud2
mov ecx, 8
mov edx, 0x18
call fcn.180168710
ud2
mov ecx, 4
mov edx, 0x40
call fcn.180168710
ud2