Function at 0x415c95
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 [.tv_sec], 0
mov dword [ebp - 0x10], 0
jmp 0x415ea3
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 0x415e9f
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 0x415e9f
mov dword [ebp - 0x18], 0
jmp 0x415d46
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 0x415d51
add dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x12c]
cmp dword [ebp - 0x18], eax
jb 0x415d23
mov eax, dword [ebp - 0x12c]
cmp dword [ebp - 0x18], eax
jne 0x415d93
mov eax, dword [ebp - 0x12c]
cmp eax, 0x3f
ja 0x415d93
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 0x415e22
mov dword [ebp - 0x1c], 0
jmp 0x415dd5
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 0x415de0
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x1c], eax
jb 0x415db2
mov eax, dword [ebp - 0x230]
cmp dword [ebp - 0x1c], eax
jne 0x415e22
mov eax, dword [ebp - 0x230]
cmp eax, 0x3f
ja 0x415e22
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 0x415e4e
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 0x415e59
add dword [ebp - 0x20], 1
mov eax, dword [.tv_sec]
cmp dword [ebp - 0x20], eax
jb 0x415e2b
mov eax, dword [.tv_sec]
cmp dword [ebp - 0x20], eax
jne 0x415e9b
mov eax, dword [.tv_sec]
cmp eax, 0x3f
ja 0x415e9b
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 [.tv_sec]
add eax, 1
mov dword [.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 0x415ce5
cmp dword [ebp - 0x14], 0
jne 0x415ecb
mov dword [esp], 0x64
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
jmp 0x415f0c
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, [.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 0x415f1e
mov dword [esp], str.select_group:_couldnt_select__
call dbg.nbdie
mov dword [ebp - 0x10], 0
jmp 0x41610d
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 0x416109
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 0x416109
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 0x415fd6
mov eax, dword [ebp - 0x340]
test eax, eax
je 0x416109
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 0x416109
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 0x416075
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 0x41605e
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 0x416109
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 0x416109
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 0x4160f7
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 0x416109
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 0x415f2a
cmp dword [ebp - 0xc], 0
jne 0x41618b
cmp dword [ebp + 0xc], 0
js 0x41641c
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 0x416177
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x416177
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 0x41641c
mov dword [ebp - 0x10], 0
jmp 0x41640d
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 0x416216
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 0x416216
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 0x416204
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 0x416216
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 0x4162f5
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 0x4162f5
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 0x4162df
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 0x416409
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, [.tv_sec]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x416409
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 0x4163e1
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 0x416409
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 0x416197
nop
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret