Function at 0x140022140
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1402ca088]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rsi, rdx
mov rbx, rcx
test rcx, rcx
je case.default.0x1400221be
cmp dword [rcx + 0x2b84], 0
je 0x1400225d7
mov eax, dword [rcx + 0x68]
cmp eax, 8
je 0x1400225d7
dec eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
cmp eax, 5
ja case.default.0x1400221be
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x228ac]
add rcx, rdx
jmp rcx
xor edx, edx
lea rcx, [rsp + 0x63]
mov r8d, 0xfe
call sub.VCRUNTIME140.dll_memset
cmp qword [rbx + 0x58], 0
mov word [rsp + 0x60], 0x105
je 0x1400221eb
cmp qword [rbx + 0x60], 0
je 0x1400221eb
mov al, 2
jmp 0x1400221ed
xor al, al
mov ecx, 3
mov byte [rsp + 0x62], al
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rcx
lea rdx, [rbx + 0x24]
mov qword [rsp + 0x38], rax
lea r8, [rsp + 0x30]
lea r9d, [rcx - 2]
mov rcx, qword [rbx + 8]
call fcn.140024780
test eax, eax
jle case.default.0x1400221be
mov dword [rbx + 0x68], 2
jmp case.default.0x1400221be
mov rcx, qword [rbx + 8]
lea rdx, [rbx + 0x24]
xor eax, eax
mov qword [rsp + 0x30], 2
mov word [rsp + 0x40], ax
lea r8, [rsp + 0x30]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
call fcn.140024870
test eax, eax
jle case.default.0x1400221be
cmp byte [rsp + 0x40], 5
jne 0x1400222a8
movzx edx, byte [rsp + 0x41]
test dl, 0xfd
jne 0x1400222a8
cmp dl, 2
mov eax, 5
mov ecx, 3
cmove eax, ecx
mov dword [rbx + 0x68], eax
xor eax, eax
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140157bf0
mov rbx, qword [rsp + 0x4e0]
add rsp, 0x490
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov dword [rbx + 0x68], 7
jmp case.default.0x1400221be
xor edx, edx
lea rcx, [rsp + 0x62]
mov r8d, 0x1ff
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbx + 0x58]
mov rdx, 0xffffffffffffffff
mov rax, rdx
mov byte [rsp + 0x60], 1
inc rax
cmp byte [rcx + rax], 0
jne 0x1400222d6
lea r8, [rsp + 0x62]
mov byte [rsp + 0x61], al
sub r8, rcx
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [r8 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400222f0
mov rcx, qword [rbx + 0x60]
inc rdx
cmp byte [rcx + rdx], 0
jne 0x140022303
movzx eax, byte [rsp + 0x61]
lea r8, [rsp + 0x63]
mov byte [rsp + rax + 0x62], dl
movzx eax, byte [rsp + 0x61]
add r8, rax
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [r8], al
lea r8, [r8 + 1]
test al, al
jne 0x140022330
movzx ecx, dl
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x24]
movzx eax, byte [rsp + 0x61]
lea r8, [rsp + 0x30]
add rax, 3
mov r9d, 1
add rcx, rax
mov qword [rsp + 0x30], rcx
mov rcx, qword [rbx + 8]
call fcn.140024780
test eax, eax
jle case.default.0x1400221be
mov dword [rbx + 0x68], 4
jmp case.default.0x1400221be
mov rcx, qword [rbx + 8]
lea rdx, [rbx + 0x24]
xor eax, eax
mov qword [rsp + 0x30], 2
mov word [rsp + 0x40], ax
lea r8, [rsp + 0x30]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
call fcn.140024870
test eax, eax
jle case.default.0x1400221be
cmp byte [rsp + 0x40], 1
jne 0x1400222a8
cmp byte [rsp + 0x41], 0
jne 0x1400222a8
mov eax, 5
jmp 0x140022279
mov rcx, qword [rbx + 8]
lea rdx, [rbx + 0x24]
xor eax, eax
mov qword [rsp + 0x30], 0xa
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x30]
mov word [rsp + 0x50], ax
mov r9d, 1
lea rax, [rsp + 0x48]
mov word [rsp + 0x48], 0x305
mov qword [rsp + 0x38], rax
mov byte [rsp + 0x4b], 1
call fcn.140024780
test eax, eax
jle case.default.0x1400221be
mov dword [rbx + 0x68], 6
jmp case.default.0x1400221be
mov rcx, qword [rbx + 8]
lea rdx, [rbx + 0x24]
xor eax, eax
mov qword [rsp + 0x30], 0xa
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x30]
mov word [rsp + 0x50], ax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
call fcn.140024870
test eax, eax
jle case.default.0x1400221be
cmp byte [rsp + 0x48], 5
jne 0x140022559
cmp byte [rsp + 0x49], 0
jne 0x140022559
cmp byte [rsp + 0x4b], 1
jne 0x140022559
mov eax, dword [rsp + 0x4c]
test eax, eax
jne 0x1400224a6
movups xmm0, xmmword [0x14018f398]
movups xmmword [rbx + 0x10], xmm0
jmp 0x1400224e7
cmp eax, 0xffffffff
jne 0x1400224b8
movups xmm0, xmmword [0x14018f3b8]
movups xmmword [rbx + 0x10], xmm0
jmp 0x1400224e7
movzx ecx, byte [rsp + 0x4c]
movups xmm0, xmmword [0x14018f3a8]
movups xmmword [rbx + 0x10], xmm0
mov byte [rbx + 0x1c], cl
mov ecx, eax
shr ecx, 8
mov byte [rbx + 0x1d], cl
mov ecx, eax
shr ecx, 0x10
shr eax, 0x18
mov byte [rbx + 0x1f], al
mov word [rbx + 0x1a], 0xffff
mov byte [rbx + 0x1e], cl
movzx ecx, word [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_htons]
mov rdx, qword [rbx + 0x88]
mov word [rbx + 0x20], ax
imul rax, qword [rbx + 0x90], 0x208
add rax, rdx
cmp rdx, rax
jae 0x14002254d
lea rcx, [rdx + 0x22]
movups xmm0, xmmword [rbx + 0x10]
add rdx, 0x208
lea rcx, [rcx + 0x208]
movups xmmword [rcx - 0x208], xmm0
mov eax, dword [rbx + 0x20]
mov dword [rcx - 0x1f8], eax
imul rax, qword [rbx + 0x90], 0x208
add rax, qword [rbx + 0x88]
cmp rdx, rax
jb 0x140022514
mov dword [rbx + 0x68], 8
jmp case.default.0x1400221be
mov dword [rbx + 0x68], 7
lea rdx, str.Version__
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400105f0
movzx edx, byte [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.__Reply_type__
call fcn.1400105f0
movzx edx, byte [rsp + 0x49]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.__AddressType__
call fcn.1400105f0
movzx edx, byte [rsp + 0x4b]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
mov rcx, rax
lea rdx, [0x14029f0ac]
call fcn.1400105f0
jmp case.default.0x1400221be
xor r12d, r12d
mov r15d, 1
test rsi, rsi
je 0x140022607
mov dword [rdx], r12d
mov qword [rdx + 8], r12
mov qword [rdx + 0x18], r12
call fcn.14001f640
cmp eax, 0xffffffff
je 0x140022751
cmp eax, r15d
je 0x140022724
call fcn.140024470
mov dword [rbx + 0xa0], eax
add eax, 3
mov dword [rsp + 0x40], eax
nop dword [rax]
mov eax, dword [rbx + 0xa0]
mov ecx, eax
mov edx, dword [rbx + 0x74]
sub ecx, edx
sub edx, eax
cmp ecx, 0x5265c00
cmovb edx, ecx
cmp edx, 0x3e8
jb 0x140022648
mov rcx, rbx
call fcn.140024060
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400219e0
cmp eax, 0xffffffff
je 0x140022751
cmp eax, 1
je 0x140022724
mov r15d, r12d
lea r12, [rbx + 0xb18]
mov eax, dword [rbx + 0x78]
lea r8, [rsp + 0x30]
mov rcx, qword [rbx]
lea rdx, [rbx + 0x2b18]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], r12
call fcn.140024870
movsxd rdi, eax
cmp edi, 0xfffffffe
je 0x140022741
test eax, eax
js 0x140022751
je 0x14002275d
cmp dword [rbx + 0x2b84], 0
je 0x1400226c8
mov rcx, qword [rsp + 0x38]
lea r8, [rdi - 0xa]
lea rdx, [rcx + 0xa]
call fcn.140158f16
cmp dword [rbx + 0x2b84], 0
mov qword [rbx + 0x2b30], r12
mov qword [rbx + 0x2b38], rdi
je 0x1400226ea
lea rax, [rdi - 0xa]
mov qword [rbx + 0x2b38], rax
add dword [rbx + 0x2b48], edi
inc dword [rbx + 0x2b4c]
mov rax, qword [rbx + 0x2b50]
test rax, rax
je 0x14002272c
mov rdx, rsi
mov rcx, rbx
call rax
cmp eax, 0xffffffff
je 0x140022751
cmp eax, 1
jne 0x14002272c
test rsi, rsi
je 0x140022741
cmp dword [rsi], 0
je 0x140022741
mov r15d, 1
mov eax, r15d
jmp 0x14002227e
mov rdx, rsi
mov rcx, rbx
call fcn.140020820
cmp eax, 0xffffffff
je 0x140022751
cmp eax, 1
je 0x14002271e
inc r15d
cmp r15d, 0x100
jl 0x140022672
mov rax, 0xffffffffffffffff
jmp 0x14002227e
mov r15d, 1
mov rdx, rsi
mov r8d, r15d
mov rcx, rbx
call fcn.1400219e0
cmp eax, 0xffffffff
je 0x140022751
cmp eax, r15d
je 0x140022724
test rsi, rsi
je 0x140022795
mov rdx, rsi
mov rcx, rbx
call fcn.14001f640
cmp eax, 0xffffffff
je 0x140022751
cmp eax, r15d
je 0x140022724
mov eax, dword [rbx + 0xa0]
mov r14d, dword [rsp + 0x40]
sub eax, r14d
cmp eax, 0x5265c00
jb case.default.0x1400221be
call fcn.140024470
mov edx, eax
mov dword [rbx + 0xa0], eax
sub edx, r14d
cmp edx, 0x5265c00
jb case.default.0x1400221be
mov ecx, r14d
mov dword [rsp + 0x60], r15d
mov r14, qword [rbx]
lea r8, [rbp + 0x170]
sub ecx, eax
mov qword [rsp + 0x68], r14
cmp ecx, 0x5265c00
movabs rax, 0x624dd2f1a9fbe77
cmovb edx, ecx
xor r12d, r12d
mov ecx, edx
xor r9d, r9d
mul rcx
mov eax, ecx
mov dword [rbp + 0x170], r12d
sub rax, rdx
shr rax, 1
add rax, rdx
lea rdx, [rsp + 0x60]
shr rax, 9
mov dword [rsp + 0x48], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
lea ecx, [r14 + 1]
mov dword [rsp + 0x4c], eax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x140022751
je 0x14002289b
lea rdx, [rbp + 0x170]
mov rcx, r14
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov edi, r12d
lea rdx, [rsp + 0x60]
test eax, eax
mov rcx, r14
cmovne edi, r15d
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
mov eax, 2
cmovne edi, eax
call fcn.140024470
mov dword [rbx + 0xa0], eax
test dil, 2
jne 0x140022620
jmp case.default.0x1400221be
call fcn.140024470
mov dword [rbx + 0xa0], eax
jmp case.default.0x1400221be