Function at 0x4090d0
Capabilities:
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x688
mov r12d, edx
mov edx, 0x10624dd3
mov qword [rsp + 0x6d0], rcx
mov rcx, qword [rcx]
mov eax, r12d
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x260], 0
imul edx
mov eax, r12d
mov dword [rsp + 0x470], 0
sar eax, 0x1f
sar edx, 6
sub edx, eax
mov eax, r12d
mov dword [rsp + 0x48], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
lea rdx, [rsp + 0x48]
test r12d, r12d
mov dword [rsp + 0x4c], eax
mov eax, 0
cmovns rax, rdx
test rcx, rcx
mov qword [rsp + 0x30], rax
je 0x4094c8
mov byte [rsp + 0x3f], 0
xor r15d, r15d
xor r11d, r11d
xor ebp, ebp
mov byte [rsp + 0x3e], 0
lea rbx, [rsp + 0x470]
mov dword [rsp + 0x38], 0
lea rsi, [rsp + 0x50]
mov byte [rsp + 0x3d], 0
lea rdi, [rsp + 0x260]
and byte [rcx + 0xd2], 0xfc
test word [rcx + 0xd0], 0x2008
jne 0x409287
mov rdx, qword [rcx + 0x38]
cmp rdx, 0xffffffffffffffff
je 0x409287
movzx r14d, byte [rcx + 0xd0]
movzx r10d, byte [rcx + 0xd1]
mov r13d, r14d
and r13d, 0x20
and r10d, 0x40
je 0x4091f0
test r13b, r13b
jne 0x4091f0
cmp qword [rcx + 0x78], 0
je 0x409287
test r14b, r14b
js 0x409287
nop word [rax + rax]
test r11d, r11d
je 0x40950e
cmp rdx, qword [rsp + 0x478]
je 0x409233
lea r8d, [r11 - 1]
mov eax, 1
add r8, 1
jmp 0x40921c
add rax, 1
cmp qword [rbx + rax*8], rdx
je 0x409233
cmp r8, rax
mov r9d, eax
jne 0x409212
cmp r11d, 0x3f
ja 0x409233
cmp r9d, r11d
je 0x409422
test r10b, r10b
je 0x4093b0
test r13b, r13b
jne 0x40924d
cmp qword [rcx + 0x78], 0
je 0x409280
test r14b, r14b
js 0x409280
test r15d, r15d
je 0x40951c
cmp rdx, qword [rsp + 0x268]
je 0x409280
lea r8d, [r15 - 1]
mov eax, 1
add r8, 1
cmp r8, rax
je 0x409440
add rax, 1
cmp qword [rdi + rax*8], rdx
jne 0x40926d
cmp rbp, rdx
cmovb rbp, rdx
mov rcx, qword [rcx]
test rcx, rcx
jne 0x409190
cmp byte [rsp + 0x3d], 0
je 0x4092a2
mov dword [rsp + 0x470], r11d
cmp byte [rsp + 0x3e], 0
jne 0x40945f
cmp byte [rsp + 0x3f], 0
jne 0x40954d
mov rax, qword [rsp + 0x30]
lea ecx, [rbp + 1]
mov r9, rbx
mov r8, rdi
mov rdx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x4094a0
mov rax, qword [rsp + 0x6d0]
lea rbp, str.socket_error
mov r12, qword [rax]
test r12, r12
jne 0x40937f
jmp 0x409488
mov rdx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x409470
mov rcx, qword [r12 + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x40938e
mov rdx, rsi
call sub.WS2_32.dll___WSAFDIsSet
mov rcx, qword [r12 + 0x38]
test eax, eax
movzx eax, byte [r12 + 0xd2]
setne dl
and eax, 0xfffffffe
or eax, edx
cmp rcx, 0xffffffffffffffff
mov byte [r12 + 0xd2], al
je 0x40955a
mov rdx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
movzx eax, byte [r12 + 0xd2]
setne dl
add edx, edx
and eax, 0xfffffffd
or eax, edx
mov byte [r12 + 0xd2], al
mov r12, qword [r12]
test r12, r12
je 0x409488
mov rcx, qword [r12 + 0x38]
cmp rcx, 0xffffffffffffffff
jne 0x409300
movzx eax, byte [r12 + 0xd2]
xor edx, edx
and eax, 0xfffffffe
mov byte [r12 + 0xd2], al
jmp 0x409363
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x40953d
cmp qword [rsp + 0x58], rdx
je 0x40923c
lea r8d, [rax - 1]
mov eax, 1
add r8, 1
jmp 0x4093ee
add rax, 1
cmp qword [rsi + rax*8], rdx
je 0x40923c
cmp rax, r8
mov r9d, eax
jne 0x4093e0
mov eax, dword [rsp + 0x38]
cmp eax, 0x3f
ja 0x40923c
cmp eax, r9d
jne 0x40923c
add eax, 1
mov dword [rsp + 0x38], eax
mov qword [rsp + r9*8 + 0x58], rdx
mov byte [rsp + 0x3e], 1
jmp 0x40923c
add r11d, 1
mov qword [rsp + r9*8 + 0x478], rdx
mov byte [rsp + 0x3d], 1
jmp 0x409233
cmp r15d, eax
jne 0x409280
cmp r15d, 0x3f
ja 0x409280
lea eax, [r15 + 1]
mov r15d, r8d
jmp 0x409521
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x50], eax
jmp 0x4092ad
mov rcx, r12
mov rdx, rbp
call fcn.00409070
mov r12, qword [r12]
test r12, r12
jne 0x40937f
add rsp, 0x688
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test rbp, rbp
je 0x409503
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x260], 0
mov dword [rsp + 0x470], 0
jmp 0x4092dc
mov rax, qword [rsp + 0x30]
lea rsi, [rsp + 0x50]
mov ecx, 1
lea rbx, [rsp + 0x470]
mov rdx, rsi
lea rdi, [rsp + 0x260]
mov r9, rbx
mov r8, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x4092dc
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4094a5
xor r9d, r9d
mov r11d, 1
jmp 0x409426
mov eax, 1
cmp rbp, rdx
mov qword [rsp + r15*8 + 0x268], rdx
mov r15d, eax
cmovb rbp, rdx
mov byte [rsp + 0x3f], 1
jmp 0x409287
xor r9d, r9d
mov dword [rsp + 0x38], 1
jmp 0x409413
mov dword [rsp + 0x260], r15d
jmp 0x4092b8
xor edx, edx
jmp 0x409363