Calculating Z value in a tx with 1 input and 2 outputs
Seems to me that it is not correct

Sorry, I do not have a tool rigth now, and creating data manually is a little bit difficult and I may create errors also See update below

There should be something like this

01000000
01
e3dbc4fada0034ad8581cb429af4953d7d092b137ebd9e193344db376314ab65 00000000
1976a914 f65d5c02866b8cea5840b2f9fb739f2e6ee6c8f4 88ac
ffffffff
02
1004df0200000000 1976a914 7e7fe35e49f0e8a920780c00d40b7171d8808119 88ac
c05f3b0400000000 1976a914 942920e041353162b0d8bd006d09c2ca25cdc278 88ac
00000000
01000000


Update: Here is a piece of my checking code. 

const QByteArray xx ( QByteArray::fromHex ( "01000000"
"01"
"e3dbc4fada0034ad8581cb429af4953d7d092b137ebd9e193344db376314ab65 00000000"
"1976a914 f65d5c02866b8cea5840b2f9fb739f2e6ee6c8f4 88ac"
"ffffffff"
"02"
"1004df0200000000 1976a914 7e7fe35e49f0e8a920780c00d40b7171d8808119 88ac"
"c05f3b0400000000 1976a914 942920e041353162b0d8bd006d09c2ca25cdc278 88ac"
"00000000"
"01000000" ) );
const MyKey32 digest ( xx.constData ( ), xx.size ( ) ); // construct object of sha256 (sha256 ( xx ) )
_trace ( digest.toStringRev ( ) );                      // print result
const QByteArray pubkey ( QByteArray::fromHex ( "036a6d9c781613b2f07607b240e019fb2344704258e63df4802a436302942e73d3" ) );
const QByteArray signature ( QByteArray::fromHex ( "30450221008f1bcf2624da3b423ca19eb9eb6c8fb84e6614cd603cbf9f2f1d8c7103534138022038190065341fd3cd4a697ee1ca02f5b1f1131a5268ba9df5d976e782a5edc379" ) );
_trace ( QString ( "verify=%1" ).arg ( digest.verify ( pubkey, signature ) ) );


and the result is

"f71aa6b6127ce9229d9607c0ee133d8195f91b14fe7d554ef8a6a40d99338426"
"verify=1"