title: Decode date and time in a sequence of binary data (coming from LG mobile sms)
body: <p><strong>INTRO</strong></p>
  
  <p>I'm trying to reverse engineer a binary data file containing sms messagges.<br>
  The file is named ems.idx4 and was created with a software named LG PhoneManager around 5 years ago as a backup archive of sms messagges for a LG mobile.<br>
  I don't know which language was used to write LG PhoneManager, but in the binary file I read strings like "CObTree", "CFolder", "CMessage": maybe this clue means nothing, maybe it suggests that Cobol/.net/whatever language was used.<br></p>
  
  <p><strong>PROBLEM</strong></p>
  
  <p>I decoded the entire structure of the binary file, which is quite plain tho.<br>
  The only part I couldn't decode is date and time of single messagges.<br>
  I identified the binary part where date and time are encoded and I got a few decoded examples (thanks to the content of the message).<br>
  Binary data in hex:<br></p>
  
  <pre><code>[0x10] D0 74 C4 FE 3F 42 E3 40 F1 64 [0x7] 2 [0x13] 1 [0x6] 6C [0x2] is 2007/12/25 some time after 23:58 GMT+1
  [0x10] 2B 25 CA 19 2F 43 E3 40 F1 64 [0x7] 2 [0x13] 1 [0x6] 6C [0x2] is 2008/01/02 some time after 10:48 GMT+1
  [0x10] AA C0 2C 6E 35 43 E3 40 F1 64 [0x7] 2 [0x13] 1 [0x6] 6C [0x2] is 2008/01/02 some time after 16:03 GMT+1
  [0x10] EE 04 71 F2 B6 43 E3 40 F1 64 [0x7] 2 [0x13] 1 [0x6] 6C [0x2] is 2008/01/06 some time after 14:31 GMT+1
  [0x10] 60 2C F9 45 4E 4F E3 40 F1 64 [0x7] 2 [0x13] 1 [0x6] 6C [0x2] is 2008/04/08 some time after 10:32 GMT+1
  [0x10] 5D 84 01 14 74 64 E3 40 F1 64 [0x7] 2 [0x13] 1 [0x6] 6C [0x2] is 2008/11/11 some time after 14:53 GMT+1
  </code></pre>
  
  <p>where [0xN] means a sequence of N zeros.</p>
  
  <p>Any idea?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Using this tool: <a href="http://www.digital-detective.co.uk/freetools/decode.asp" rel="nofollow">http://www.digital-detective.co.uk/freetools/decode.asp</a><br>
  I realized it is Windows 64 bit OLE date / time format.<br>
  According to that tool:</p>
  
  <pre><code>D0 74 C4 FE 3F 42 E3 40 means exactly 26/12/2007 00:59
  </code></pre>
  
  <p>Any idea what the math behind this Windows 64 bit OLE date / time format?</p>