Have a look at the demo code on the Microchip site. While that is written for the PIC families of devices, they are in C and the communication between the MCU and the ENC28J60 is via an SPI interface so you can adjust the code to suite the STM32F4.
Susan