Function at 0x18001a9d4
Capabilities:
Get socket status
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x738
mov qword [rsp + 0x48], 0xffffffffffffffff
mov rax, qword [0x1800557b8]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x5c], 0x64
cmp qword [rsp + 0x30], 0
je 0x18001af30
mov rax, qword [rsp + 0x30]
cmp dword [rax + 4], 2
je 0x18001aa36
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x30], rax
jmp 0x18001aa0f
mov rax, qword [rsp + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x4e0], 0
mov dword [rsp + 0x2d0], 0
mov dword [rsp + 0xc0], 0
mov dword [rsp + 0x3c], 0
jmp 0x18001aa7c
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x4e0]
cmp dword [rsp + 0x3c], eax
jae 0x18001aaa4
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
cmp qword [rsp + rax*8 + 0x4e8], rcx
jne 0x18001aaa2
jmp 0x18001aaa4
jmp 0x18001aa72
mov eax, dword [rsp + 0x4e0]
cmp dword [rsp + 0x3c], eax
jne 0x18001aae0
cmp dword [rsp + 0x4e0], 0x40
jae 0x18001aae0
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rsp + rax*8 + 0x4e8], rcx
mov eax, dword [rsp + 0x4e0]
inc eax
mov dword [rsp + 0x4e0], eax
xor eax, eax
test eax, eax
jne 0x18001aa68
mov dword [rsp + 0x40], 0
jmp 0x18001aafa
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x40], eax
jae 0x18001ab22
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
cmp qword [rsp + rax*8 + 0x2d8], rcx
jne 0x18001ab20
jmp 0x18001ab22
jmp 0x18001aaf0
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x40], eax
jne 0x18001ab5e
cmp dword [rsp + 0x2d0], 0x40
jae 0x18001ab5e
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rsp + rax*8 + 0x2d8], rcx
mov eax, dword [rsp + 0x2d0]
inc eax
mov dword [rsp + 0x2d0], eax
xor eax, eax
test eax, eax
jne 0x18001aae6
mov dword [rsp + 0x44], 0
jmp 0x18001ab78
mov eax, dword [rsp + 0x44]
inc eax
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x44], eax
jae 0x18001aba0
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
cmp qword [rsp + rax*8 + 0xc8], rcx
jne 0x18001ab9e
jmp 0x18001aba0
jmp 0x18001ab6e
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x44], eax
jne 0x18001abdc
cmp dword [rsp + 0xc0], 0x40
jae 0x18001abdc
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rsp + rax*8 + 0xc8], rcx
mov eax, dword [rsp + 0xc0]
inc eax
mov dword [rsp + 0xc0], eax
xor eax, eax
test eax, eax
jne 0x18001ab64
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x2d0]
lea r8, [rsp + 0x4e0]
lea rdx, [rsp + 0xc0]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov rax, qword [rsp + 0x30]
cmp dword [rax + 0x10], 2
jne 0x18001ad26
lea rdx, [rsp + 0xc0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18001ad21
mov dword [rsp + 0x50], 1
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x50]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x18001ad11
call fcn.18001a94c
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 0x2bf20
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
call fcn.180019fa4
mov edx, 0x80
lea rcx, [rsp + 0x60]
call fcn.18000fb74
mov edx, dword [rsp + 0x38]
lea rcx, [rsp + 0x60]
call fcn.18000fbac
mov rax, qword [rsp + 0x30]
mov edx, dword [rax + 0x14]
lea rcx, [rsp + 0x60]
call fcn.18000fbac
lea rcx, [rsp + 0x60]
call fcn.18000fbe0
mov dword [rsp + 0x54], eax
lea rcx, [rsp + 0x60]
call fcn.18000fd98
mov r8d, reloc.WS2_32.dll_socket
mov ecx, dword [rsp + 0x54]
mov edx, ecx
mov rcx, rax
call qword [rsp + 0x750]
lea rcx, [rsp + 0x60]
call fcn.18000fb38
jmp 0x18001ad21
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x18001af30
jmp 0x18001af1d
mov rax, qword [rsp + 0x30]
cmp dword [rax + 0x10], 3
jne 0x18001adb8
lea rdx, [rsp + 0xc0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18001adb3
xor r8d, r8d
xor edx, edx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x6f0]
call fcn.1800192c4
lea rcx, [rsp + 0x80]
mov rdi, rcx
mov rsi, rax
mov ecx, 0x40
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x14]
or eax, 0x110000
mov r8, qword [rsp + 0x750]
mov edx, eax
lea rcx, [rsp + 0x80]
call fcn.18001878c
jmp 0x18001af1d
lea rdx, [rsp + 0x2d0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18001adfa
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 0
mov r8d, 4
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
jmp 0x18001af1d
lea rdx, [rsp + 0x4e0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18001ae3c
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 1
mov r8d, 6
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
jmp 0x18001af1d
lea rdx, [rsp + 0xc0]
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x20]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x18001aee2
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x48], rax
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_accept]
mov rcx, qword [rsp + 0x30]
mov qword [rcx + 0x20], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax + 0x20], 0xffffffffffffffff
jne 0x18001aeb2
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 0
mov r8d, 4
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
jmp 0x18001aed5
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 1
mov r8d, 6
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x18001af1d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [rsp + 0x30]
sub eax, dword [rcx + 0x18]
mov rcx, qword [rsp + 0x30]
cmp eax, dword [rcx + 8]
jbe 0x18001af1d
mov rax, qword [rsp + 0x30]
mov dword [rax + 4], 0
mov r8d, 4
mov edx, 4
lea rcx, [rsp + 0x38]
call qword [rsp + 0x750]
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x30], rax
jmp 0x18001aa0f
add rsp, 0x738
pop rdi
pop rsi
ret