Function at 0x407ed0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x41dc
call fcn.00449f80
push ebx
mov ebx, ecx
cmp dword [ebx + 8], 1
jne 0x407eef
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [ebp - 0xc], edx
mov ecx, 0x3e8
cdq
idiv ecx
xor ecx, ecx
mov dword [ebp - 0x1d8], ecx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
mov eax, dword [ebx + 0x134]
shl edx, 3
cmp eax, 0xffffffff
mov dword [ebp - 8], edx
je 0x407f43
mov ecx, 1
mov dword [ebp - 0x1d4], eax
mov dword [ebp - 0x1d8], ecx
mov eax, dword [ebx + 4]
push esi
test eax, eax
push edi
jne 0x407fc3
mov eax, dword [ebx + 0x12c]
mov esi, dword [ebx + 0x128]
sub eax, esi
mov dword [ebp + 8], 0
sar eax, 2
je 0x407fc3
mov edi, esi
mov esi, dword [edi]
cmp esi, 0xffffffff
je 0x407fa4
xor eax, eax
test ecx, ecx
jbe 0x407f87
lea edx, [ebp - 0x1d4]
cmp dword [edx], esi
je 0x407f87
inc eax
add edx, 4
cmp eax, ecx
jb 0x407f7b
cmp eax, ecx
jne 0x407fa4
cmp ecx, 0x6e
jae 0x407fa4
mov dword [ebp + eax*4 - 0x1d4], esi
mov ecx, dword [ebp - 0x1d8]
inc ecx
mov dword [ebp - 0x1d8], ecx
mov edx, dword [ebx + 0x12c]
mov esi, dword [ebx + 0x128]
mov eax, dword [ebp + 8]
sub edx, esi
inc eax
add edi, 4
sar edx, 2
cmp eax, edx
mov dword [ebp + 8], eax
jb 0x407f68
lea eax, [ebp - 0xc]
lea ecx, [ebp - 0x1d8]
push eax
push 0
push 0
push ecx
push 0x6e
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x40824c
mov eax, dword [ebx + 4]
test eax, eax
jne 0x408211
mov eax, dword [ebx + 0x134]
lea edx, [ebp - 0x1d8]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4080af
xor ecx, ecx
lea edx, [ebp + 8]
mov dword [ebp - 0x1c], ecx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
push edx
mov dword [ebp - 0x14], ecx
push eax
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebx + 0x134]
push ecx
mov dword [ebp + 8], 0x10
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4080af
mov edx, dword [ebx + 0x12c]
mov esi, dword [ebx + 0x130]
lea ecx, [ebx + 0x128]
cmp edx, esi
je 0x40805c
test edx, edx
je 0x408056
mov dword [edx], eax
add dword [ecx + 4], 4
jmp 0x408066
lea eax, [ebp - 4]
push eax
push edx
call fcn.004094d0
mov edi, dword [ebx + 0x13c]
mov ecx, dword [ebx + 0x140]
lea eax, [ebx + 0x138]
cmp edi, ecx
mov dword [ebp - 0x1dc], 0
je 0x4080a0
test edi, edi
je 0x408097
mov ecx, 0x1001
lea esi, [ebp - 0x41dc]
rep movsd dword es:[edi], dword [esi]
add dword [eax + 4], 0x4004
jmp 0x4080af
lea ecx, [ebp - 0x41dc]
push ecx
push edi
mov ecx, eax
call fcn.004099f0
mov edi, dword [ebx + 0x12c]
mov edx, dword [ebx + 0x128]
sub edi, edx
sar edi, 2
dec edi
mov dword [ebp - 4], edi
js 0x40824c
mov eax, edi
shl eax, 0xc
add eax, edi
shl eax, 2
mov dword [ebp + 8], eax
mov eax, dword [ebx + 0x128]
lea esi, [edi*4]
mov ecx, dword [esi + eax]
cmp ecx, 0xffffffff
je 0x4081ee
lea edx, [ebp - 0x1d8]
mov eax, ecx
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4081ee
mov eax, dword [ebx + 0x128]
mov ecx, dword [ebx + 0x138]
mov edx, dword [esi + eax]
mov eax, dword [ebp + 8]
add eax, ecx
push edx
push eax
mov ecx, ebx
call fcn.00408260
test al, al
je 0x408135
push edi
mov ecx, ebx
call fcn.004082f0
jmp 0x4081ee
mov ecx, dword [ebx + 0x128]
mov edx, dword [esi + ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebx + 0x128]
mov dword [esi + eax], 0xffffffff
mov eax, dword [ebx + 0x10]
cmp edi, eax
jl 0x4081ee
mov edx, dword [ebx + 0x128]
mov eax, dword [ebx + 0x12c]
add esi, edx
lea edx, [esi + 4]
cmp edx, eax
je 0x408188
sub eax, edx
mov ecx, esi
sar eax, 2
test eax, eax
jle 0x408188
mov edx, dword [ecx + 4]
mov dword [ecx], edx
add ecx, 4
dec eax
jne 0x40817d
mov ecx, dword [ebx + 0x12c]
add ecx, 0xfffffffc
mov dword [ebx + 0x12c], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 0x138]
add ecx, eax
mov eax, dword [ebx + 0x13c]
lea edx, [ecx + 0x4004]
cmp edx, eax
je 0x4081e4
sub eax, edx
mov edi, ecx
mov ecx, eax
mov eax, 0xfff001
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
test edx, edx
jle 0x4081e1
lea eax, [edi + 0x4004]
mov ecx, 0x1001
mov esi, eax
dec edx
rep movsd dword es:[edi], dword [esi]
mov edi, eax
jne 0x4081cd
mov edi, dword [ebp - 4]
add dword [ebx + 0x13c], 0xffffbffc
mov ecx, dword [ebp + 8]
dec edi
sub ecx, 0x4004
mov dword [ebp - 4], edi
test edi, edi
mov dword [ebp + 8], ecx
jge 0x4080d7
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebx + 0x134]
mov eax, dword [ebx + 0x138]
push ecx
push eax
mov ecx, ebx
call fcn.00408260
test al, al
je 0x40823e
push 0
mov ecx, ebx
call fcn.004082f0
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x14]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x10]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4