Function at 0x1400bf200
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x448
mov ebp, r8d
mov rbx, rdx
mov rsi, rcx
mov rax, qword [0x1402b7040]
xor rax, rsp
mov qword [rsp + 0x440], rax
movabs r13, 0xaaaaaaaaaaaaaaaa
lea r14, [rsp + 0x1b0]
mov r8d, Ordinal_145
mov rcx, r14
mov dl, 0xaa
call fcn.1401d8720
mov rdi, qword [rsi]
lea r15, [rsp + 0x68]
mov qword [r15], r13
movaps xmm0, xmmword [0x140275a70]
movups xmmword [rsp + 0x19e], xmm0
movaps xmmword [rsp + 0x190], xmm0
movaps xmmword [rsp + 0x180], xmm0
lea rcx, [rsp + 0x80]
mov r8d, 0x100
mov dl, 0xaa
call fcn.1401d8720
mov ebp, ebp
mov qword [rsi + rbp*8 + 0x4d0], 0xffffffffffffffff
mov rcx, rsi
mov rdx, rbx
mov r8, r14
mov r9, r15
call fcn.1400bfc80
test eax, eax
je 0x1400bf2e0
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
cmp rcx, qword [0x1402b7040]
je 0x1400bf2cc
call fcn.14019f290
int3
add rsp, 0x448
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, [rsp + 0x64]
mov dword [r8], 0xaaaaaaaa
lea r15, [rsp + 0x1c0]
lea rdx, [rsp + 0x180]
mov rcx, r15
call fcn.1400bdeb0
test al, al
jne 0x1400bf353
call fcn.14019cacc
mov ecx, dword [rax]
lea rdx, [rsp + 0x80]
mov r8d, 0x100
call fcn.1400d2920
mov rbx, rax
call fcn.14019cacc
mov r8d, dword [rax]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov rcx, rdi
mov r9, rbx
call fcn.1400b8d80
mov rdx, qword [rsp + 0x68]
mov rcx, rsi
call fcn.1400bed00
xor eax, eax
jmp 0x1400bf2b2
mov r9d, dword [rsp + 0x64]
lea rdx, str.__Trying__s:_ld..._n
lea r8, [rsp + 0x180]
mov rcx, rdi
call fcn.1400b8a80
mov eax, dword [rsp + 0x1b0]
cmp eax, 0x17
je 0x1400bf384
cmp eax, 2
jne 0x1400bf519
cmp dword [rsp + 0x1b4], 1
jne 0x1400bf519
mov r14, qword [rsp + 0x68]
cmp byte [rdi + 0xf23], 1
jne 0x1400bf41d
mov r12, r15
lea r15, [rsp + 0x3c0]
mov dword [r15], 1
mov rbx, qword [rsi]
lea rcx, [rsp + 0x2c0]
mov r8d, 0x100
mov dl, 0xaa
call fcn.1401d8720
mov dword [rsp + 0x20], 4
mov rcx, r14
mov edx, 6
mov r8d, 1
mov r9, r15
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400bf41a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0x2c0]
mov r8d, 0x100
mov ecx, eax
call fcn.1400d2920
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, rbx
mov r8, rax
call fcn.1400b8a80
mov r15, r12
mov rcx, r14
call fcn.1400bedd0
movzx eax, byte [rdi + 0xf2c]
cmp eax, 1
jne 0x1400bf523
lea r9, [rsp + 0x3c0]
mov dword [r9], eax
mov dword [rsp + 0x20], 4
mov rcx, r14
mov edx, 0xffff
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1400bf4f7
lea rax, [rsp + 0x240]
mov dword [rax], 0xaaaaaaaa
lea r8, [rsp + 0x2c0]
mov dword [r8], 1
imul ecx, dword [rdi + 0xe8c], 0x3e8
mov dword [r8 + 4], ecx
imul ecx, dword [rdi + 0xe90], 0x3e8
mov dword [rsp + 0x3c0], ecx
mov dword [r8 + 8], ecx
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rcx, r14
mov edx, 0x98000004
mov r9d, Ordinal_14
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1400bf523
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov rcx, rdi
mov r8d, r14d
mov r9d, eax
call fcn.1400b8a80
jmp 0x1400bf523
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov rcx, rdi
mov r8, r14
call fcn.1400b8a80
jmp 0x1400bf523
mov rcx, qword [rdi + 0xd0]
test rcx, rcx
jne 0x1400bf544
jmp 0x1400bf552
mov rcx, qword [rsp + 0x68]
call fcn.1400bedd0
mov rax, qword [rdi + 0x728]
test rax, rax
je 0x1400bf5c6
test rdi, rdi
je 0x1400bf5ac
mov rcx, qword [rdi + 0xd8]
test rcx, rcx
je 0x1400bf50b
mov byte [rcx + 0x18a], 1
mov rax, qword [rdi + 0x728]
mov r14, qword [rsp + 0x68]
mov rcx, qword [rdi + 0x730]
mov rdx, r14
xor r8d, r8d
call qword [0x1402a7b00]
mov rcx, qword [rdi + 0xd8]
test rcx, rcx
je 0x1400bf59e
mov byte [rcx + 0x18a], 0
test eax, eax
je 0x1400bf5c6
mov r12b, 1
cmp eax, 2
je 0x1400bf5c9
mov rcx, rsi
mov rdx, r14
call fcn.1400bed00
mov eax, Ordinal_46
jmp 0x1400bf2b2
mov rcx, qword [rdi + 0xd0]
test rcx, rcx
jne 0x1400bf576
jmp 0x1400bf57d
mov r14, qword [rsp + 0x68]
mov rcx, qword [rdi + 0x730]
mov rdx, r14
xor r8d, r8d
call qword [0x1402a7b00]
jmp 0x1400bf57d
xor r12d, r12d
mov eax, dword [rsp + 0x1b0]
cmp eax, 2
je 0x1400bf5e4
cmp eax, 0x17
je 0x1400bf5e4
mov r14, qword [rsp + 0x68]
jmp 0x1400bf796
mov dword [rsp + 0x60], r12d
mov rcx, r15
call fcn.1400f9260
mov edx, dword [rsp + 0x1b0]
mov rbx, qword [rsp + 0x68]
mov r14, qword [rsi]
mov qword [rsp + 0x78], 0
movzx r12d, word [r14 + 0x6e0]
mov r13, qword [r14 + 0xc18]
test r13, r13
setne al
test r12w, r12w
setne cl
or cl, al
cmp cl, 1
jne 0x1400bf784
mov r15d, dword [r14 + 0x6e4]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x430], xmm0
movaps xmmword [rsp + 0x420], xmm0
movaps xmmword [rsp + 0x410], xmm0
movaps xmmword [rsp + 0x400], xmm0
movaps xmmword [rsp + 0x3f0], xmm0
movaps xmmword [rsp + 0x3e0], xmm0
movaps xmmword [rsp + 0x3d0], xmm0
movaps xmmword [rsp + 0x3c0], xmm0
test r13, r13
je 0x1400bf69b
mov rcx, r13
mov dword [rsp + 0x54], edx
call fcn.1401c0bd0
mov edx, dword [rsp + 0x54]
cmp rax, 0xfe
jbe 0x1400bfa1c
cmp edx, 2
mov qword [rsp + 0x48], r14
je 0x1400bf6d3
xor r13d, r13d
cmp edx, 0x17
mov r14, rbx
jne 0x1400bf6f7
mov word [rsp + 0x3c0], Ordinal_26
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3c2], ax
mov r13d, 0x1c
jmp 0x1400bf6f7
mov word [rsp + 0x3c0], 2
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3c2], ax
mov r13d, 0x10
mov r14, rbx
lea rdx, [rsp + 0x3c0]
mov rcx, r14
mov r8d, r13d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1400bf8eb
lea r8, [rsp + 0x74]
mov dword [r8], Ordinal_133
xorps xmm0, xmm0
lea rdx, [rsp + 0x240]
movaps xmmword [rdx], xmm0
movaps xmmword [rdx + 0x10], xmm0
movaps xmmword [rdx + 0x20], xmm0
movaps xmmword [rdx + 0x30], xmm0
movaps xmmword [rdx + 0x40], xmm0
movaps xmmword [rdx + 0x50], xmm0
movaps xmmword [rdx + 0x60], xmm0
movaps xmmword [rdx + 0x70], xmm0
mov r15, r14
mov rcx, r14
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
js 0x1400bf996
mov rbx, r15
movzx r8d, r12w
lea rdx, str.Local_port:__hu_n
mov rcx, qword [rsp + 0x48]
call fcn.1400b8a80
mov byte [rsi + 0x66c], 1
lea r15, [rsp + 0x1c0]
movabs r13, 0xaaaaaaaaaaaaaaaa
mov r12d, dword [rsp + 0x60]
mov r14, rbx
lea r8, [rsp + 0x2c0]
mov dword [r8], 1
mov rcx, r14
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp byte [0x1402cc640], 1
je 0x1400bf7df
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
imul rcx, rcx, 0x10624dd3
shr rcx, 0x26
imul edx, ecx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
jmp 0x1400bf811
lea rbx, [rsp + 0x2c0]
mov qword [rbx], r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
mov r8, qword [0x1402cc648]
cqo
idiv r8
mov rcx, rax
imul rax, rdx, 0xf4240
cqo
idiv r8
mov eax, eax
movabs rdx, 0xaaaaaaaa00000000
or rdx, rax
mov qword [rsi + 0x678], rcx
mov qword [rsi + 0x680], rdx
cmp dword [rsi + 0x688], 2
jl 0x1400bf84c
mov rdx, qword [rsi + 0x690]
mov rcx, rdi
mov r8d, 3
call fcn.1400b9ee0
test r12b, r12b
jne 0x1400bf87c
cmp dword [rsi + 0x32c], 4
je 0x1400bf87c
cmp byte [rsi + 0x66f], 0
jne 0x1400bf889
mov r8d, dword [rsp + 0x1bc]
mov rcx, r14
mov rdx, r15
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400bf889
mov qword [rsi + rbp*8 + 0x4d0], r14
jmp 0x1400bf34c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
lea eax, [rbx - 0x2733]
cmp eax, 2
jb 0x1400bf87c
cmp ebx, 0xb
je 0x1400bf87c
lea rdx, [rsp + 0x80]
mov r8d, 0x100
mov ecx, ebx
call fcn.1400d2920
lea rdx, str.Immediate_connect_fail_for__s:__s_n
lea r8, [rsp + 0x180]
mov rcx, rdi
mov r9, rax
call fcn.1400b8a80
mov dword [rdi + 0x11b0], ebx
mov rcx, rsi
mov rdx, r14
call fcn.1400bed00
mov eax, 7
jmp 0x1400bf2b2
mov rbx, qword [sym.imp.WS2_32.dll_bind]
cmp r15d, 2
jl 0x1400bf93d
dec r15d
movzx r8d, r12w
mov rcx, qword [rsp + 0x48]
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
call fcn.1400b8a80
inc r12d
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x3c2], ax
mov rcx, r14
lea rdx, [rsp + 0x3c0]
mov r8d, r13d
call rbx
test eax, eax
js 0x1400bf8f2
jmp 0x1400bf713
lea rdi, [rsp + 0x2c0]
mov r8d, 0x100
mov rcx, rdi
mov dl, 0xaa
call fcn.1401d8720
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov r15, qword [rsp + 0x48]
mov dword [r15 + 0x11b0], eax
mov r8d, 0x100
mov ecx, eax
mov rdx, rdi
call fcn.1400d2920
lea rdx, str.bind_failed_with_errno__d:__s
mov rcx, r15
mov r8d, ebx
mov r9, rax
call fcn.1400b8d80
mov rcx, rsi
mov rdx, r14
jmp 0x1400bf9ed
lea rdi, [rsp + 0x2c0]
mov r8d, 0x100
mov rcx, rdi
mov dl, 0xaa
call fcn.1401d8720
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov r14, qword [rsp + 0x48]
mov dword [r14 + 0x11b0], eax
mov r8d, 0x100
mov ecx, eax
mov rdx, rdi
call fcn.1400d2920
lea rdx, str.getsockname___failed_with_errno__d:__s
mov rcx, r14
mov r8d, ebx
mov r9, rax
call fcn.1400b8d80
mov rcx, rsi
mov rdx, r15
call fcn.1400bed00
mov eax, Ordinal_46
jmp 0x1400bf2b2
add r13, 3
lea rdx, str.Couldnt_bind_to_interface__s
mov rcx, r14
mov r8, r13
call fcn.1400b8d80
mov rdx, qword [rsp + 0x58]
mov rcx, rsi
jmp 0x1400bf9ed
lea rcx, [rsp + 0x2c0]
mov r8d, 0x100
xor edx, edx
call fcn.1401d8720
movzx eax, byte [r13]
sub eax, 0x69
mov qword [rsp + 0x58], rbx
jne 0x1400bfa58
movzx eax, byte [r13 + 1]
sub eax, 0x66
jne 0x1400bfa58
movzx ecx, byte [r13 + 2]
mov eax, 0x21
sub eax, ecx
jmp 0x1400bfa5a
neg eax
test eax, eax
je 0x1400bf9fc
mov qword [rsp + 0x48], r14
lea rcx, str.host_
mov r8d, 5
mov rdx, r13
call fcn.1401c0c90
xor ecx, ecx
test eax, eax
sete cl
lea rbx, [rcx + rcx*4]
add rbx, r13
mov r14d, dword [rsi + 0x6a8]
mov eax, dword [rsp + 0x54]
cmp eax, 2
je 0x1400bfabd
cmp eax, 0x17
jne 0x1400bfac8
mov eax, 2
jmp 0x1400bfac2
mov rcx, qword [rsp + 0x48]
mov byte [rcx + 0x1597], 0
lea rdx, str.Couldnt_bind_to__s
mov r8, rbx
jmp 0x1400bfa0d
mov eax, 1
mov dword [rsi + 0x6a8], eax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call fcn.1400d0b20
cmp eax, 1
jne 0x1400bfaf5
lea rdx, [rsp + 0x78]
mov rcx, rsi
call fcn.1400b7870
mov dword [rsi + 0x6a8], r14d
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x1400bfaa2
mov rax, qword [rax]
mov ecx, dword [rax + 4]
cmp ecx, 2
mov r14, qword [rsp + 0x48]
je 0x1400bfb22
cmp ecx, 0x17
jne 0x1400bfb49
mov edx, 8
jmp 0x1400bfb27
mov edx, 4
add rdx, qword [rax + 0x20]
lea r8, [rsp + 0x2c0]
mov r9d, 0x100
call fcn.1400f8d30
mov rax, qword [rsp + 0x78]
mov rax, qword [rax]
mov ecx, dword [rax + 4]
lea rax, [rsp + 0x2c0]
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov rcx, r14
mov r8, rbx
mov ebx, dword [rsp + 0x54]
mov r9d, ebx
call fcn.1400b8a80
mov rdx, qword [rsp + 0x78]
mov rcx, r14
call fcn.1400d0f10
mov rax, qword [rsp + 0x78]
mov rax, qword [rax]
cmp ebx, dword [rax + 4]
je 0x1400bfb9a
mov rcx, rsi
mov rdx, qword [rsp + 0x58]
jmp 0x1400bf8dc
xor r13d, r13d
cmp ebx, 2
mov r14, qword [rsp + 0x58]
je 0x1400bfbcb
cmp ebx, 0x17
jne 0x1400bf6f7
lea rcx, [rsp + 0x2c0]
mov edx, Ordinal_41
call fcn.14019d90c
test rax, rax
jne 0x1400bfc13
xor ebx, ebx
jmp 0x1400bfc1c
lea r8, [rsp + 0x3c4]
lea rdx, [rsp + 0x2c0]
mov ecx, 2
call fcn.1400cffa0
test eax, eax
jle 0x1400bf6f7
mov word [rsp + 0x3c0], 2
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3c2], ax
mov r13d, 0x10
jmp 0x1400bf6f7
mov rbx, rax
inc rbx
mov byte [rax], 0
lea r8, [rsp + 0x3c8]
lea rdx, [rsp + 0x2c0]
mov ecx, Ordinal_26
call fcn.1400cffa0
mov r13d, 0x1c
test eax, eax
jle 0x1400bf6f7
mov word [rsp + 0x3c0], Ordinal_26
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3c2], ax
test rbx, rbx
je 0x1400bf6f7
mov rcx, rbx
call fcn.1401bc070
mov dword [rsp + 0x3d8], eax
jmp 0x1400bf6f7