http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6582.20090617.LlI87/iPhone2,1_3.0_7A341_Restore.ipsw
vfdecrypt key is
7D779FED28961506CA9443DE210224F211790192B2A2308B8BC0E7D4A2CA61A68E26200E
The command is
curl -O http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-6582.20090617.LlI87/iPhone2,1_3.0_7A341_Restore.ipsw
unzip iPhone2,1_3.0_7A341_Restore.ipsw 018-5302-002.dmg
vfdecrypt -i 018-5302-002.dmg -o 3gs.dmg -k 7D779FED28961506CA9443DE210224F211790192B2A2308B8BC0E7D4A2CA61A68E26200E