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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x50
mov rax, qword [0x1402e0068]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r12d, 2
xor r8d, r8d
mov rsi, r9
mov ecx, r12d
mov ebp, edx
or rbx, 0xffffffffffffffff
call sub.WS2_32.dll_socket
mov rdi, rax
test rax, rax
js 0x14000814c
xor eax, eax
mov ecx, 0x7f000001
mov qword [rsp + 0x28], rax
mov word [rsp + 0x28], r12w
mov qword [rsp + 0x30], rax
call sub.WS2_32.dll_htonl
lea r8d, [rbx + 0x11]
lea rdx, [rsp + 0x28]
mov dword [rsp + 0x2c], eax
xor eax, eax
mov rcx, rdi
mov word [rsp + 0x2a], ax
call sub.WS2_32.dll_bind
cmp eax, ebx
je 0x140008130
xor r8d, r8d
mov edx, ebp
mov ecx, r12d
call sub.WS2_32.dll_socket
mov rbx, rax
test rax, rax
js 0x140008130
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x38]
mov rcx, rdi
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x140008130
cmp dword [rsp + 0x20], 0x10
jne 0x140008130
lea r8d, [r12 + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rbx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x140008130
mov qword [rsi], rdi
mov qword [rsi + 8], rbx
xor eax, eax
jmp 0x140008150
cmp rdi, 0xffffffffffffffff
je 0x14000813e
mov rcx, rdi
call sub.WS2_32.dll_closesocket
cmp rbx, 0xffffffffffffffff
je 0x14000814c
mov rcx, rbx
call sub.WS2_32.dll_closesocket
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401e6720
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x80]
add rsp, 0x50
pop r12
pop rdi
pop rsi
ret
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x50
mov rax, qword [0x1402e0068]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r13d, 2
or rdi, 0xffffffffffffffff
xor r8d, r8d
mov ecx, r13d
mov rbp, r9
mov r12d, edx
or rsi, rdi
call sub.WS2_32.dll_socket
mov rbx, rax
test rax, rax
jns 0x1400081f3
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400081ea
lea r9, str.Cant_create_listening_socket
lea rdx, str....._base_srcwin32TSocket.c
lea ecx, [rdi + 4]
mov r8d, 0x283
call fcn.1400045f0
or rax, 0xffffffffffffffff
jmp 0x1400083f3
xor eax, eax
mov ecx, 0x7f000001
mov qword [rsp + 0x28], rax
mov word [rsp + 0x28], r13w
mov qword [rsp + 0x30], rax
call sub.WS2_32.dll_htonl
lea rdx, [rsp + 0x28]
mov rcx, rbx
mov dword [rsp + 0x2c], eax
xor eax, eax
lea r8d, [rax + 0x10]
mov word [rsp + 0x2a], ax
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x14000824f
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.Cant_bind_address_lookback
mov r8d, 0x28e
jmp 0x1400083a0
mov edx, 1
mov rcx, rbx
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x140008280
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.Cant_listen_on_socket
mov r8d, 0x294
jmp 0x1400083a0
xor r8d, r8d
mov edx, r12d
mov ecx, r13d
call sub.WS2_32.dll_socket
mov rdi, rax
test rax, rax
jns 0x1400082b5
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.Cant_create_connect_socket
mov r8d, 0x29b
jmp 0x1400083a0
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x38]
mov rcx, rbx
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
jne 0x1400082f3
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.Cant_get_socket_name
mov r8d, 0x2a2
jmp 0x1400083a0
cmp dword [rsp + 0x20], 0x10
je 0x140008319
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.socket_address_size_is_unexpect
mov r8d, 0x2a7
jmp 0x1400083a0
lea rdx, [rsp + 0x38]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rdi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x140008349
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.Cant_connect_to_listener_socket
mov r8d, 0x2ad
jmp 0x1400083a0
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
mov rcx, rbx
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call sub.WS2_32.dll_accept
mov rsi, rax
test rax, rax
jns 0x140008383
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.Cant_accept_socket
mov r8d, 0x2b5
jmp 0x1400083a0
cmp dword [rsp + 0x20], 0x10
je 0x1400083e1
cmp dword [reloc.WS2_32.dll_accept], 3
jg 0x1400083b1
lea r9, str.socket_address_size_is_unexpected._2
mov r8d, 0x2ba
lea rdx, str....._base_srcwin32TSocket.c
mov ecx, 3
call fcn.1400045f0
cmp rbx, 0xffffffffffffffff
je 0x1400083bf
mov rcx, rbx
call sub.WS2_32.dll_closesocket
cmp rdi, 0xffffffffffffffff
je 0x1400083cd
mov rcx, rdi
call sub.WS2_32.dll_closesocket
cmp rsi, 0xffffffffffffffff
je 0x1400083db
mov rcx, rsi
call sub.WS2_32.dll_closesocket
or rax, 0xffffffffffffffff
jmp 0x1400083f3
mov rcx, rbx
call sub.WS2_32.dll_closesocket
mov qword [rbp], rdi
mov qword [rbp + 8], rsi
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401e6720
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp edx, 2
jne 0x14000842a
jmp 0x140008050
jmp 0x140008180