Since the category_id is passed as a variable, so you can use following code in list.phtml file for getting the current category id.
$current_catid=$this->getCategoryId(); // this will give your current category id
We can pass variable while instantiating any block class, as each block class is a derived class of Varien_Object and In the Varien_Object class constructor , every variable that is passed in the constructor, is set as the class property. For further reference please look at lib/Varian/Varian_Object class.