Function at 0x1401a1930
Capabilities:
Get socket status
Receive data
Receive data on socket
Resolve dns
Set socket configuration

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x8a8]
sub rsp, 0x980
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140479080]
xor rax, rsp
mov qword [rbp + 0x870], rax
mov rsi, rcx
xor r12d, r12d
lea r13d, [r12 + 2]
cmp qword [rcx + 0x20], r12
jne 0x1401a1a58
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x6c], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x7c], xmm1
mov dword [rbp - 0x74], r12d
mov dword [rsp + 0x64], reloc.WS2_32.dll_socket
mov dword [rsp + 0x60], 0x801
mov dword [rsp + 0x68], 1
mov dword [rsp + 0x44], r12d
mov dword [rsp + 0x40], r12d
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x44]
call fcn.1401945a0
mov eax, dword [rsp + 0x64]
cmp dword [rsp + 0x44], 6
cmovb eax, r13d
mov dword [rsp + 0x64], eax
movzx edx, word [rsi + 0x18]
lea rcx, [rbp - 0x60]
call fcn.1401699f0
cmp qword [rax + 0x18], 0x10
jb 0x1401a19f3
mov rax, qword [rax]
lea r9, [rsi + 0x20]
lea r8, [rsp + 0x60]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
lea rcx, [rbp - 0x60]
call fcn.14000b5d0
test ebx, ebx
je 0x1401a1a58
mov dword [rsi + 0x2c], 0xc7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsi + 0x30], eax
mov al, 1
mov rcx, qword [rbp + 0x870]
xor rcx, rsp
call fcn.14023ed20
lea r11, [rsp + 0x980]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
cmp dword [rsi + 0x28], 0xffffffff
jne 0x1401a1ba4
mov rax, qword [rsi + 0x20]
mov r8d, dword [rax + 0xc]
mov edx, dword [rax + 8]
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, rax
mov dword [rsi + 0x28], ecx
cmp eax, 0xffffffff
jne 0x1401a1a8a
mov dword [rsi + 0x2c], 0xd1
jmp 0x1401a1a1d
mov rax, qword [rsi + 0x20]
cmp dword [rax + 4], 0x17
jne 0x1401a1abb
mov dword [rsp + 0x40], r12d
movsxd rcx, ecx
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x40]
mov edx, 0x29
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [rsi + 0x28]
mov dword [rsp + 0x40], 1
movsxd rcx, ecx
lea r8, [rsp + 0x40]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [rsp + 0x44], r12d
movsxd rcx, dword [rsi + 0x28]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x44]
mov edx, 0xffff
mov r8d, 0x80
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x40], 1
movsxd rcx, dword [rsi + 0x28]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x40], 1
movsxd rcx, dword [rsi + 0x28]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x40]
mov edx, 6
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rdx, qword [rsi + 0x20]
movsxd rcx, dword [rsi + 0x28]
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x1401a1b87
mov dword [rsi + 0x2c], 0xf6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsi + 0x30], eax
mov rcx, rsi
call fcn.1401a2380
jmp 0x1401a1a26
movsxd rcx, dword [rsi + 0x28]
mov edx, 0x80
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x1401a1ba4
mov dword [rsi + 0x2c], 0xfc
jmp 0x1401a1b71
movsxd r14, dword [rsi + 0x28]
mov qword [rbp + 0x48], r14
mov dword [rbp + 0x40], 1
mov dword [rbp + 0x250], r12d
mov rax, qword [rsi + 0x38]
mov rbx, qword [rax]
cmp rbx, rax
je 0x1401a1dbc
nop word [rax + rax]
mov rcx, qword [rbx + 0x28]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
test al, al
jne 0x1401a1cc4
mov edx, r12d
mov ecx, dword [rbp + 0x40]
test ecx, ecx
je 0x1401a1bff
movsxd r8, dword [rbx + 0x20]
mov eax, edx
cmp qword [rbp + rax*8 + 0x48], r8
je 0x1401a1bff
inc edx
cmp edx, ecx
jb 0x1401a1bf0
cmp edx, ecx
jne 0x1401a1c16
cmp ecx, 0x40
jae 0x1401a1c16
movsxd rcx, dword [rbx + 0x20]
mov eax, edx
mov qword [rbp + rax*8 + 0x48], rcx
inc dword [rbp + 0x40]
mov rax, qword [rbx + 0x28]
cmp qword [rax + 0x1060], r12
je 0x1401a1c63
mov edx, r12d
mov ecx, dword [rbp + 0x250]
test ecx, ecx
je 0x1401a1c46
movsxd r8, dword [rbx + 0x20]
mov eax, edx
cmp qword [rbp + rax*8 + 0x258], r8
je 0x1401a1c46
inc edx
cmp edx, ecx
jb 0x1401a1c34
cmp edx, ecx
jne 0x1401a1c63
cmp ecx, 0x40
jae 0x1401a1c63
movsxd rcx, dword [rbx + 0x20]
mov eax, edx
mov qword [rbp + rax*8 + 0x258], rcx
inc dword [rbp + 0x250]
mov eax, dword [rbx + 0x20]
cmp eax, r14d
cmovle eax, r14d
mov r14d, eax
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], r12b
je 0x1401a1c9f
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], r12b
jne 0x1401a1c97
cmp rbx, qword [rax + 0x10]
jne 0x1401a1c97
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r12b
je 0x1401a1c84
mov rbx, rax
jmp 0x1401a1db2
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], r12b
jne 0x1401a1db2
nop
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x1401a1cb0
jmp 0x1401a1db2
mov rdi, qword [rbx + 0x28]
movsxd rax, dword [rdi + 0x30]
cmp eax, 0xffffffff
je 0x1401a1cf2
mov rcx, rax
mov edx, r13d
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rcx, dword [rdi + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rdi + 0x30], 0xffffffff
mov rdi, qword [rbx + 0x28]
test rdi, rdi
je 0x1401a1d04
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
mov rdx, rbx
mov r8, qword [rbx + 0x10]
movzx r9d, byte [r8 + 0x19]
test r9b, r9b
je 0x1401a1d38
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], r12b
jne 0x1401a1d33
nop
cmp rbx, qword [rax + 0x10]
jne 0x1401a1d33
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r12b
je 0x1401a1d20
mov rbx, rax
jmp 0x1401a1d5f
mov rbx, r8
mov rcx, qword [r8]
cmp byte [rcx + 0x19], r12b
jne 0x1401a1d5f
nop dword [rax]
nop dword [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x1401a1d50
mov rax, rdx
test r9b, r9b
je 0x1401a1d86
mov rcx, qword [rdx + 8]
cmp byte [rcx + 0x19], r12b
jne 0x1401a1d9c
cmp rax, qword [rcx + 0x10]
jne 0x1401a1d9c
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], r12b
je 0x1401a1d71
jmp 0x1401a1d9c
mov rcx, qword [r8]
cmp byte [rcx + 0x19], r12b
jne 0x1401a1d9c
nop
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x1401a1d90
lea rcx, [rsi + 0x38]
call fcn.14000be40
mov edx, gethostbyaddr
mov rcx, rax
call fcn.14023ed44
cmp rbx, qword [rsi + 0x38]
jne 0x1401a1bd0
mov qword [rsp + 0x58], r12
lea ecx, [r14 + 1]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rbp + 0x250]
lea rdx, [rbp + 0x40]
call qword [sym.imp.WS2_32.dll_select]
mov r14d, eax
cmp eax, 0xffffffff
jne 0x1401a1df7
mov dword [rsi + 0x2c], 0x122
jmp 0x1401a1b71
test r14d, r14d
jle 0x1401a1a26
movsxd rcx, dword [rsi + 0x28]
lea rdx, [rbp + 0x40]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1401a1f71
mov dword [rsp + 0x40], 0x80
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp - 0x40]
call fcn.14025e440
movsxd rcx, dword [rsi + 0x28]
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_accept]
mov dword [rsp + 0x44], eax
cmp eax, 0xffffffff
jne 0x1401a1e57
mov dword [rsi + 0x2c], 0x133
jmp 0x1401a1b71
mov dword [rsp + 0x48], 1
movsxd rcx, eax
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x48]
mov edx, 6
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
mov r9d, 0x401
lea r8, [rbp + 0x460]
mov edx, dword [rsp + 0x40]
lea rcx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_getnameinfo]
lea rax, [rbp - 0x60]
mov qword [rbp - 0x68], rax
mov rdi, qword [rsi + 8]
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x48], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x60], r12b
lea rax, [rbp + 0x460]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r12b
jne 0x1401a1ed2
lea rdx, [rbp + 0x460]
lea rcx, [rbp - 0x60]
call fcn.14000b830
nop
mov rcx, qword [rsi + 0x38]
mov rbx, rcx
mov rax, qword [rcx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a1f22
mov edx, dword [rsp + 0x44]
cmp dword [rax + 0x20], edx
jge 0x1401a1f0c
mov rax, qword [rax + 0x10]
jmp 0x1401a1f12
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x1401a1f01
cmp rbx, rcx
je 0x1401a1f22
cmp edx, dword [rbx + 0x20]
jge 0x1401a1f5d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x50], rax
lea r8, [rsp + 0x50]
lea rcx, [rsi + 0x38]
call fcn.1401a2580
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rsp + 0x50]
lea rcx, [rsi + 0x38]
call fcn.1401a25b0
mov rbx, qword [rsp + 0x50]
mov edx, dword [rsp + 0x44]
mov rax, qword [rdi]
lea r8, [rbp - 0x60]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
mov qword [rbx + 0x28], rax
dec r14d
mov rax, qword [rsi + 0x38]
mov rbx, qword [rax]
cmp rbx, rax
je 0x1401a2379
test r14d, r14d
je 0x1401a21bc
movsxd rcx, dword [rbx + 0x20]
lea rdx, [rbp + 0x40]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1401a2164
mov rdi, qword [rbx + 0x28]
movsxd rcx, dword [rdi + 0x30]
xor r9d, r9d
mov r8d, 0xfff
lea rdx, [rdi + 0x34]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1401a2016
cmp eax, 0xffffffff
je 0x1401a1ff5
movsxd r8, eax
cmp r8, 0xfff
ja 0x1401a1ff5
mov byte [rdi + r8 + 0x34], 0
mov rax, qword [rdi]
lea rdx, [rdi + 0x34]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x1401a210a
mov rcx, rdi
call fcn.1401a1830
jmp 0x1401a203c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1401a210a
mov dword [rdi + 0x28], 0x50
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x2c], eax
movsxd rax, dword [rdi + 0x30]
cmp eax, 0xffffffff
je 0x1401a203c
mov edx, r13d
mov rcx, rax
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rcx, dword [rdi + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rdi + 0x30], 0xffffffff
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1401a204f
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rdx, rbx
mov r8, qword [rbx + 0x10]
movzx r9d, byte [r8 + 0x19]
test r9b, r9b
je 0x1401a2088
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a2083
nop word [rax + rax]
cmp rbx, qword [rax + 0x10]
jne 0x1401a2083
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401a2070
mov rbx, rax
jmp 0x1401a20af
mov rbx, r8
mov rcx, qword [r8]
cmp byte [rcx + 0x19], 0
jne 0x1401a20af
nop dword [rax]
nop dword [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a20a0
mov rax, rdx
test r9b, r9b
je 0x1401a20d6
mov rcx, qword [rdx + 8]
cmp byte [rcx + 0x19], 0
jne 0x1401a20ec
cmp rax, qword [rcx + 0x10]
jne 0x1401a20ec
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], 0
je 0x1401a20c1
jmp 0x1401a20ec
mov rcx, qword [r8]
cmp byte [rcx + 0x19], 0
jne 0x1401a20ec
nop
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a20e0
lea rcx, [rsi + 0x38]
call fcn.14000be40
mov edx, gethostbyaddr
mov rcx, rax
call fcn.14023ed44
dec r14d
jmp 0x1401a21af
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x1401a213b
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a2133
nop
cmp rbx, qword [rax + 0x10]
jne 0x1401a2133
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401a2120
mov rbx, rax
dec r14d
jmp 0x1401a21af
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x1401a215f
nop word [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a2150
dec r14d
jmp 0x1401a21af
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x1401a2190
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a218b
cmp rbx, qword [rax + 0x10]
jne 0x1401a218b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401a2178
mov rbx, rax
jmp 0x1401a21af
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x1401a21af
nop dword [rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a21a0
mov rax, qword [rsi + 0x38]
cmp rbx, rax
jne 0x1401a1f81
mov rbx, qword [rax]
cmp rbx, rax
je 0x1401a2379
nop dword [rax + rax]
test r14d, r14d
je 0x1401a2379
movsxd rcx, dword [rbx + 0x20]
lea rdx, [rbp + 0x250]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1401a2324
mov rcx, qword [rbx + 0x28]
call fcn.1401a16a0
test al, al
je 0x1401a22ca
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1401a2216
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rdx, rbx
mov r8, qword [rbx + 0x10]
movzx r9d, byte [r8 + 0x19]
test r9b, r9b
je 0x1401a2249
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a2244
cmp rbx, qword [rax + 0x10]
jne 0x1401a2244
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401a2231
mov rbx, rax
jmp 0x1401a226f
mov rbx, r8
mov rcx, qword [r8]
cmp byte [rcx + 0x19], 0
jne 0x1401a226f
nop word [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a2260
mov rax, rdx
test r9b, r9b
je 0x1401a2296
mov rcx, qword [rdx + 8]
cmp byte [rcx + 0x19], 0
jne 0x1401a22ac
cmp rax, qword [rcx + 0x10]
jne 0x1401a22ac
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], 0
je 0x1401a2281
jmp 0x1401a22ac
mov rcx, qword [r8]
cmp byte [rcx + 0x19], 0
jne 0x1401a22ac
nop
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a22a0
lea rcx, [rsi + 0x38]
call fcn.14000be40
mov edx, gethostbyaddr
mov rcx, rax
call fcn.14023ed44
dec r14d
jmp 0x1401a236f
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x1401a22fb
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a22f3
nop
cmp rbx, qword [rax + 0x10]
jne 0x1401a22f3
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401a22e0
mov rbx, rax
dec r14d
jmp 0x1401a236f
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x1401a231f
nop word [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a2310
dec r14d
jmp 0x1401a236f
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x1401a2350
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1401a234b
cmp rbx, qword [rax + 0x10]
jne 0x1401a234b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1401a2338
mov rbx, rax
jmp 0x1401a236f
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x1401a236f
nop dword [rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1401a2360
cmp rbx, qword [rsi + 0x38]
jne 0x1401a21d0
xor al, al
jmp 0x1401a1a28