Function at 0x140019990
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x610]
sub rsp, 0x710
mov rax, qword [0x1400a3708]
xor rax, rsp
mov qword [rbp + 0x600], rax
mov rax, qword [rbp + 0x670]
mov esi, edx
mov dword [rsp + 0x50], edx
mov r15, rcx
mov qword [rbp - 0x78], rcx
mov r14d, 0x400
mov r8d, r14d
mov qword [rsp + 0x58], r9
xor edx, edx
mov qword [rbp - 0x70], rax
lea rcx, [rbp + 0x200]
call fcn.140045920
lea rcx, [rbp - 0x38]
call fcn.140050148
movzx eax, word [rbp - 0x30]
lea rcx, [rbp - 0x60]
imul r12, qword [rbp - 0x38], 0x3e8
xor ebx, ebx
xor r13d, r13d
add r12, rax
mov dword [rsp + 0x54], ebx
movabs rax, 0x20c49ba5e353f7cf
mov qword [rsp + 0x70], r12
imul r12
mov qword [rsp + 0x60], r13
mov rdi, rdx
lea rdx, [rbp - 0x80]
sar rdi, 7
mov rax, rdi
shr rax, 0x3f
add rdi, rax
mov qword [rbp - 0x80], rdi
call fcn.140052128
lea r13, [rbp + 0x200]
mov qword [rsp + 0x78], r13
cmp qword [r15 + 0x10], rbx
je 0x14001a077
cmp esi, 0x28
jne 0x140019a9f
mov ecx, dword [r15]
lea eax, [rcx - 0x20]
test eax, 0xfffffff7
je 0x140019a80
cmp ecx, 0x30
je 0x140019aa8
jmp 0x14001a077
mov rax, qword [r15 + 0x88]
add rax, 0x3e8
cmp r12, rax
jle 0x14001a077
mov qword [r15 + 0x88], r12
jmp 0x140019aa8
cmp esi, dword [r15]
jg 0x14001a077
or rsi, 0xffffffffffffffff
cmp dword [reloc.WS2_32.dll_accept], ebx
je 0x140019c45
lea ecx, [rsi + 2]
call fcn.14004bcdc
mov edx, dword [rbp - 0x50]
lea r8, str.__04d_02d_02d__02d:_02d:_02d._03lld___
mov r9d, dword [rbp - 0x4c]
inc edx
imul rax, rdi, 0x3e8
mov rcx, r12
add r9d, 0x76c
sub rcx, rax
mov eax, dword [rbp - 0x60]
mov qword [rsp + 0x48], rcx
lea rcx, [rbp + 0x200]
mov dword [rsp + 0x40], eax
mov eax, dword [rbp - 0x5c]
mov dword [rsp + 0x38], eax
mov eax, dword [rbp - 0x58]
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x54]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], edx
mov rdx, r14
call fcn.140001190
lea rax, [rbp + 0x200]
mov rbx, rsi
inc rbx
cmp byte [rax + rbx], 0
jne 0x140019b22
cmp ebx, 0x3ff
jge 0x140019bdc
mov eax, dword [rsp + 0x50]
add eax, 8
cmp eax, 0x38
ja case.0x140019b5e.7
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x1a0c8]
mov ecx, dword [rdx + rax*4 + 0x1a0a4]
add rcx, rdx
jmp rcx
lea r8, str._QUIET_____
jmp 0x140019baf
lea r8, str._PANIC_____
jmp 0x140019baf
lea r8, str._FATAL_____
jmp 0x140019baf
lea r8, str._ERROR_____
jmp 0x140019baf
lea r8, str._WARN______
jmp 0x140019baf
lea r8, str._INFO______
jmp 0x140019baf
lea r8, str._VERBOSE___
jmp 0x140019baf
lea r8, str._DEBUG_____
jmp 0x140019baf
lea r8, str._UNKNOWN___
mov eax, r14d
lea rcx, [rbp + 0x200]
sub eax, ebx
movsxd rdx, eax
movsxd rax, ebx
add rcx, rax
call fcn.140001190
lea rax, [rbp + 0x200]
mov rbx, rsi
inc rbx
cmp byte [rax + rbx], 0
jne 0x140019bd3
test byte [r15 + 0x80], 1
je 0x140019c39
cmp ebx, 0x3ff
jge 0x140019c23
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.KERNEL32.dll_GetCurrentProcessId
mov r9d, eax
mov dword [rsp + 0x20], edi
mov eax, r14d
lea rcx, [rbp + 0x200]
sub eax, ebx
lea r8, str._pid:_u_threadid:_lu__
movsxd rdx, eax
movsxd rax, ebx
add rcx, rax
call fcn.140001190
lea rax, [rbp + 0x200]
mov rbx, rsi
nop dword [rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x140019c30
cmp ebx, 0x3ff
jge 0x140019d25
mov r9, qword [rbp - 0x70]
lea r12, [rbp + 0x200]
mov r8, qword [rsp + 0x58]
mov edi, r14d
movsxd rax, ebx
sub edi, ebx
add r12, rax
movsxd rdx, edi
mov rcx, r12
mov qword [rsp + 0x68], rax
call fcn.140019410
mov ecx, eax
lea eax, [rdi - 1]
cmp ecx, eax
jle 0x140019d13
lea edi, [rcx + 0x64]
add edi, ebx
movsxd rcx, edi
call fcn.14005126c
mov qword [rsp + 0x60], rax
mov r8, rax
test rax, rax
je 0x140019d13
lea rax, [rbp + 0x200]
mov byte [r12], 0
mov rdx, r8
mov dword [rsp + 0x54], edi
sub rdx, rax
lea rcx, [rbp + 0x200]
mov r14d, edi
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rcx + rdx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140019cc0
sub edi, ebx
movsxd rbx, edi
mov rdi, qword [rsp + 0x68]
add rdi, r8
call fcn.140001120
mov r9, qword [rsp + 0x58]
mov r8, rbx
mov rdx, rdi
mov rcx, qword [rax]
mov rax, qword [rbp - 0x70]
or rcx, 1
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
call fcn.14004f980
mov r13, qword [rsp + 0x60]
mov qword [rsp + 0x78], r13
mov rbx, rsi
inc rbx
cmp byte [rbx + r13], 0
jne 0x140019d16
mov r12, qword [rsp + 0x70]
lea eax, [rbx - 1]
movsxd rcx, eax
xor eax, eax
cmp byte [rcx + r13], 0xa
sete al
mov dword [reloc.WS2_32.dll_accept], eax
cmp byte [r15 + 0x30], 0
je 0x140019f21
lea rcx, [rbp - 0x70]
call fcn.140050148
imul r9, qword [rbp - 0x70], 0x3e8
movzx eax, word [rbp - 0x68]
add r9, rax
sub r9, r12
cmp r9, 2
jl 0x140019d9c
lea eax, [r14 - 1]
cmp ebx, eax
jge 0x140019d9c
sub r14d, ebx
movsxd rcx, ebx
movsxd rdx, r14d
lea r8, str._n___log_much__lld_ms__log_len__d_n
add rcx, r13
mov dword [rsp + 0x20], ebx
call fcn.140001190
nop dword [rax + rax]
inc rsi
cmp byte [rsi + r13], 0
jne 0x140019d90
mov ebx, esi
cmp qword [r15 + 0x38], 0
je 0x14001a05e
lea rax, [r15 + 0x68]
xor r12d, r12d
mov qword [rsp + 0x70], rax
lea rax, [r15 + 0x40]
mov qword [rsp + 0x68], rax
nop dword [rax]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r15, qword [r15 + 0x38]
mov edx, ebx
sub edx, r12d
movsxd r14, r12d
add r14, r13
mov r8d, dword [r15]
mov esi, dword [r15 + 8]
mov r13d, esi
mov ecx, dword [r15 + 0xc]
sub r13d, r8d
add r13d, dword [r15 + 4]
mov eax, ecx
cmp edx, r13d
cmovb r13d, edx
and eax, r8d
sub esi, eax
mov rdx, r14
cmp r13d, esi
cmovb esi, r13d
and rcx, r8
add rcx, qword [r15 + 0x10]
mov r8d, esi
call fcn.140043b40
mov rcx, qword [r15 + 0x10]
lea rdx, [rsi + r14]
mov r8d, r13d
sub r8d, esi
call fcn.140043b40
add dword [r15], r13d
cmp qword [sym.imp.KERNEL32.dll_WakeConditionVariable], 0
mov rax, qword [rsp + 0x70]
mov r14, qword [rax]
je 0x140019e47
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WakeConditionVariable]
jmp 0x140019e9d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [r14 + 0x28]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [r14 + 0x50]
lea rcx, [r14 + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x140019e94
mov rcx, qword [r14 + 0x58]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov rcx, qword [r14 + 0x60]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [r14 + 0x60]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r13d, r13d
jle 0x140019eb2
add r12d, r13d
jmp 0x140019f06
mov edx, 1
lea ecx, [rdx + 1]
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
lea r9, [rbp - 0x10]
mov dword [rbp - 0x10], 1
mov rdi, rax
mov qword [rbp - 8], rax
lea rax, [rsp + 0x58]
mov dword [rsp + 0x58], 0
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
mov dword [rsp + 0x5c], 0x3e8
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov r15, qword [rbp - 0x78]
mov r13, qword [rsp + 0x78]
lea rax, [r15 + 0x40]
cmp r12d, ebx
jl 0x140019dc0
jmp 0x14001a05e
lea rcx, [r15 + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, ebx
mov rcx, r15
call fcn.140019850
mov rax, qword gs:[0x58]
mov edx, 4
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x1400a70d8], eax
jle 0x140019f84
lea rcx, [0x1400a70d8]
call fcn.1400426d4
cmp dword [0x1400a70d8], 0xffffffff
jne 0x140019f84
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea rcx, [0x1400a70d8]
mov qword [0x1400a70e0], rax
call fcn.140042674
mov ecx, 1
call fcn.14004bcdc
cmp rax, qword [r15 + 0x10]
jne 0x140019feb
mov eax, dword [rsp + 0x50]
add eax, 8
cmp eax, 0x38
ja case.0x140019fbb.7
lea rdx, [0x140000000]
cdqe
movzx eax, byte [rdx + rax + 0x1a11c]
mov ecx, dword [rdx + rax*4 + 0x1a104]
add rcx, rdx
jmp rcx
mov edx, ntohs
jmp 0x140019fde
mov edx, reloc.WS2_32.dll_ntohl
jmp 0x140019fde
mov edx, 2
jmp 0x140019fde
mov edx, 3
jmp 0x140019fde
mov edx, 7
mov rcx, qword [0x1400a70e0]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [r15 + 0x10]
lea rdx, [0x140083b24]
mov r8, r13
call fcn.1400193c0
mov ecx, 1
call fcn.14004bcdc
cmp rax, qword [r15 + 0x10]
jne 0x14001a020
mov rcx, qword [0x1400a70e0]
mov edx, 7
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rcx, [rbp - 0x28]
call fcn.140050148
imul r8, qword [rbp - 0x28], 0x3e8
movzx eax, word [rbp - 0x20]
add r8, rax
sub r8, r12
cmp r8, 2
jl 0x14001a054
mov rcx, qword [r15 + 0x10]
lea rdx, str._n___log_much__lld_ms__log_len__d_n
mov r9d, ebx
call fcn.1400193c0
lea rcx, [r15 + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [rsp + 0x54], 0
jle 0x14001a077
mov rax, qword [rsp + 0x60]
test rax, rax
je 0x14001a077
mov rcx, rax
call fcn.1400502e4
mov rcx, qword [rbp + 0x600]
xor rcx, rsp
call fcn.140042500
mov rbx, qword [rsp + 0x758]
add rsp, 0x710
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret