Function at 0x401750
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov eax, 0x8124
call fcn.00408c30
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00401b00
test eax, eax
mov dword [esp + 0x10], eax
jne 0x401a6c
lea esi, [ebp + 0x10]
mov ecx, 0x41
lea edi, [esp + 0x30]
mov eax, 0x10624dd3
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x8138]
mov ecx, dword [ebp + 0xc]
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, esi
mov dword [esp + 0x18], edx
mov esi, 0x3e8
cdq
idiv esi
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
lea eax, [esp + 0x18]
shl edx, 3
mov dword [esp + 0x1c], edx
push eax
push 0
lea edx, [esp + 0x38]
push 0
inc ecx
push edx
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x4017e4
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
add esp, 0x8124
ret 4
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x30]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
or esi, 0xffffffff
test eax, eax
je 0x401898
push str.Event_on_Cmd_listen_socket_n
call fcn.004083a9
mov ecx, dword [ebp + 4]
add esp, 4
lea edx, [esp + 0x14]
lea eax, [esp + 0x20]
push edx
push eax
push ecx
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
test edi, edi
jg 0x40184b
push str.Accept_failed_on_nw_cmd_sock_n
call fcn.004083a9
add esp, 4
mov eax, 5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8124
ret 4
cmp dword [ebp + 8], esi
je 0x401888
push str.Warning:Previous_COnnect_Closed__We_only_keep_the_Last_one_n
call fcn.004083a9
mov edx, dword [ebp + 8]
add esp, 4
push 0
push edx
call dword [sym.imp.WS2_32.dll_shutdown]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp + 8], edi
pop edi
pop esi
pop ebp
mov eax, 0xf
pop ebx
add esp, 0x8124
ret 4
push str.CMD_socket_Get_one_Client_n
mov dword [ebp + 8], edi
call fcn.004083a9
add esp, 4
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x401a68
lea ecx, [esp + 0x30]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401a68
mov ecx, 0x2000
xor eax, eax
lea edi, [esp + 0x134]
push eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
lea edx, [esp + 0x138]
push 0x8000
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
push ebx
push str.Event_on_Cmd_Client_socket_len___d__n
call fcn.004083a9
add esp, 8
test ebx, ebx
jge 0x401911
push str.ERROR:Read_Cmd_socket_n
call fcn.004083a9
add esp, 4
mov eax, 9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8124
ret 4
jne 0x40193e
push str.CMD_Client_socket_closed_n
call fcn.004083a9
mov ecx, dword [ebp + 8]
add esp, 4
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x10]
mov dword [ebp + 8], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8124
ret 4
push 4
lea edx, [esp + 0x138]
push str.HEAD
push edx
call fcn.00408bf0
add esp, 0xc
test eax, eax
jne 0x4019de
mov edi, str.HEAD
mov ecx, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
push eax
lea eax, [esp + ecx + 0x13c]
push eax
call fcn.00408bca
mov edx, eax
mov edi, str.HEAD
mov ecx, esi
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, 0xfffffff5
sub eax, ecx
mov edi, str.HEAD
add edx, eax
mov ecx, esi
xor eax, eax
mov dword [ebp + 0x120], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.HEAD
sub ebx, ecx
mov ecx, esi
add ebx, 0xfffffff5
mov dword [ebp + 0x124], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, dword [ebp + 0x11c]
lea esi, [esp + ecx + 0x13f]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x401a09
mov edi, dword [ebp + 0x124]
mov eax, dword [ebp + 0x11c]
mov ecx, ebx
add edi, eax
mov eax, ecx
lea esi, [esp + 0x134]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp + 0x124], ebx
mov eax, dword [ebp + 0x124]
mov ecx, dword [ebp + 0x120]
cmp ecx, eax
jg 0x401a68
mov ecx, dword [ebp + 0x11c]
mov byte [eax + ecx], 0
mov edx, dword [ebp + 0x11c]
push edx
push str.RunCmd
push str._s:_s
push str.HandleNetEvent
call fcn.004025c0
mov eax, dword [ebp + 0x124]
mov ecx, dword [ebp + 0x11c]
add esp, 0x10
push eax
push ecx
mov ecx, ebp
call fcn.00401b90
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [ebp + 0x124], eax
mov dword [ebp + 0x120], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8124
ret 4