Function at 0x140046c00
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, [0x140272f60]
mov qword [rsp + 0x58], rdi
mov r12, rdx
mov qword [rsp + 0x48], rax
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140272fe0]
lea rcx, [0x140272f60]
mov rbx, qword [rax + rbx*8]
call fcn.14002ec90
mov ebx, dword [rbx + 0x70]
lea rcx, [rsp + 0x38]
mov rdx, rsi
mov dword [rsp + 0xb8], ebx
call fcn.140041100
lea esi, [rbx + 1]
mov r14d, 2
movsxd rbx, esi
cmp rbx, r14
ja 0x140046c88
mov rax, rbx
jmp 0x140046c96
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046cb5
cmp rbx, r14
ja 0x140046ca5
mov ebp, esi
jmp 0x140046cba
lea rax, [rbx - 1]
mov rbp, r14
bsr rcx, rax
shl rbp, cl
jmp 0x140046cba
mov ebp, 0x40
lea edx, [rbp + 1]
mov r8d, 8
shl rdx, 3
mov rcx, r15
call fcn.14004fc30
xor r13d, r13d
mov r15, rax
mov dword [rax], r13d
cmp rbx, r14
ja 0x140046ce2
mov rdx, rbx
jmp 0x140046cf0
lea rax, [rbx - 1]
mov rdx, r14
bsr rcx, rax
shl rdx, cl
cmp rdx, 0x40
jb 0x140046d0f
cmp rbx, r14
ja 0x140046cff
mov eax, esi
jmp 0x140046d14
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
jmp 0x140046d14
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.14004fc30
mov rsi, rax
mov dword [rax], r13d
movsxd r13, dword [rsp + 0x58]
mov rdx, r13
mov dword [rsp + 0xc8], edx
test r13d, r13d
je 0x140046d52
mov ecx, dword [rdi]
inc ecx
cmp ecx, edx
jb 0x140046dc3
cmp rbx, r14
ja 0x140046d5c
mov rax, rbx
jmp 0x140046d6a
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046d92
cmp rbx, r14
ja 0x140046d82
mov r13d, dword [rsp + 0xb8]
inc r13d
jmp 0x140046d98
lea rax, [rbx - 1]
mov r13, r14
bsr rcx, rax
shl r13, cl
jmp 0x140046d98
mov r13d, 0x40
lea r8, [rdx*8 + 8]
mov rcx, rdi
lea edx, [r13 + 1]
shl rdx, 3
call fcn.14004fc30
cmp dword [rsp + 0xc8], 0
mov rdi, rax
jne 0x140046dc3
mov dword [rax], 0
test byte [r12], 1
je 0x140046e56
test ebp, ebp
je 0x140046ddb
mov eax, dword [r15]
inc eax
cmp eax, ebp
jb 0x140046e41
cmp rbx, r14
ja 0x140046de5
mov rax, rbx
jmp 0x140046df3
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046e19
cmp rbx, r14
ja 0x140046e09
mov eax, dword [rsp + 0xb8]
inc eax
jmp 0x140046e1e
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
jmp 0x140046e1e
mov eax, 0x40
lea edx, [rax + 1]
movsxd r8, ebp
shl rdx, 3
mov rcx, r15
lea r8, [r8*8 + 8]
call fcn.14004fc30
mov r15, rax
test ebp, ebp
jne 0x140046e41
mov dword [rax], ebp
mov eax, dword [r15]
movsxd r8, dword [rsp + 0xb8]
mov qword [r15 + rax*8 + 8], r8
inc dword [r15]
jmp 0x140046e5e
movsxd r8, dword [rsp + 0xb8]
mov rbp, r8
test byte [r12], r14b
je 0x140046eed
mov rdx, qword [rsp + 0x30]
test edx, edx
je 0x140046e7c
mov eax, dword [rsi]
inc eax
cmp eax, edx
jb 0x140046ee4
cmp rbx, r14
ja 0x140046e86
mov rax, rbx
jmp 0x140046e94
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046eb5
cmp rbx, r14
ja 0x140046ea5
lea eax, [r8 + 1]
jmp 0x140046eba
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
jmp 0x140046eba
mov eax, 0x40
movsxd r8, edx
mov rcx, rsi
lea edx, [rax + 1]
shl rdx, 3
lea r8, [r8*8 + 8]
call fcn.14004fc30
cmp dword [rsp + 0x30], 0
mov rsi, rax
jne 0x140046ee4
mov dword [rax], 0
mov eax, dword [rsi]
mov qword [rsi + rax*8 + 8], rbp
inc dword [rsi]
test byte [r12], 4
je 0x140046f78
test r13d, r13d
je 0x140046f06
mov eax, dword [rdi]
inc eax
cmp eax, r13d
jb 0x140046f6f
cmp rbx, r14
ja 0x140046f10
mov rax, rbx
jmp 0x140046f1e
lea rax, [rbx - 1]
bsr rcx, rax
mov rax, r14
shl rax, cl
cmp rax, 0x40
jb 0x140046f43
cmp rbx, r14
ja 0x140046f36
mov r14d, dword [rsp + 0xb8]
inc r14d
jmp 0x140046f49
lea rax, [rbx - 1]
bsr rcx, rax
shl r14, cl
jmp 0x140046f49
mov r14d, 0x40
movsxd r8, r13d
lea edx, [r14 + 1]
shl rdx, 3
mov rcx, rdi
lea r8, [r8*8 + 8]
call fcn.14004fc30
mov rdi, rax
test r13d, r13d
jne 0x140046f6f
mov dword [rax], r13d
mov eax, dword [rdi]
mov qword [rdi + rax*8 + 8], rbp
inc dword [rdi]
mov rax, qword [0x14025b110]
test rax, rax
je 0x140046f96
mov rdx, qword [rax + 0x38]
test rdx, rdx
je 0x140046f96
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 0x140047065
cmp dword [r15], r14d
jne 0x140046fe0
test rsi, rsi
je 0x140046fce
cmp dword [rsi], r14d
jne 0x140046fe0
test rdi, rdi
je 0x140047065
cmp dword [rdi], r14d
je 0x140047065
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.140172320
mov rbx, rax
test eax, eax
jns 0x14004707b
mov rcx, qword gs:[0x58]
mov r14d, 0x2fe0
add r14, qword [rcx]
mov rcx, qword [r14]
test rcx, rcx
je 0x140047025
mov rax, rcx
jmp 0x140047030
call fcn.140176664
mov rcx, rax
mov rax, qword [r14]
cmp dword [rcx], 0x2726
jne 0x14004704d
test rax, rax
jne 0x140047042
call fcn.140176664
mov dword [rax], 0x2714
xor r14d, r14d
jmp 0x14004707b
test rax, rax
jne 0x140047057
call fcn.140176664
cmp dword [rax], 0x2736
je 0x1400470f4
jmp 0x140047048
call fcn.140041280
mov rcx, rax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SleepEx]
mov ebx, r14d
mov dword [r12], r14d
test ebx, ebx
jle 0x1400470bf
mov rdx, r15
mov rcx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140047097
or dword [r12], 1
mov rdx, rsi
mov rcx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400470ab
or dword [r12], 2
mov rdx, rdi
mov rcx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400470bf
or dword [r12], 4
mov rcx, r15
call fcn.14017668c
test rsi, rsi
je 0x1400470d4
mov rcx, rsi
call fcn.14017668c
test rdi, rdi
je 0x1400470e1
mov rcx, rdi
call fcn.14017668c
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.140045140
int3