Function at 0x140167ca0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x170]
sub rsp, 0x270
movaps xmmword [rsp + 0x260], xmm6
mov rsi, rcx
xor r12d, r12d
mov dword [rbp + 0x1b8], r12d
mov eax, dword [0x140397034]
lea r15, [rcx + 0x18]
lea r13, [0x1402cce48]
lea rcx, str.D:_a_ton_ton_tdutils_tdutilsportServerSocketFd.cpp
lea rdi, [r12 - 1]
mov r9d, dword [reloc.WS2_32.dll_listen]
cmp r9d, eax
jg 0x140167dab
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x78], 2
mov qword [rbp - 0x80], rcx
mov qword [rbp - 0x78], getservbyname
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rbp - 0x10], xmm0
movaps xmm1, xmmword [rbp - 0x80]
movdqa xmmword [rbp], xmm1
lea rax, [rbp - 0x10]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x7a
lea rax, [rbp]
mov qword [rsp + 0x20], rax
lea r8, [0x140397034]
mov rdx, qword [str.Hp9_]
lea rcx, [rbp + 0x70]
call fcn.140159fa0
nop
mov r14d, 1
mov dword [rbp + 0x1b8], r14d
lea rbx, [rax + 0x18]
mov rdx, r15
mov rcx, rbx
call fcn.14015bb60
lea rcx, str._on_read
mov qword [rbp - 0x70], rcx
mov rax, rdi
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x140167d90
mov qword [rbp - 0x68], rax
lea rdx, [rbp - 0x70]
mov rcx, rbx
call fcn.140154960
jmp 0x140167db2
mov r14d, dword [rbp + 0x1b8]
test r14b, 1
je 0x140167dc5
and r14d, 0xfffffffe
lea rcx, [rbp + 0x70]
call fcn.14015a700
cmp byte [rsi + 0xe8], 0
je 0x1401681c3
mov byte [rsi + 0xe8], 0
mov rcx, r15
call fcn.14015c080
mov qword [rbp + 0x1c8], rax
lea rcx, [rsi + 0x118]
call fcn.14015c080
mov rcx, rax
mov dword [rsp + 0x20], 8
lea r9, [rbp + 0x1c8]
mov edx, 0xffff
mov r8d, 0x700b
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140167eb9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rbp + 0x60]
call fcn.140133d00
movsd xmm6, qword [rax]
mov ebx, dword [rax + 8]
mov qword [rsp + 0x60], r12
mov ecx, 0x3b
call fcn.1402c53a4
mov rdx, rax
movsd qword [rax], xmm6
mov dword [rax + 8], ebx
movups xmm0, xmmword [str.Failed_to_set_SO_UPDATE_ACCEPT_CONTEXT_options]
movups xmmword [rax + 0xc], xmm0
movups xmm1, xmmword [0x1402cf110]
movups xmmword [rax + 0x1c], xmm1
movsd xmm0, qword [0x1402cf120]
movsd qword [rax + 0x2c], xmm0
mov eax, dword [0x1402cf128]
mov dword [rdx + 0x34], eax
movzx eax, word [0x1402cf12c]
mov word [rdx + 0x38], ax
mov byte [rdx + 0x3a], 0
or r14d, 0x18
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x40], rdx
test rdx, rdx
je 0x1401681ee
or r14d, 4
mov dword [rbp + 0x1b8], r14d
lea r15, [rsi + 0x18]
jmp 0x140167ee1
lea rdx, [rsi + 0x118]
lea rcx, [rbp + 0x10]
call fcn.14015b860
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140164ab0
or r14d, 4
mov dword [rbp + 0x1b8], r14d
mov eax, dword [0x140397034]
mov r9d, dword [reloc.WS2_32.dll_listen]
cmp r9d, eax
jg 0x140167fa1
mov qword [rbp - 0x60], r13
mov qword [rbp - 0x58], 2
lea rax, str.D:_a_ton_ton_tdutils_tdutilsportServerSocketFd.cpp
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], getservbyname
movaps xmm0, xmmword [rbp - 0x60]
movdqa xmmword [rbp + 0x20], xmm0
movaps xmm1, xmmword [rbp - 0x50]
movdqa xmmword [rbp + 0x30], xmm1
lea rax, [rbp + 0x20]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x86
lea rax, [rbp + 0x30]
mov qword [rsp + 0x20], rax
lea r8, [0x140397034]
mov rdx, qword [str.Hp9_]
lea rcx, [rbp + 0xc0]
call fcn.140159fa0
nop
mov ebx, dword [rbp + 0x1b8]
or ebx, 2
mov dword [rbp + 0x1b8], ebx
lea r14, [rax + 0x18]
mov rdx, r15
mov rcx, r14
call fcn.14015bb60
lea rax, str._finish_accept
mov qword [rbp - 0x40], rax
inc rdi
cmp byte [rax + rdi], 0
jne 0x140167f86
mov qword [rbp - 0x38], rdi
lea rdx, [rbp - 0x40]
mov rcx, r14
call fcn.140154960
jmp 0x140167fa7
mov ebx, dword [rbp + 0x1b8]
test bl, 2
je 0x140167fc1
and ebx, 0xfffffffd
mov dword [rbp + 0x1b8], ebx
lea rcx, [rbp + 0xc0]
call fcn.14015a700
cmp qword [rsp + 0x40], 0
je 0x140168025
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call fcn.1401309f0
mov rdx, rax
mov rcx, rsi
call fcn.1401679e0
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
jne 0x140168006
lea rcx, [rsp + 0x48]
call fcn.140164550
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1401681cb
movsd xmm0, qword [rcx]
movsd qword [rsp + 0x50], xmm0
test byte [rsp + 0x50], 1
jne 0x1401681cb
call fcn.1402c539c
jmp 0x1401681cb
lea rdi, [rsi + 0x40]
mov ebx, r12d
mov eax, 1
xchg dword [rdi], eax
test eax, eax
je 0x14016804e
inc ebx
cmp ebx, 0x32
jl 0x140168043
call sub.MSVCP140.dll__Thrd_yield
mov eax, 1
xchg dword [rdi], eax
test eax, eax
jne 0x140168037
mov qword [rsp + 0x50], rdi
mov eax, dword [0x140397034]
test eax, eax
js 0x1401680fc
cmp qword [rsp + 0x40], 0
je 0x1401680fc
lea rax, str.status_.is_ok__
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], reloc.WS2_32.dll_ntohs
lea rax, str.D:_a_ton_ton_tdutils_td_utils_Status.h
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], 0x26
movaps xmm0, xmmword [rbp - 0x30]
movdqa xmmword [rbp + 0x40], xmm0
movaps xmm1, xmmword [rbp - 0x20]
movdqa xmmword [rbp + 0x50], xmm1
lea rax, [rbp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x23b
lea rax, [rbp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [0x140397034]
mov rdx, qword [str.Hp9_]
lea rcx, [rbp + 0x110]
call fcn.140159fa0
nop
mov ebx, dword [rbp + 0x1b8]
or ebx, 0x40
mov dword [rbp + 0x1b8], ebx
lea rdx, [rax + 0x18]
lea rcx, [rsp + 0x40]
call fcn.140130d60
jmp 0x140168102
mov ebx, dword [rbp + 0x1b8]
test bl, 0x40
je 0x140168116
and ebx, 0xffffffbf
lea rcx, [rbp + 0x110]
call fcn.14015a700
lea rdx, [rsp + 0x48]
lea rcx, [rbp + 0x1c0]
call fcn.140163770
bts ebx, 7
mov dword [rbp + 0x1b8], ebx
mov rax, qword [rsi + 0x50]
cmp rax, qword [rsi + 0x58]
je 0x140168151
lea rdx, [rbp + 0x1c0]
mov rcx, rax
call fcn.140163770
add qword [rsi + 0x50], 8
jmp 0x140168165
lea r8, [rbp + 0x1c0]
mov rdx, rax
lea rcx, [rsi + 0x48]
call fcn.140166c40
nop
lea rcx, [rbp + 0x1c0]
call fcn.140164550
nop
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x140168180
nop
mov dword [rax], r12d
lea rcx, [rsi + 8]
mov edx, 2
call fcn.1401647a0
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
jne 0x1401681ad
lea rcx, [rsp + 0x48]
call fcn.140164550
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1401681c3
movsd xmm0, qword [rcx]
movsd qword [rsp + 0x50], xmm0
test byte [rsp + 0x50], 1
jne 0x1401681c3
call fcn.1402c539c
mov rcx, rsi
call fcn.140167730
mov rbx, qword [rsp + 0x2b0]
movaps xmm6, xmmword [rsp + 0x260]
add rsp, 0x270
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r8d, 0x1cc
lea rdx, str.D:_a_ton_ton_tdutils_td_utils_Status.h
lea rcx, str.status_.is_error__
call fcn.140153ae0
int3