How does the C code relates to hex output in terms of pins assignment for ATmega16
As explained in the datasheet, output is performed by setting the bit position(s) in DDRx and changing the bits in PORTx to the desired value. As given in the datasheet, DDRB is register 0x17, DDRC is 0x14, PORTB is 0x18, and PORTC is 0x15. Using that information along with the AVR instruction set manual and a disassembly of the compiled .elf file will help you find which bytes to change to what values.