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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rsi, qword [rcx]
xor r14d, r14d
mov r15d, r8d
mov qword [rsp + 0x38], r14
mov r12, qword [rsi + 0xc90]
movzx ebx, word [rsi + 0x6e8]
mov r13d, dword [rsi + 0x6ec]
test r12, r12
jne 0x14002107d
test bx, bx
jne 0x14002107d
xor eax, eax
jmp 0x14002151a
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x310], rdi
call sub.MSVCR120.dll_memset
test r12, r12
je 0x14002139f
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x14002139f
lea rcx, [rbp - 0x3f]
xor edx, edx
mov r8d, 0xff
mov byte [rbp - 0x40], al
call sub.MSVCR120.dll_memset
mov r9, qword [0x1401475b0]
or rcx, 0xffffffffffffffff
mov rdi, r9
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, r12
mov dword [rsp + 0x30], r14d
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call sub.MSVCR120.dll_strncmp
or rcx, 0xffffffffffffffff
test eax, eax
jne 0x1400211f8
mov rdi, qword [0x1401475b0]
xor eax, eax
mov dword [rsp + 0x30], 1
repne scasb al, byte [rdi]
not rcx
dec rcx
add r12, rcx
mov rdi, qword [rbp + 0x200]
mov edx, dword [rbp + 0x218]
lea rax, [rbp - 0x40]
mov r8d, dword [rdi + 0x328]
mov r9, r12
mov ecx, r15d
mov dword [rsp + 0x28], 0x100
mov qword [rsp + 0x20], rax
call fcn.14004f050
mov edx, eax
test eax, eax
je 0x140021285
dec edx
je 0x14002135d
dec edx
jne 0x14002125b
lea r9, [rbp - 0x40]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, r12
mov rcx, rsi
mov dword [rsp + 0x20], r15d
call fcn.140018f20
cmp r15d, 0x17
jne 0x140021367
lea edx, [r15 + 0xe]
lea rcx, [rbp - 0x40]
call sub.MSVCR120.dll_strchr
mov rdi, rax
test rax, rax
je 0x1400211ad
mov byte [rax], r14b
inc rdi
mov r12d, reloc.WS2_32.dll_socket
lea r8, [rsp + 0x48]
lea rdx, [rbp - 0x40]
mov ecx, r12d
call fcn.14004e0a0
test eax, eax
jle 0x1400211ed
movzx ecx, bx
mov word [rsp + 0x40], r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x42], ax
test rdi, rdi
je 0x1400211ed
mov rcx, rdi
call sub.MSVCR120.dll_atoi
mov dword [rsp + 0x58], eax
mov r14d, Ordinal_33
jmp 0x1400213df
mov r9, qword [str.host_]
xor eax, eax
mov rdx, r12
mov rdi, r9
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call sub.MSVCR120.dll_strncmp
test eax, eax
jne 0x140021123
mov rdi, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov rdi, qword [rbp + 0x200]
not rcx
dec rcx
add r12, rcx
mov eax, dword [rdi + 0x758]
mov dword [rsp + 0x30], eax
cmp r15d, 2
jne 0x1400212a8
mov dword [rdi + 0x758], 1
jmp 0x1400212ba
cmp dword [rsp + 0x30], r14d
je 0x14002123f
lea rdx, str.Couldnt_bind_to__s
mov r8, r12
mov rcx, rsi
mov dword [rsi + 0x181c], r14d
call fcn.140019080
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140021512
cmp dword [rsp + 0x30], r14d
je 0x14002123f
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, r12
mov rcx, rsi
call fcn.140019080
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140021512
cmp r15d, 0x17
mov ecx, 2
cmove eax, ecx
mov dword [rdi + 0x758], eax
lea rax, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.140047780
cmp eax, 1
jne 0x1400212e7
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.14000d6a0
mov rcx, qword [rsp + 0x38]
mov eax, dword [rsp + 0x30]
mov dword [rdi + 0x758], eax
test rcx, rcx
je 0x140021262
mov rcx, qword [rcx]
lea rdx, [rbp - 0x40]
mov r8d, 0x100
call fcn.140046a10
mov rdx, qword [rsp + 0x38]
mov r9d, r15d
mov rax, qword [rdx]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov r8, r12
mov ecx, dword [rax + 4]
lea rax, [rbp - 0x40]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140018f20
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140047a50
mov rdx, qword [rsp + 0x38]
mov rax, qword [rdx]
cmp r15d, dword [rax + 4]
je 0x140021188
mov eax, 1
jmp 0x140021512
cmp r15d, 2
jne 0x1400213e6
lea r8, [rsp + 0x44]
lea rdx, [rbp - 0x40]
mov ecx, r15d
mov r12d, r15d
call fcn.14004e0a0
test eax, eax
jle 0x1400213e6
movzx ecx, bx
mov word [rsp + 0x40], r12w
call qword [sym.imp.WS2_32.dll_htons]
lea r14d, [r15 + 0xe]
mov word [rsp + 0x42], ax
jmp 0x1400213e6
cmp r15d, 0x17
jne 0x1400213bd
mov r12d, r15d
movzx ecx, bx
mov word [rsp + 0x40], r12w
call qword [sym.imp.WS2_32.dll_htons]
lea r14d, [r15 + 5]
jmp 0x1400213da
cmp r15d, 2
jne 0x1400213df
mov eax, r15d
movzx ecx, bx
mov word [rsp + 0x40], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r14d, reloc.WS2_32.dll_recv
mov word [rsp + 0x42], ax
mov rdi, qword [rbp + 0x200]
mov r12, qword [rbp + 0x208]
lea rdx, [rsp + 0x40]
mov r8d, r14d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x140021447
dec r13d
test r13d, r13d
jle 0x1400214b8
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.140018f20
inc bx
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
lea rdx, [rsp + 0x40]
mov r8d, r14d
mov rcx, r12
mov word [rsp + 0x42], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x140021402
lea rcx, [rbp - 0x40]
xor edx, edx
mov r8d, 0x80
mov dword [rbp + 0x200], 0x80
call sub.MSVCR120.dll_memset
lea r8, [rbp + 0x200]
lea rdx, [rbp - 0x40]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1400214f3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp + 0xc0]
mov r8d, 0x100
mov ecx, eax
mov edi, eax
mov dword [rsi + 0x1378], eax
call fcn.1400076f0
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.140019080
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140021512
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp - 0x40]
mov r8d, 0x100
mov ecx, eax
mov edi, eax
mov dword [rsi + 0x1378], eax
call fcn.1400076f0
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.140019080
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140021512
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.140018f20
mov dword [rdi + 0x6f0], 1
xor eax, eax
mov rdi, qword [rsp + 0x310]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret