Function at 0x14005e170
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3e0]
sub rsp, 0x4e0
mov rax, qword [0x140293420]
xor rax, rsp
mov qword [rbp + 0x3d0], rax
mov r14, rdx
mov rbx, rcx
test rcx, rcx
je case.default.0x14005e1ee
cmp dword [rcx + 0x2b84], 0
je 0x14005e8c1
mov eax, dword [rcx + 0x68]
cmp eax, 8
je 0x14005e8c1
dec eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
cmp eax, 5
ja case.default.0x14005e1ee
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x5eabc]
add rcx, rdx
jmp rcx
xor edx, edx
lea rcx, [rbp - 0x4d]
mov r8d, 0xfe
call sub.VCRUNTIME140.dll_memset
cmp qword [rbx + 0x58], 0
mov word [rbp - 0x50], 0x105
je 0x14005e219
cmp qword [rbx + 0x60], 0
je 0x14005e219
mov al, 2
jmp 0x14005e21b
xor al, al
mov r14, qword [rbx + 8]
lea rdi, [rbx + 0x24]
mov byte [rbp - 0x4e], al
xor esi, esi
lea rax, [rbp - 0x50]
mov ecx, 3
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rcx
test rdi, rdi
je 0x14005e270
movzx ecx, word [rdi + 0x10]
xorps xmm0, xmm0
mov eax, reloc.WS2_32.dll_socket
mov dword [rbp - 0x64], esi
movdqu xmmword [rbp - 0x74], xmm0
mov word [rbp - 0x78], ax
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rdi]
mov word [rbp - 0x76], ax
movzx eax, word [rdi + 0x12]
movups xmmword [rbp - 0x70], xmm0
mov dword [rbp - 0x60], eax
mov qword [rsp + 0x40], rsi
lea r9, [rsp + 0x64]
mov qword [rsp + 0x38], rsi
mov rax, rdi
neg rax
mov r8d, 1
lea rax, [rbp - 0x78]
mov rcx, r14
sbb edx, edx
and edx, 0x1c
mov dword [rsp + 0x30], edx
test rdi, rdi
lea rdx, [rsp + 0x50]
cmove rax, rsi
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], esi
call qword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x14005e2cc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb ecx, ecx
jmp 0x14005e2d0
mov ecx, dword [rsp + 0x64]
test ecx, ecx
jle case.default.0x14005e1ee
mov dword [rbx + 0x68], 2
jmp case.default.0x14005e1ee
mov rcx, qword [rbx + 8]
lea rax, [rsp + 0x60]
xor esi, esi
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x40], rsi
lea rdi, [rbx + 0x24]
mov qword [rsp + 0x38], rsi
lea rdx, [rbp - 0x80]
test rdi, rdi
mov word [rsp + 0x60], si
lea rax, [rbp - 0x78]
mov qword [rsp + 0x50], 2
cmove rdx, rsi
mov dword [rbp - 0x80], Ordinal_32
mov qword [rsp + 0x30], rdx
lea r9, [rsp + 0x68]
cmove rax, rsi
mov dword [rsp + 0x64], esi
mov qword [rsp + 0x28], rax
lea r8d, [rsi + 1]
lea rax, [rsp + 0x64]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
je 0x14005e783
test dword [rsp + 0x64], 0x8000
jne case.default.0x14005e1ee
test rdi, rdi
je 0x14005e38b
movups xmm0, xmmword [rbp - 0x70]
movzx ecx, word [rbp - 0x76]
movups xmmword [rdi], xmm0
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rdi + 0x10], ax
movzx eax, word [rbp - 0x60]
mov word [rdi + 0x12], ax
cmp dword [rsp + 0x68], esi
jle case.default.0x14005e1ee
cmp byte [rsp + 0x60], 5
jne 0x14005e8b5
movzx edx, byte [rsp + 0x61]
test dl, 0xfd
jne 0x14005e8b5
cmp dl, 2
mov eax, 5
mov ecx, 3
cmove eax, ecx
mov dword [rbx + 0x68], eax
xor eax, eax
mov rcx, qword [rbp + 0x3d0]
xor rcx, rsp
call fcn.1401e4560
mov rbx, qword [rsp + 0x530]
add rsp, 0x4e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor edx, edx
lea rcx, [rbp - 0x4e]
mov r8d, 0x1ff
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rbx + 0x58]
mov rdx, 0xffffffffffffffff
mov rax, rdx
mov byte [rbp - 0x50], 1
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x14005e410
lea r8, [rbp - 0x4e]
mov byte [rbp - 0x4f], al
sub r8, rcx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [r8 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14005e430
mov rcx, qword [rbx + 0x60]
inc rdx
cmp byte [rcx + rdx], 0
jne 0x14005e443
movzx eax, byte [rbp - 0x4f]
lea r8, [rbp - 0x4d]
mov byte [rbp + rax - 0x4e], dl
movzx eax, byte [rbp - 0x4f]
add r8, rax
nop
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [r8], al
lea r8, [r8 + 1]
test al, al
jne 0x14005e460
mov r14, qword [rbx + 8]
lea rax, [rbp - 0x50]
mov qword [rsp + 0x58], rax
lea rdi, [rbx + 0x24]
movzx eax, byte [rbp - 0x4f]
xor esi, esi
add rax, 3
movzx ecx, dl
add rcx, rax
mov qword [rsp + 0x50], rcx
test rdi, rdi
je 0x14005e4cd
movzx ecx, word [rdi + 0x10]
xorps xmm0, xmm0
mov eax, reloc.WS2_32.dll_socket
mov dword [rbp - 0x64], esi
movdqu xmmword [rbp - 0x74], xmm0
mov word [rbp - 0x78], ax
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rdi]
mov word [rbp - 0x76], ax
movzx eax, word [rdi + 0x12]
movups xmmword [rbp - 0x70], xmm0
mov dword [rbp - 0x60], eax
mov qword [rsp + 0x40], rsi
lea r9, [rsp + 0x68]
mov qword [rsp + 0x38], rsi
mov rax, rdi
neg rax
mov r8d, 1
lea rax, [rbp - 0x78]
mov rcx, r14
sbb edx, edx
and edx, 0x1c
mov dword [rsp + 0x30], edx
test rdi, rdi
lea rdx, [rsp + 0x50]
cmove rax, rsi
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], esi
call qword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x14005e529
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb ecx, ecx
jmp 0x14005e52d
mov ecx, dword [rsp + 0x68]
test ecx, ecx
jle case.default.0x14005e1ee
mov dword [rbx + 0x68], 4
jmp case.default.0x14005e1ee
mov rcx, qword [rbx + 8]
lea rax, [rsp + 0x60]
xor esi, esi
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x40], rsi
lea rdi, [rbx + 0x24]
mov qword [rsp + 0x38], rsi
lea rdx, [rsp + 0x68]
test rdi, rdi
mov word [rsp + 0x60], si
lea rax, [rbp - 0x78]
mov qword [rsp + 0x50], 2
cmove rdx, rsi
mov dword [rsp + 0x68], Ordinal_32
mov qword [rsp + 0x30], rdx
lea r9, [rbp - 0x80]
cmove rax, rsi
mov dword [rsp + 0x64], esi
mov qword [rsp + 0x28], rax
lea r8d, [rsi + 1]
lea rax, [rsp + 0x64]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
je 0x14005e783
test dword [rsp + 0x64], 0x8000
jne case.default.0x14005e1ee
test rdi, rdi
je 0x14005e5ed
movups xmm0, xmmword [rbp - 0x70]
movzx ecx, word [rbp - 0x76]
movups xmmword [rdi], xmm0
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rdi + 0x10], ax
movzx eax, word [rbp - 0x60]
mov word [rdi + 0x12], ax
cmp dword [rbp - 0x80], esi
jle case.default.0x14005e1ee
cmp byte [rsp + 0x60], 1
jne 0x14005e8b5
cmp byte [rsp + 0x61], sil
jne 0x14005e8b5
mov eax, 5
jmp 0x14005e3ba
mov rcx, qword [rbx + 0x48]
mov word [rsp + 0x71], 3
mov byte [rsp + 0x70], 5
mov byte [rsp + 0x73], 1
call qword [sym.imp.WS2_32.dll_inet_addr]
mov r14, qword [rbx + 8]
lea rdi, [rbx + 0x24]
mov dword [rsp + 0x74], eax
xor esi, esi
movzx eax, word [rbx + 0x50]
mov word [rsp + 0x78], ax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], 0xa
test rdi, rdi
je 0x14005e690
movzx ecx, word [rdi + 0x10]
xorps xmm0, xmm0
mov eax, reloc.WS2_32.dll_socket
mov dword [rbp - 0x64], esi
movdqu xmmword [rbp - 0x74], xmm0
mov word [rbp - 0x78], ax
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rdi]
mov word [rbp - 0x76], ax
movzx eax, word [rdi + 0x12]
movups xmmword [rbp - 0x70], xmm0
mov dword [rbp - 0x60], eax
mov qword [rsp + 0x40], rsi
lea r9, [rsp + 0x68]
mov qword [rsp + 0x38], rsi
mov rax, rdi
neg rax
mov r8d, 1
lea rax, [rbp - 0x78]
mov rcx, r14
sbb edx, edx
and edx, 0x1c
mov dword [rsp + 0x30], edx
test rdi, rdi
lea rdx, [rsp + 0x50]
cmove rax, rsi
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], esi
call qword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x14005e6ec
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb ecx, ecx
jmp 0x14005e6f0
mov ecx, dword [rsp + 0x68]
test ecx, ecx
jle case.default.0x14005e1ee
mov dword [rbx + 0x68], 6
jmp case.default.0x14005e1ee
mov rcx, qword [rbx + 8]
lea rdi, [rbx + 0x24]
xor eax, eax
mov qword [rsp + 0x50], 0xa
xor esi, esi
mov qword [rsp + 0x70], rax
mov word [rsp + 0x78], ax
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x58], rax
lea r9, [rbp - 0x80]
mov qword [rsp + 0x38], rsi
lea rax, [rbp - 0x78]
test rdi, rdi
mov dword [rsp + 0x68], Ordinal_32
lea r8d, [rsi + 1]
mov dword [rsp + 0x64], esi
cmove rdx, rsi
cmove rax, rsi
mov qword [rsp + 0x30], rdx
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x64]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
jne 0x14005e78e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp case.default.0x14005e1ee
test dword [rsp + 0x64], 0x8000
jne case.default.0x14005e1ee
test rdi, rdi
je 0x14005e7be
movups xmm0, xmmword [rbp - 0x70]
movzx ecx, word [rbp - 0x76]
movups xmmword [rdi], xmm0
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rdi + 0x10], ax
movzx eax, word [rbp - 0x60]
mov word [rdi + 0x12], ax
cmp dword [rbp - 0x80], esi
jle case.default.0x14005e1ee
cmp byte [rsp + 0x70], 5
jne 0x14005e8b5
cmp byte [rsp + 0x71], sil
jne 0x14005e8b5
cmp byte [rsp + 0x73], 1
jne 0x14005e8b5
mov eax, dword [rsp + 0x74]
test eax, eax
jne 0x14005e7fd
movups xmm0, xmmword [0x140275350]
movups xmmword [rbx + 0x10], xmm0
jmp 0x14005e83e
cmp eax, 0xffffffff
jne 0x14005e80f
movups xmm0, xmmword [0x140275370]
movups xmmword [rbx + 0x10], xmm0
jmp 0x14005e83e
movzx ecx, byte [rsp + 0x74]
movups xmm0, xmmword [0x140275360]
movups xmmword [rbx + 0x10], xmm0
mov byte [rbx + 0x1c], cl
mov ecx, eax
shr ecx, 8
mov byte [rbx + 0x1d], cl
mov ecx, eax
shr ecx, 0x10
shr eax, 0x18
mov byte [rbx + 0x1f], al
mov word [rbx + 0x1a], 0xffff
mov byte [rbx + 0x1e], cl
movzx ecx, word [rsp + 0x78]
call qword [sym.imp.WS2_32.dll_htons]
mov rdx, qword [rbx + 0x88]
mov word [rbx + 0x20], ax
imul rax, qword [rbx + 0x90], 0x208
add rax, rdx
cmp rdx, rax
jae 0x14005e8a9
lea rcx, [rdx + 0x22]
nop dword [rax + rax]
movups xmm0, xmmword [rbx + 0x10]
add rdx, 0x208
lea rcx, [rcx + 0x208]
movups xmmword [rcx - 0x208], xmm0
mov eax, dword [rbx + 0x20]
mov dword [rcx - 0x1f8], eax
imul rax, qword [rbx + 0x90], 0x208
add rax, qword [rbx + 0x88]
cmp rdx, rax
jb 0x14005e870
mov dword [rbx + 0x68], 8
jmp case.default.0x14005e1ee
mov dword [rbx + 0x68], 7
jmp case.default.0x14005e1ee
xor esi, esi
lea r15d, [rsi + 1]
test r14, r14
je 0x14005e8ed
mov dword [rdx], esi
mov qword [rdx + 8], rsi
mov qword [rdx + 0x18], rsi
call fcn.14005b390
cmp eax, 0xffffffff
je 0x14005eab0
cmp eax, r15d
je 0x14005eaa8
call fcn.140060530
mov r12d, eax
mov dword [rbx + 0xa0], eax
mov ecx, dword [rbx + 0xa0]
movabs rdi, 0x624dd2f1a9fbe77
mov edx, dword [rbx + 0x74]
mov eax, ecx
sub eax, edx
sub edx, ecx
cmp eax, 0x5265c00
cmovb edx, eax
cmp edx, 0x3e8
jb 0x14005e92c
mov rcx, rbx
call fcn.140060120
mov r8d, r15d
mov rdx, r14
mov rcx, rbx
call fcn.14005db70
cmp eax, 0xffffffff
je 0x14005eab0
cmp eax, r15d
je 0x14005eaa8
mov rdx, r14
mov rcx, rbx
call fcn.14005ce80
cmp eax, 0xffffffff
je 0x14005eab0
cmp eax, r15d
je 0x14005eaa8
mov r8d, r15d
mov rdx, r14
mov rcx, rbx
call fcn.14005db70
cmp eax, 0xffffffff
je 0x14005eab0
cmp eax, r15d
je 0x14005eaa8
test r14, r14
je 0x14005e9ab
mov rdx, r14
mov rcx, rbx
call fcn.14005b390
cmp eax, 0xffffffff
je 0x14005eab0
cmp eax, r15d
je 0x14005eaa8
mov eax, dword [rbx + 0xa0]
sub eax, r12d
cmp eax, 0x5265c00
jb case.default.0x14005e1ee
call fcn.140060530
mov edx, eax
mov dword [rbx + 0xa0], eax
sub edx, r12d
cmp edx, 0x5265c00
jb case.default.0x14005e1ee
mov r13, qword [rbx]
lea r8, [rbp + 0x1c0]
mov ecx, r12d
mov dword [rbp + 0x1c0], esi
sub ecx, eax
mov qword [rbp - 0x48], r13
cmp ecx, 0x5265c00
mov dword [rbp - 0x50], r15d
mov rax, rdi
cmovb edx, ecx
xor r9d, r9d
mov ecx, edx
mul rcx
mov eax, ecx
sub rax, rdx
shr rax, 1
add rax, rdx
lea rdx, [rbp - 0x50]
shr rax, 9
mov dword [rsp + 0x68], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
lea ecx, [r13 + 1]
mov dword [rsp + 0x6c], eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x14005eab0
je 0x14005ea98
lea rdx, [rbp + 0x1c0]
mov rcx, r13
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov edi, esi
lea rdx, [rbp - 0x50]
test eax, eax
mov rcx, r13
cmovne edi, r15d
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
mov eax, 2
cmovne edi, eax
call fcn.140060530
mov dword [rbx + 0xa0], eax
test dil, 2
je case.default.0x14005e1ee
jmp 0x14005e8fb
call fcn.140060530
mov dword [rbx + 0xa0], eax
jmp case.default.0x14005e1ee
mov eax, r15d
jmp 0x14005e3bf
mov rax, 0xffffffffffffffff
jmp 0x14005e3bf