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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f8]
sub rsp, 0x2f8
mov rax, qword [0x1402dc040]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
mov r14, qword [rcx + 0x770]
xor r13d, r13d
movzx esi, word [rcx + 0x250]
mov r12d, r9d
movzx r15d, word [rcx + 0x252]
mov rbx, rdx
mov dword [rsp + 0x50], r9d
mov rdi, rcx
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], r13
test r14, r14
jne 0x140120f81
test si, si
je 0x140121413
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
test r14, r14
je 0x140121398
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r14 + rax], r13b
jne 0x140120fb6
cmp rax, 0xff
jae 0x140121398
xor edx, edx
lea rcx, [rbp - 0x1f]
mov r8d, 0xff
call sub.VCRUNTIME140.dll_memset
mov r8d, 3
lea rcx, [0x1402ad050]
mov rdx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140121013
lea r8, [r14 + 3]
mov rcx, rdi
lea rdx, str.Couldnt_bind_to_interface__s
call fcn.140101f40
mov eax, Ordinal_46
jmp 0x140121415
mov r8d, 5
lea rcx, str.host_
mov rdx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140121031
add r14, 5
movzx ebx, byte [rbx + 0x773]
mov byte [rsp + 0x30], bl
cmp r12d, 2
jne 0x14012104e
mov rax, qword [rsp + 0x38]
mov byte [rax + 0x773], 1
lea rax, [rsp + 0x40]
xor r9d, r9d
mov r8d, 0x50
mov qword [rsp + 0x20], rax
mov rdx, r14
mov rcx, rdi
call fcn.140131620
cmp eax, 1
jne 0x140121146
mov r12, qword [rdi + 0xd98]
mov edx, 0xffffffff
mov rcx, qword [r12]
test rcx, rcx
je 0x1401210a4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.14011bee0
jmp 0x1401210d5
mov rcx, qword [r12 + 8]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov rcx, qword [r12 + 8]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 8], r13
test ebx, ebx
jne 0x1401210d0
mov rcx, rdi
call fcn.14011bee0
movzx ebx, byte [rsp + 0x30]
mov r12, qword [rdi + 0xd90]
mov byte [rdi + 0xdb0], 1
test r12, r12
jne 0x14012111b
mov rax, qword [rdi + 0x20]
lea rcx, str.host
mov r9, qword [rdi + 0xd88]
lea r8, str.proxy
lea rdx, str.Could_not_resolve__s:__s
cmp byte [rax + 0x340], r13b
cmove r8, rcx
mov rcx, rdi
call fcn.140101f40
lea rcx, [rdi + 0xd88]
call fcn.14011c4f0
cmp qword [rdi + 0xd90], r13
jne 0x14012114b
mov rax, qword [rdi + 0x20]
cmp byte [rax + 0x346], 1
je 0x14012114b
mov byte [rax + 0x346], 1
jmp 0x14012114b
mov r12, qword [rsp + 0x40]
mov rax, qword [rsp + 0x38]
mov byte [rax + 0x773], bl
test r12, r12
je 0x140121378
mov rcx, qword [r12]
mov byte [rbp - 0x20], r13b
cmp dword [rcx + 4], 2
jne 0x140121184
mov rcx, qword [rcx + 0x20]
lea rdx, [rbp - 0x20]
add rcx, 4
mov r8d, 0x100
call fcn.14013bf90
mov rax, qword [r12]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov ebx, dword [rsp + 0x50]
mov r8, r14
mov r9d, ebx
mov ecx, dword [rax + 4]
lea rax, [rbp - 0x20]
mov dword [rsp + 0x28], ecx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.140102070
mov r9, qword [rdi + 0xe8]
mov r14d, 2
test r9, r9
je 0x1401211e4
test byte [r9 + 4], 8
je 0x1401211e4
mov rax, qword [r9 + 0x10]
test rax, rax
je 0x1401211e4
mov r9, qword [r9 + 0x20]
mov r8d, r14d
mov edx, 3
mov rcx, rdi
call rax
sub dword [r12 + 0x10], 1
jne 0x140121214
mov rcx, qword [r12]
test rcx, rcx
je 0x14012120b
mov rbx, qword [rcx + 0x28]
call qword [fcn.14016f1de]
mov rcx, rbx
test rbx, rbx
jne 0x1401211f5
mov ebx, dword [rsp + 0x50]
mov rcx, r12
call qword [fcn.14016f1de]
mov r8, qword [rdi + 0xe8]
test r8, r8
je 0x14012123e
test byte [r8 + 4], 8
je 0x14012123e
mov rax, qword [r8 + 0x18]
test rax, rax
je 0x14012123e
mov r8, qword [r8 + 0x20]
mov edx, 3
mov rcx, rdi
call rax
mov rax, qword [r12]
cmp ebx, dword [rax + 4]
je 0x140121251
mov eax, 1
jmp 0x140121415
cmp ebx, r14d
jne 0x140121282
lea rdx, [rsp + 0x64]
lea rcx, [rbp - 0x20]
call fcn.14012e840
test eax, eax
jle 0x140121282
movzx ecx, si
mov word [rsp + 0x60], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov r13d, reloc.WS2_32.dll_recv
mov rbx, qword [rsp + 0x38]
mov r14, qword [rsp + 0x48]
lea rdx, [rsp + 0x60]
mov rcx, r14
mov r8d, r13d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1401212f8
dec r15d
test r15d, r15d
jle 0x1401213c4
add si, 1
je 0x1401213c4
movzx r8d, si
lea rdx, str.Bind_to_local_port__d_failed__trying_next
dec r8d
mov rcx, rdi
call fcn.140102070
cmp word [rsp + 0x60], 2
jne 0x1401212e3
movzx ecx, si
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x62], ax
mov r8d, r13d
lea rdx, [rsp + 0x60]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1401212a1
xorps xmm0, xmm0
mov dword [rsp + 0x50], Ordinal_133
lea r8, [rsp + 0x50]
mov rcx, r14
lea rdx, [rbp - 0x20]
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x40], xmm0
movups xmmword [rbp + 0x50], xmm0
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1401213f9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [rdi + 0xcfc], eax
lea rdx, [rbp + 0xe0]
mov ebx, eax
call fcn.1400fb380
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rdi
call fcn.140101f40
mov eax, Ordinal_46
jmp 0x140121415
mov r8, r14
mov byte [rdi + 0x12ff], r13b
lea rdx, str.Couldnt_bind_to__s
mov rcx, rdi
call fcn.140101f40
mov eax, Ordinal_46
jmp 0x140121415
cmp r12d, 2
jne 0x140121287
mov r14d, r12d
movzx ecx, si
mov word [rsp + 0x60], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov r13d, reloc.WS2_32.dll_recv
jmp 0x140121287
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [rdi + 0xcfc], eax
lea rdx, [rbp - 0x20]
mov ebx, eax
call fcn.1400fb380
mov r9, rax
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rdi
call fcn.140101f40
mov eax, Ordinal_46
jmp 0x140121415
movzx r8d, si
lea rdx, str.Local_port:__hu
mov rcx, rdi
call fcn.140102070
mov byte [rbx + 0x355], 1
xor eax, eax
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.14016dfe0
add rsp, 0x2f8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret