Function at 0x140046420
Capabilities:
Get socket status

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 8], ecx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
movsxd rbx, ecx
xor eax, eax
xor r15d, r15d
movsxd rsi, r8d
xor edi, edi
mov qword [rsp + 0x58], r15
lea rcx, [0x140270f40]
mov qword [rsp + 0x58], rdi
mov r12, rdx
mov qword [rsp + 0x48], rax
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rbx, qword [rax + rbx*8]
call fcn.14002e7d0
mov ebx, dword [rbx + 0x70]
lea rcx, [rsp + 0x38]
mov rdx, rsi
mov dword [rsp + 0xb8], ebx
call fcn.140040a60
lea esi, [rbx + 1]
mov r14d, 2
movsxd rbx, esi
cmp rbx, r14
ja 0x1400464a8
mov rax, rbx
jmp 0x1400464b6
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x1400464d5
cmp rbx, r14
ja 0x1400464c5
mov ebp, esi
jmp 0x1400464da
lea rax, [rbx - 1]
mov rbp, r14
bsr rcx, rax
shl rbp, cl
jmp 0x1400464da
mov ebp, 0x40
lea edx, [rbp + 1]
mov r8d, 8
shl rdx, 3
mov rcx, r15
call fcn.14004f440
xor r13d, r13d
mov r15, rax
mov dword [rax], r13d
cmp rbx, r14
ja 0x140046502
mov rdx, rbx
jmp 0x140046510
lea rax, [rbx - 1]
mov rdx, r14
bsr rcx, rax
shl rdx, cl
cmp rdx, 0x40
jb 0x14004652f
cmp rbx, r14
ja 0x14004651f
mov eax, esi
jmp 0x140046534
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
jmp 0x140046534
mov eax, 0x40
mov rcx, qword [rsp + 0x48]
lea edx, [rax + 1]
shl rdx, 3
mov r8d, 8
mov qword [rsp + 0x30], rax
call fcn.14004f440
mov rsi, rax
mov dword [rax], r13d
movsxd r13, dword [rsp + 0x58]
mov rdx, r13
mov dword [rsp + 0xc8], edx
test r13d, r13d
je 0x140046572
mov ecx, dword [rdi]
inc ecx
cmp ecx, edx
jb 0x1400465e3
cmp rbx, r14
ja 0x14004657c
mov rax, rbx
jmp 0x14004658a
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x1400465b2
cmp rbx, r14
ja 0x1400465a2
mov r13d, dword [rsp + 0xb8]
inc r13d
jmp 0x1400465b8
lea rax, [rbx - 1]
mov r13, r14
bsr rcx, rax
shl r13, cl
jmp 0x1400465b8
mov r13d, 0x40
lea r8, [rdx*8 + 8]
mov rcx, rdi
lea edx, [r13 + 1]
shl rdx, 3
call fcn.14004f440
cmp dword [rsp + 0xc8], 0
mov rdi, rax
jne 0x1400465e3
mov dword [rax], 0
test byte [r12], 1
je 0x140046676
test ebp, ebp
je 0x1400465fb
mov eax, dword [r15]
inc eax
cmp eax, ebp
jb 0x140046661
cmp rbx, r14
ja 0x140046605
mov rax, rbx
jmp 0x140046613
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046639
cmp rbx, r14
ja 0x140046629
mov eax, dword [rsp + 0xb8]
inc eax
jmp 0x14004663e
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
jmp 0x14004663e
mov eax, 0x40
lea edx, [rax + 1]
movsxd r8, ebp
shl rdx, 3
mov rcx, r15
lea r8, [r8*8 + 8]
call fcn.14004f440
mov r15, rax
test ebp, ebp
jne 0x140046661
mov dword [rax], ebp
mov eax, dword [r15]
movsxd r8, dword [rsp + 0xb8]
mov qword [r15 + rax*8 + 8], r8
inc dword [r15]
jmp 0x14004667e
movsxd r8, dword [rsp + 0xb8]
mov rbp, r8
test byte [r12], r14b
je 0x14004670d
mov rdx, qword [rsp + 0x30]
test edx, edx
je 0x14004669c
mov eax, dword [rsi]
inc eax
cmp eax, edx
jb 0x140046704
cmp rbx, r14
ja 0x1400466a6
mov rax, rbx
jmp 0x1400466b4
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x1400466d5
cmp rbx, r14
ja 0x1400466c5
lea eax, [r8 + 1]
jmp 0x1400466da
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
jmp 0x1400466da
mov eax, 0x40
movsxd r8, edx
mov rcx, rsi
lea edx, [rax + 1]
shl rdx, 3
lea r8, [r8*8 + 8]
call fcn.14004f440
cmp dword [rsp + 0x30], 0
mov rsi, rax
jne 0x140046704
mov dword [rax], 0
mov eax, dword [rsi]
mov qword [rsi + rax*8 + 8], rbp
inc dword [rsi]
test byte [r12], 4
je 0x140046798
test r13d, r13d
je 0x140046726
mov eax, dword [rdi]
inc eax
cmp eax, r13d
jb 0x14004678f
cmp rbx, r14
ja 0x140046730
mov rax, rbx
jmp 0x14004673e
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046763
cmp rbx, r14
ja 0x140046756
mov r14d, dword [rsp + 0xb8]
inc r14d
jmp 0x140046769
lea rax, [rbx - 1]
bsr rcx, rax
shl r14, cl
jmp 0x140046769
mov r14d, 0x40
movsxd r8, r13d
lea edx, [r14 + 1]
shl rdx, 3
mov rcx, rdi
lea r8, [r8*8 + 8]
call fcn.14004f440
mov rdi, rax
test r13d, r13d
jne 0x14004678f
mov dword [rax], r13d
mov eax, dword [rdi]
mov qword [rdi + rax*8 + 8], rbp
inc dword [rdi]
mov rax, qword [0x1402590d0]
test rax, rax
je 0x1400467b6
mov rdx, qword [rax + 0x38]
test rdx, rdx
je 0x1400467b6
mov ecx, dword [rsp + 0xb0]
call rdx
cmp dword [rsp + 0xc0], 0
lea rcx, [rsp + 0x38]
mov r13d, dword [rsp + 0xb8]
mov r14d, 0
cmovl rcx, r14
add r13d, 1
je 0x140046885
cmp dword [r15], r14d
jne 0x140046800
test rsi, rsi
je 0x1400467ee
cmp dword [rsi], r14d
jne 0x140046800
test rdi, rdi
je 0x140046885
cmp dword [rdi], r14d
je 0x140046885
mov qword [rsp + 0x20], rcx
mov r9, rdi
mov ecx, r13d
mov r8, rsi
mov rdx, r15
call qword [sym.imp.WS2_32.dll_select]
movsxd rcx, eax
call fcn.140170a40
mov rbx, rax
test eax, eax
jns 0x14004689b
mov rcx, qword gs:[0x58]
mov r14d, 0x2fe0
add r14, qword [rcx]
mov rcx, qword [r14]
test rcx, rcx
je 0x140046845
mov rax, rcx
jmp 0x140046850
call fcn.140174cc4
mov rcx, rax
mov rax, qword [r14]
cmp dword [rcx], 0x2726
jne 0x14004686d
test rax, rax
jne 0x140046862
call fcn.140174cc4
mov dword [rax], 0x2714
xor r14d, r14d
jmp 0x14004689b
test rax, rax
jne 0x140046877
call fcn.140174cc4
cmp dword [rax], 0x2736
je 0x140046914
jmp 0x140046868
call fcn.140040be0
mov rcx, rax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SleepEx]
mov ebx, r14d
mov dword [r12], r14d
test ebx, ebx
jle 0x1400468df
mov rdx, r15
mov rcx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400468b7
or dword [r12], 1
mov rdx, rsi
mov rcx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400468cb
or dword [r12], 2
mov rdx, rdi
mov rcx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400468df
or dword [r12], 4
mov rcx, r15
call fcn.140174cec
test rsi, rsi
je 0x1400468f4
mov rcx, rsi
call fcn.140174cec
test rdi, rdi
je 0x140046901
mov rcx, rdi
call fcn.140174cec
mov eax, ebx
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov r9, rdi
mov r8, rsi
mov rdx, r15
mov ecx, r13d
call fcn.140044aa0
int3