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

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf0]
sub rsp, 0x1f0
mov rax, qword [0x1402d10e0]
xor rax, rsp
mov qword [rbp + 0xd0], rax
mov rsi, qword [rcx]
xor r15d, r15d
mov dword [rsp + 0x30], r9d
mov qword [rsp + 0x40], r15
mov r13, qword [rsi + 0x638]
movzx ebx, word [rsi + 0x228]
mov r12d, dword [rsi + 0x22c]
mov dword [rsp + 0x34], r8d
mov qword [rsp + 0x48], rdx
mov r14, rcx
test r13, r13
jne 0x1401c7c5f
test bx, bx
jne 0x1401c7c5f
xor eax, eax
jmp 0x1401c800d
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x1e8], rdi
call fcn.14019c920
test r13, r13
je 0x1401c7ec0
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0xff
jae 0x1401c7ec0
lea rcx, [rbp - 0x2f]
xor edx, edx
mov r8d, 0xff
mov byte [rbp - 0x30], al
call fcn.14019c920
mov r9, qword [0x1402d3050]
or rcx, 0xffffffffffffffff
mov rdi, r9
xor eax, eax
repne scasb al, byte [rdi]
mov rdx, r13
mov dword [rsp + 0x38], r15d
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.1401affa0
or rcx, 0xffffffffffffffff
test eax, eax
jne 0x1401c7d62
mov rdi, qword [0x1402d3050]
xor eax, eax
mov dword [rsp + 0x38], 1
repne scasb al, byte [rdi]
not rcx
dec rcx
add r13, rcx
mov edi, dword [rsp + 0x34]
mov r8d, dword [r14 + 0xa0]
mov edx, dword [rsp + 0x30]
lea rax, [rbp - 0x30]
mov ecx, edi
mov r9, r13
mov dword [rsp + 0x28], pe_nt_image_headers64
mov qword [rsp + 0x20], rax
call fcn.1401ea300
test eax, eax
je 0x1401c7e99
dec eax
je 0x1401c7e8f
dec eax
jne 0x1401c7e68
lea r9, [rbp - 0x30]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov r8, r13
mov rcx, rsi
mov dword [rsp + 0x20], edi
call fcn.1401c4f30
jmp 0x1401c7e49
mov r9, qword [str.host_]
xor eax, eax
mov rdx, r13
mov rdi, r9
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, r9
call fcn.1401affa0
test eax, eax
jne 0x1401c7d01
mov rdi, qword [str.host_]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
mov edi, dword [rsp + 0x34]
not rcx
dec rcx
add r13, rcx
mov eax, dword [r14 + 0x5f0]
mov ecx, 1
cmp edi, 2
mov dword [rsp + 0x30], eax
cmove eax, ecx
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rcx, r14
mov rdx, r13
mov dword [r14 + 0x5f0], eax
call fcn.1401ba030
cmp eax, 1
jne 0x1401c7de8
lea rdx, [rsp + 0x40]
mov rcx, r14
call fcn.1401b8ae0
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x30]
mov dword [r14 + 0x5f0], eax
test rcx, rcx
je 0x1401c7e73
mov rcx, qword [rcx]
lea rdx, [rbp - 0x30]
mov r8d, pe_nt_image_headers64
call fcn.1401b9c70
mov rdx, qword [rsp + 0x40]
mov r9d, edi
mov rax, qword [rdx]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov r8, r13
mov ecx, dword [rax + 4]
lea rax, [rbp - 0x30]
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1401c4f30
mov rdx, qword [rsp + 0x40]
mov rcx, rsi
call fcn.1401ba5a0
cmp edi, 2
jne 0x1401c7ee5
lea r8, [rsp + 0x54]
lea rdx, [rbp - 0x30]
mov ecx, edi
call fcn.1401cc240
test eax, eax
jle 0x1401c7ee5
jmp 0x1401c7ecc
cmp dword [rsp + 0x38], r15d
je 0x1401c7da6
lea rdx, str.Couldnt_bind_to__s
mov r8, r13
mov rcx, rsi
call fcn.1401c4fe0
mov eax, reloc.ODBC32.dll_SQLGetInfo
jmp 0x1401c8005
mov eax, 1
jmp 0x1401c8005
cmp dword [rsp + 0x38], r15d
je 0x1401c7da6
lea rdx, str.Couldnt_bind_to_interface__s
mov r8, r13
mov rcx, rsi
call fcn.1401c4fe0
mov eax, reloc.ODBC32.dll_SQLGetInfo
jmp 0x1401c8005
cmp dword [rsp + 0x34], 2
jne 0x1401c7ee5
mov edi, 2
movzx ecx, bx
mov word [rsp + 0x50], di
call qword [sym.imp.WS2_32.dll_htons]
mov r15d, reloc.ODBC32.dll_SQLFreeStmt
mov word [rsp + 0x52], ax
mov rdi, qword [rsp + 0x48]
lea rdx, [rsp + 0x50]
mov r8d, r15d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1401c7f4d
nop
dec r12d
test r12d, r12d
jle 0x1401c7fb0
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
movzx r8d, bx
mov rcx, rsi
call fcn.1401c4f30
inc bx
cmp word [rsp + 0x50], 2
jne 0x1401c7f38
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x52], ax
lea rdx, [rsp + 0x50]
mov r8d, r15d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1401c7f00
lea rcx, [rbp - 0x30]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x30], 0x80
call fcn.14019c920
lea r8, [rsp + 0x30]
lea rdx, [rbp - 0x30]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1401c7fe4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r14
mov edx, eax
mov edi, eax
mov dword [rsi + 0x4a8c], eax
call fcn.1401cb880
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.1401c4fe0
mov eax, reloc.ODBC32.dll_SQLGetInfo
jmp 0x1401c8005
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r14
mov edx, eax
mov edi, eax
mov dword [rsi + 0x4a8c], eax
call fcn.1401cb880
lea rdx, str.bind_failed_with_errno__d:__s
mov r8d, edi
mov r9, rax
mov rcx, rsi
call fcn.1401c4fe0
mov eax, reloc.ODBC32.dll_SQLGetInfo
jmp 0x1401c8005
lea rdx, str.Local_port:__hu_n
movzx r8d, bx
mov rcx, rsi
call fcn.1401c4f30
mov eax, 1
mov dword [r14 + 0x5a4], eax
xor eax, eax
mov rdi, qword [rsp + 0x1e8]
mov rcx, qword [rbp + 0xd0]
xor rcx, rsp
call fcn.14019c800
add rsp, 0x1f0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret