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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x250
mov rax, qword [0x140232230]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rsi, qword [rcx]
mov r14, rcx
mov r13d, r8d
movzx ebx, word [rsi + 0x1b8]
mov edi, dword [rsi + 0x1bc]
mov rbp, qword [rsi + 0x4a0]
mov qword [rsp + 0x38], rdx
xor r12d, r12d
lea rcx, [rsp + 0x141]
xor edx, edx
mov r8d, 0xff
mov byte [rsp + 0x140], r12b
mov qword [rsp + 0x30], r12
call fcn.140171ae0
test rbp, rbp
jne 0x14012397c
test bx, bx
jne 0x14012397c
xor eax, eax
jmp 0x140123bf2
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + reloc.SHELL32.dll_IsUserAnAdmin], r15
call fcn.140171ae0
test rbp, rbp
je 0x140123a9b
or rax, 0xffffffffffffffff
inc rax
cmp byte [rax + rbp], r12b
jne 0x1401239a3
cmp rax, 0xff
jae 0x140123a9b
mov r15d, dword [r14 + 0x2b8]
cmp r13d, 2
jne 0x1401239d0
mov dword [r14 + 0x2b8], 1
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, rbp
mov rcx, r14
call fcn.140124f30
cmp eax, 1
jne 0x1401239f5
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.140125660
mov dword [r14 + 0x2b8], r15d
mov r15, qword [rsp + 0x30]
test r15, r15
je 0x140123a7f
mov rcx, qword [r15]
cmp dword [rcx + 4], 2
jne 0x140123a2a
mov rcx, qword [rcx + 0x20]
lea rdx, [rsp + 0x140]
mov r8d, 0x100
add rcx, 4
call fcn.14013eba0
mov rax, qword [r15]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov r9d, r13d
mov ecx, dword [rax + 4]
lea rax, [rsp + 0x140]
mov r8, rbp
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140125a80
mov rdx, r15
mov rcx, rsi
call fcn.140125110
cmp r13d, 2
jne 0x140123abf
lea rdx, [rsp + 0x44]
lea rcx, [rsp + 0x140]
call fcn.14013f170
test eax, eax
jle 0x140123abf
jmp 0x140123aa1
lea rdx, str.Couldnt_bind_to__s
mov r8, rbp
mov rcx, rsi
call fcn.140125b60
mov eax, 0x2d
jmp 0x140123bea
cmp r13d, 2
jne 0x140123abf
mov eax, 2
movzx ecx, bx
mov word [rsp + 0x40], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r12d, reloc.WS2_32.dll_recv
mov word [rsp + 0x42], ax
mov rbp, qword [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov r8d, r12d
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x140123b2b
nop dword [rax]
dec edi
test edi, edi
jle 0x140123b96
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.140125a80
inc bx
cmp word [rsp + 0x40], 2
jne 0x140123b16
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x42], ax
lea rdx, [rsp + 0x40]
mov r8d, r12d
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x140123ae0
lea rcx, [rsp + 0xc0]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call fcn.140171ae0
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0xc0]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x140123bca
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r14
mov edx, eax
mov ebx, eax
mov dword [rsi + 0x87ac], eax
call fcn.14013f050
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rsi
call fcn.140125b60
mov eax, 0x2d
jmp 0x140123bea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r14
mov edx, eax
mov ebx, eax
mov dword [rsi + 0x87ac], eax
call fcn.14013f050
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rsi
call fcn.140125b60
mov eax, 0x2d
jmp 0x140123bea
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.140125a80
mov dword [r14 + 0x290], 1
xor eax, eax
mov r15, qword [rsp + reloc.SHELL32.dll_IsUserAnAdmin]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140166980
add rsp, 0x250
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret