Function at 0x416989
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x360
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], 0x186a0
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x230], 0
mov dword [select_timeout.tv_sec], 0
mov dword [ebp - 0x10], 0
jmp 0x416b97
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x416b93
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 8]
cmp eax, 3
je 0x416b93
mov dword [ebp - 0x18], 0
jmp 0x416a3a
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + eax*4 - 0x128]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov eax, dword [eax]
cmp edx, eax
je 0x416a45
add dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x12c]
cmp dword [ebp - 0x18], eax
jb 0x416a17
mov eax, dword [ebp - 0x12c]
cmp dword [ebp - 0x18], eax
jne 0x416a87
mov eax, dword [ebp - 0x12c]
cmp eax, 0x3f
ja 0x416a87
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x128], edx
mov eax, dword [ebp - 0x12c]
add eax, 1
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x416b16
mov dword [ebp - 0x1c], 0
jmp 0x416ac9
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp + eax*4 - 0x22c]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov eax, dword [eax]
cmp edx, eax
je 0x416ad4
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x1c], eax
jb 0x416aa6
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x1c], eax
jne 0x416b16
mov eax, dword [ebp - 0x230]
cmp eax, 0x3f
ja 0x416b16
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp + eax*4 - 0x22c], edx
mov eax, dword [ebp - 0x230]
add eax, 1
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x20], 0
jmp 0x416b42
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + eax*4 - 0x330]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
mov eax, dword [eax]
cmp edx, eax
je 0x416b4d
add dword [ebp - 0x20], 1
mov eax, dword [select_timeout.tv_sec]
cmp dword [ebp - 0x20], eax
jb 0x416b1f
mov eax, dword [select_timeout.tv_sec]
cmp dword [ebp - 0x20], eax
jne 0x416b8f
mov eax, dword [select_timeout.tv_sec]
cmp eax, 0x3f
ja 0x416b8f
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp + eax*4 - 0x330], edx
mov eax, dword [select_timeout.tv_sec]
add eax, 1
mov dword [select_timeout.tv_sec], eax
add dword [ebp - 0x14], 1
add dword [ebp - 0x10], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp dword [ebp - 0x10], eax
jb 0x4169d9
cmp dword [ebp - 0x14], 0
jne 0x416bbf
mov dword [esp], 0x64
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
jmp 0x416c00
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
lea edx, [eax + 1]
lea eax, [ebp - 0x33c]
mov dword [esp + 0x10], eax
lea eax, [select_timeout.tv_sec]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x230]
mov dword [esp + 8], eax
lea eax, [ebp - 0x12c]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.WS2_32.dll_select]
call eax
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x416c12
mov dword [esp], str.select_group:_couldnt_select__
call dbg.nbdie
mov dword [ebp - 0x10], 0
jmp 0x416e01
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x416dfd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 8]
cmp eax, 3
jne 0x416dfd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], 0
lea edx, [ebp - 0x340]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
call eax
sub esp, 0x18
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x416cca
mov eax, dword [ebp - 0x340]
test eax, eax
je 0x416dfd
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.handle_incoming_data
jmp 0x416dfd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x6d
jne 0x416d69
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x416d52
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add edx, ecx
mov edx, dword [edx]
mov edx, dword [edx + 0x34]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x28]
mov dword [esp + 4], edx
mov edx, dword [ebp + 8]
mov dword [esp], edx
call eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_handle_response
jmp 0x416dfd
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_group_remove_and_close_socket
jmp 0x416dfd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x416deb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov ebx, dword [eax + 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov esi, dword [eax + 0x34]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp], eax
call dbg.getlastsocketerror
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_handle_response
jmp 0x416dfd
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_group_remove_and_close_socket
add dword [ebp - 0x10], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp dword [ebp - 0x10], eax
jb 0x416c1e
cmp dword [ebp - 0xc], 0
jne 0x416e7f
cmp dword [ebp + 0xc], 0
js 0x417110
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov esi, dword [ebp + 0xc]
mov edx, 0
div esi
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
add eax, 0x64
mov esi, dword [ebp + 0xc]
mov edx, 0
div esi
cmp ecx, eax
je 0x416e6b
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x416e6b
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x18]
mov dword [esp + 4], edx
mov edx, dword [ebp + 8]
mov dword [esp], edx
call eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
lea edx, [eax + 0x64]
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], edx
jmp 0x417110
mov dword [ebp - 0x10], 0
jmp 0x417101
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x416f0a
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, eax
lea eax, [ebp - 0x12c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x416f0a
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 8]
cmp eax, 2
jne 0x416ef8
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.handle_incoming_connection
jmp 0x416f0a
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.handle_incoming_data
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x416fe9
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, eax
lea eax, [ebp - 0x230]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x416fe9
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x416fd3
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add edx, ecx
mov edx, dword [edx]
mov ecx, dword [edx + 0x34]
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ebx, dword [ebp - 0x10]
shl ebx, 2
add edx, ebx
mov edx, dword [edx]
mov edx, dword [edx]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov edx, dword [ebp + 8]
mov dword [esp], edx
call eax
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add edx, ecx
mov edx, dword [edx]
mov edx, dword [edx]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_handle_response
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov dword [eax + 0x2c], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x4170fd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, eax
lea eax, [select_timeout.tv_sec]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x4170fd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4170d5
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov ebx, dword [eax + 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov esi, dword [eax + 0x34]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp], eax
call dbg.getlastsocketerror
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add edx, ecx
mov edx, dword [edx]
mov edx, dword [edx]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call ebx
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov ecx, dword [ebp - 0x10]
shl ecx, 2
add edx, ecx
mov edx, dword [edx]
mov edx, dword [edx]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_handle_response
jmp 0x4170fd
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
shl edx, 2
add eax, edx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 8], 2
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.select_handle_response
add dword [ebp - 0x10], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp dword [ebp - 0x10], eax
jb 0x416e8b
nop
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret