Function at 0x140038870
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x18], rbx
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov rsi, r8
mov r15, rcx
lea rbx, [rcx + 0x30]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0x40], al
cmp byte [r15 + 0x198], 0
jne 0x140038fd4
lea rbp, [r15 + 0x148]
mov rax, qword [rbp]
xor r13d, r13d
mov dword [rax], r13d
mov qword [rbp + 0x10], 0xffffffffffffffff
mov rax, qword [r15 + 0x160]
mov dword [rax], r13d
mov qword [r15 + 0x170], 0xffffffffffffffff
mov rax, qword [r15 + 0x178]
mov dword [rax], r13d
mov qword [r15 + 0x188], 0xffffffffffffffff
mov rbx, qword [r15 + 0x58]
mov ecx, r13d
mov r8, qword [rbp]
mov edx, dword [r8]
test edx, edx
je 0x14003891f
nop
mov eax, ecx
cmp qword [r8 + rax*8 + 8], rbx
je 0x14003893a
inc ecx
cmp ecx, edx
jb 0x140038910
inc edx
mov rcx, rbp
call fcn.140038090
mov rcx, qword [rbp]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rbx
mov rax, qword [rbp]
inc dword [rax]
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x140038960
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140038c2f
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140038946
xor al, al
test al, al
jne 0x140038974
cmp qword [r15 + 0x78], r13
mov byte [rsp + 0xa0], r13b
je 0x14003897c
mov byte [rsp + 0xa0], 1
mov rax, qword [r15 + 0x70]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140038a2b
nop dword [rax]
lea rdi, [rbx]
mov rbx, qword [rbx]
mov r14, qword [rbp]
mov eax, dword [r14]
lea edx, [rax + 1]
mov ecx, dword [rbp + 8]
cmp edx, ecx
jbe 0x140038a12
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r12d, edx
lea rcx, [rdx*8 + 8]
call fcn.1401452c0
mov r14, rax
mov rcx, qword [rbp]
mov edx, dword [rcx]
mov dword [rax], edx
mov edx, r13d
mov r8, qword [rbp]
cmp dword [r8], r13d
jbe 0x1400389ff
nop dword [rax]
mov eax, edx
lea rcx, [rax*8]
mov rax, qword [rcx + r8 + 8]
mov qword [r14 + rcx + 8], rax
inc edx
mov r8, qword [rbp]
cmp edx, dword [r8]
jb 0x1400389e0
mov rcx, r8
call fcn.140079780
mov qword [rbp], r14
mov dword [rbp + 8], r12d
mov eax, dword [r14]
mov rcx, qword [rdi + 0x10]
mov qword [r14 + rax*8 + 8], rcx
mov rax, qword [rbp]
inc dword [rax]
cmp rbx, qword [r15 + 0x70]
jne 0x140038990
mov r13, qword [r15 + 0x158]
xor eax, eax
test r13, r13
cmove r13, rax
cmp byte [rsp + 0xa0], al
jne 0x140038a54
cmp qword [r15 + 0xb0], rax
mov byte [rsp + 0xa0], al
je 0x140038a5c
mov byte [rsp + 0xa0], 1
mov rax, qword [r15 + 0xa8]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140038b19
nop
lea rdi, [rbx]
mov rbx, qword [rbx]
mov rax, qword [r15 + 0x160]
mov edx, dword [rax]
inc edx
mov ecx, dword [r15 + 0x168]
cmp edx, ecx
jbe 0x140038af1
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r12d, edx
lea rcx, [rdx*8 + 8]
call fcn.1401452c0
mov r14, rax
mov rcx, qword [r15 + 0x160]
mov edx, dword [rcx]
mov dword [rax], edx
xor edx, edx
mov r8, qword [r15 + 0x160]
cmp dword [r8], edx
jbe 0x140038adb
mov rax, qword [r8 + rdx*8 + 8]
mov qword [r14 + rdx*8 + 8], rax
inc edx
mov r8, qword [r15 + 0x160]
cmp edx, dword [r8]
jb 0x140038ac3
mov rcx, r8
call fcn.140079780
mov qword [r15 + 0x160], r14
mov dword [r15 + 0x168], r12d
mov rdx, qword [rdi + 0x10]
mov rcx, qword [r15 + 0x160]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rdx
mov rax, qword [r15 + 0x160]
inc dword [rax]
cmp rbx, qword [r15 + 0xa8]
jne 0x140038a70
mov rax, qword [r15 + 0x170]
cmp rax, r13
cmova r13, rax
cmp byte [rsp + 0xa0], 0
jne 0x140038b43
cmp qword [r15 + 0xe8], 0
mov byte [rsp + 0xa0], 0
je 0x140038b4b
mov byte [rsp + 0xa0], 1
mov rax, qword [r15 + 0xe0]
mov rbx, qword [rax]
cmp rbx, rax
je 0x140038c09
nop
lea rdi, [rbx]
mov rbx, qword [rbx]
mov rax, qword [r15 + 0x178]
mov edx, dword [rax]
inc edx
mov ecx, dword [r15 + 0x180]
cmp edx, ecx
jbe 0x140038be1
mov eax, ecx
shr eax, 1
add ecx, eax
cmp ecx, edx
cmovae edx, ecx
mov r12d, edx
lea rcx, [rdx*8 + 8]
call fcn.1401452c0
mov r14, rax
mov rcx, qword [r15 + 0x178]
mov edx, dword [rcx]
mov dword [rax], edx
xor edx, edx
mov r8, qword [r15 + 0x178]
cmp dword [r8], edx
jbe 0x140038bcb
mov rax, qword [r8 + rdx*8 + 8]
mov qword [r14 + rdx*8 + 8], rax
inc edx
mov r8, qword [r15 + 0x178]
cmp edx, dword [r8]
jb 0x140038bb3
mov rcx, r8
call fcn.140079780
mov qword [r15 + 0x178], r14
mov dword [r15 + 0x180], r12d
mov rdx, qword [rdi + 0x10]
mov rcx, qword [r15 + 0x178]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rdx
mov rax, qword [r15 + 0x178]
inc dword [rax]
cmp rbx, qword [r15 + 0xe0]
jne 0x140038b60
mov rax, qword [r15 + 0x188]
cmp rax, r13
cmova r13, rax
cmp byte [rsp + 0xa0], 0
jne 0x140038c36
cmp qword [r15 + 0x120], 0
jne 0x140038c36
xor bl, bl
jmp 0x140038c38
mov al, 1
jmp 0x140038962
mov bl, 1
mov r8, rsi
lea rdx, [r15 + 0x110]
lea rcx, [r15 + 0x160]
call fcn.140039210
mov rax, qword [r15 + 0x170]
cmp rax, r13
cmova r13, rax
lea rcx, [r15 + 0x178]
mov r8, rsi
lea rdx, [r15 + 0x110]
call fcn.140039210
mov r14, qword [r15 + 0x188]
cmp r14, r13
cmovbe r14, r13
mov ecx, dword [rsp + 0xa8]
test ecx, ecx
jne 0x140038c93
test bl, bl
je 0x140038ff9
xor ebx, ebx
mov qword [rsp + 0xb8], rbx
test ecx, ecx
je 0x140038cff
mov eax, 0x11e1a300
cmp ecx, eax
cmova ecx, eax
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x140038cd6
nop word [rax + rax]
mov rax, qword [rbx]
mov edx, ecx
mov rcx, rbx
call qword [rax + 0x18]
mov ecx, eax
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140038cc0
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0xb8], edx
imul eax, edx, 0xf4240
sub ecx, eax
mov dword [rsp + 0xbc], ecx
xor ebx, ebx
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov byte [rsp + 0xa0], al
mov byte [rsp + 0x40], al
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], rbx
lea r13, [r15 + 0x178]
mov r9, qword [r13]
mov r8, qword [r15 + 0x160]
mov rdx, qword [rbp]
test rdx, rdx
jne 0x140038dac
test r8, r8
jne 0x140038dac
test r9, r9
jne 0x140038dac
mov eax, 0x10624dd3
imul dword [rsp + 0xbc]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul eax, dword [rsp + 0xb8], 0x3e8
add ecx, eax
mov eax, 1
cmove ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
movabs rcx, 0x4d54ee85da812030
add rcx, qword [0x1401c1020]
cmp rcx, 1
jbe 0x140038e54
mov rax, qword [0x1401c1018]
xor edx, edx
lea rcx, [0x1401c1018]
call qword [rax + 0x30]
jmp 0x140038e54
cmp dword [rsp + 0xb8], 0
jne 0x140038dd6
mov ecx, dword [rsp + 0xbc]
lea eax, [rcx - 1]
mov r10d, 0x3e8
cmp eax, 0x3e6
cmovbe ecx, r10d
mov dword [rsp + 0xbc], ecx
lea ecx, [r14 + 1]
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
mov edx, eax
shr edx, 0x1f
lea rcx, [rsp + 0x48]
call fcn.14000a290
test ebx, ebx
jle 0x140038e54
mov rdx, qword [rbp]
mov rcx, qword [r15 + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140038e54
lea rcx, [r15 + 0x58]
call fcn.1400382a0
test al, al
jne 0x140038e45
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov bpl, 1
mov byte [rsp + 0xa0], bpl
mov byte [rsp + 0x40], bpl
lea rcx, [r15 + 0x58]
call fcn.140037e70
jmp 0x140038e4d
movzx ebp, byte [rsp + 0xa0]
dec ebx
test bpl, bpl
jne 0x140038e6b
lea rcx, [r15 + 0x30]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, 1
mov byte [rsp + 0xa0], al
mov byte [rsp + 0x40], al
test ebx, ebx
jle 0x140038fa6
mov r8, rsi
lea rdx, [r15 + 0x110]
mov rcx, r13
call fcn.140037ca0
mov r8, rsi
lea rdx, [r15 + 0x110]
lea rcx, [r15 + 0x160]
call fcn.140037ca0
mov r12d, 2
lea rbp, [r15 + 0xe0]
nop dword [rax + rax]
xor r14d, r14d
mov rcx, qword [r13]
cmp dword [rcx], r14d
jbe 0x140038f94
mov r8, qword [rcx + r14*8 + 8]
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x140038f84
xor edx, edx
mov rax, r8
div rcx
add rdx, rdx
mov rax, qword [rbp + 0x20]
mov rbx, qword [rax + rdx*8]
cmp rbx, qword [rbp]
je 0x140038f84
mov rax, qword [rax + rdx*8 + 8]
mov rcx, qword [rax]
cmp rbx, rcx
je 0x140038f84
cmp qword [rbx + 0x10], r8
je 0x140038f13
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140038f00
jmp 0x140038f84
cmp rbx, qword [rbp]
je 0x140038f84
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x140038f78
mov rax, qword [rdi + 0x60]
mov rcx, rdi
call rax
test eax, eax
je 0x140038f84
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140038f51
mov rax, qword [rcx + 0x20]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x140038f49
mov qword [rbx + 0x20], rax
mov qword [rcx + 0x20], 0
mov qword [rdi + 0x20], 0
mov rax, qword [rsi + 8]
test rax, rax
je 0x140038f68
mov qword [rax + 0x20], rdi
jmp 0x140038f6b
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rdi, qword [rbx + 0x18]
test rdi, rdi
jne 0x140038f22
lea rcx, [rbp - 8]
mov rdx, rbx
call fcn.140009f30
inc r14d
mov rcx, qword [r13]
cmp r14d, dword [rcx]
jb 0x140038ec0
sub r13, 0x18
sub rbp, 0x38
sub r12, 1
jns 0x140038eb0
mov rbx, qword [r15 + 0x190]
test rbx, rbx
je 0x140038fc7
mov rax, qword [rbx]
mov rdx, rsi
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140038fb2
movzx eax, byte [rsp + 0xa0]
mov rbx, qword [rsp + 0x30]
test al, al
je 0x140038fe1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0xb0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov al, 1
jmp 0x140038fcf