title: What kind of int storage is this?
body: <p>We have an Firebird database for a (very crappy) application, and the app's front end, but nothing in between (i.e. no source code).</p>
  
  <p>There is a field in the database that is stored as <code>-2086008209</code> but in the front-end represents as <code>63997</code>.</p>
  
  <p>Examples:</p>
  
  <pre>
  Database    Front-End
   758038959  44093
  1532056691  61409
    28401112  65866
  -712038758  40712
   936488434  43872
  -688079579  48567
  1796491935  39437
  1178382500  30006
  1419373703  66069
  1996421588  48454
   890825339  46313
  -820234748  45206
  </pre>
  
  <p>What kind of storage is this? The aim for us here is to access the application's back-end data and bypass the front-end GUI alltogether, so I need to know how to decode this field in order to get appropriate values from it. It is stored as a <code>int</code> in FireBird (I don't know if FireBird has signed/unsigned ints, but this is showing as signed when we select it).</p>
  
  <hr>
  
  <p>This is the definition of the field:</p>
  
  <p><img src="https://i.stack.imgur.com/0k4oC.png" alt="enter image description here"></p>
  
  <p>It is not, as far as I can tell, de-normalised. The generator <code>GEN_CONTACTS_ID</code> has <code>66241</code> against it, which at a glance looks accurate.</p>