Believe it may be bad timing chain tensioner. Appears to affect vehicles with 3.3 V6 & 3.8 Azera. These are the Technical Service Bullitans (TSB) regarding this issue;
Date Announced: OCTOBER 01 2006
NHTSA ID #10021137
Summary: 3.3L & 3.8L TIMING CHAIN TENSIONER - PART UPDATE.
Date Announced: DECEMBER 01 2010
NHTSA ID #10038212
Summary: HYUNDAI: A REVISED PROCEDURE FOR REPLACING THE TIMING CHAIN TENSIONERS. *RM
Tensioner is supposed to maintain tensioner position but would slip and allow the tension to decrease when the engine was off. Repositioning the tensioner is done with engine oil, so the cam chain would "slap around" until oil pressure built up again.
Old tensioner is manufactured from plastic and replacement is manufactured from metal.
TSB instructed dealers not to replace the tensioners unless the timing chain rattled for an incredible 90 seconds at start up !!
A whining noise may indicate bad idler pulley.
This is a known issue and many have had dealer replace free of charge, even after over warranty time / mileage.
Here's link to posting of Hyundai-forum member who replaced timing tensioner himself;
Can sign up for TSB information here;