============================================================================ == ICQNEWDB.TXT -- version 0.19 (04/19/2000) == == Discusses the format of ICQ 99a's NewDB files (uin.DAT and uin.IDX), == with some mention of ICQ 99b's DB99b files. == Managed by: Derek Soeder == == Feel free to use the information in this document as you wish, but == please give credit to the appropriate contributors (listed at the end == of this document). If you choose to redistribute this document, you == must do so for free, with the exception of compensation for any == reasonable expenses, and this notice and the credits must remain intact. == == The information contained in this document was gathered through == observation of the uin.DAT and uin.IDX files ("database files") for == ICQ 99x, and may be incorrect. Use it at your own risk. == == This document is in no way sponsored, supported, or condoned by == ICQ Inc., Mirabilis, or AOL. ICQ is Copyright (C) 1999, ICQ Inc. ============================================================================ > OVERVIEW As of ICQ 99a, all event, user, and contact information is stored in the ICQ\NewDB\ directory, in the user's uin.DAT file. uin.IDX is essentially a linked list that points to the entries in uin.DAT. I have not currently found any form of encryption to be used in either file. ICQ 99b databases have an almost identical format (all known variations are labeled in this document). Its uin.DAT and uin.IDX files reside in the ICQ\Db99b\ directory. > NOTES For the file formats below, an offset, a data type, and a description is given for each known piece of data. Following variable-length data (for instance, an ASCIIZ string), offsets will be prefixed by a "+", meaning the offset is relative to the next byte after the variable-length data. In the instance that another variable-length piece of data follows the first, the offset will reset back to "+00000000". Offsets within individual DAT/IDX entries are relative to the start of the entry, and begin with 0 corresponding to the start of the entry. All offsets in the "offset" column are in hexadecimal. The data types used below correspond to C++ data types. For example, a CHAR is a signed BYTE (a BYTE is considered unsigned), and a WORD is an unsigned SHORT (a SHORT is considered a signed 2-byte integer). ICQ seems to use LONGs (4-byte signed integers) rather than DWORDs (unsigned LONG) based on the frequent occurrence of FFFFFFFEh (-2), although I have not been able to ascertain whether the 2-byte integers used are signed or unsigned. By default, all short integers will be referred to as WORDs. ICQ uses file offset pointers (referred to below as "pointers"), rather than "array indices", to point to uin.IDX and uin.DAT entries. A file offset of 0 corresponds to the first byte of the file. Whenever a word is listed as describing the length of a following null- terminated ("ASCIIZ") string, it includes the terminating null in its value. A value of 0 for the length would therefore mean that no string data is present, not even a null. The "separator value" is a 2-byte value that appears frequently throughout the DAT in predictable locations, usually after a variable number of "trash" bytes. The value appears to be consistent throughout a DAT, although it may vary among owners. To correctly read the DAT file for all users, it may be necessary to read an indefinite number of bytes from the file until the separator value is encountered. If you see a number of reserved bytes documented below, immediately followed by a separator value, you may need to employ the technique at that point. > .IDX FILE FORMAT The uin.IDX file begins with a 225-byte header, which is followed by the linked list entries (20 bytes each). Do not assume, however, that all list entries will fall on an offset corresponding to 225+(index*20). Since the IDX pointers are file pointers rather than array indices, it is possible to have entries that do not have 20-byte alignment. offset data type description ----------- ----------- ------------------------------------------------- 00000000 LONG ??? (4) 00000004 LONG ??? (20) 00000008 LONG ??? (8) 0000000C LONG IDX pointer to "root" entry? Apparently, if you start at this "root" entry and walk the chain via the LONG at offset +8 in each following IDX entry, you'll eventually arrive at a complete chain of valid entries (entry status = -2). 00000010 LONG ICQ database version? 10 = ICQ 99a (NewDB) 14 = ICQ 99b (DB99B) 00000014 LONG ??? (201) 00000018 4 LONGs unused??? (0) 00000028 LONG ??? 0000002C LONG ??? (1) 00000030 LONG ??? (20) 00000034 LONG ??? 00000038 LONG ??? 0000003C 10 LONGs unused??? (0) 00000064 125 BYTEs reserved? (FFh) //sometimes contains data? 000000E1 --- start of IDX linked list entries //In case you can't tell, I really don't get most of this header. ================================================================ == Format of IDX linked list entry (20 BYTEs each): ================================================================ offset data type description ----------- ----------- ------------------------------------------------- 00000000 LONG entry status? : -2 = valid IDX entry else = deleted/invalid ? 00000004 LONG DAT entry number: 1..14? = ???a 1005 = My Details 1006 = Address Book? 1014 = Chats event folder? 1015 = Messages event folder? 1025 = Messages event folder? 1050 = ??? 1110 = ICQ Servers List 1101 = plug-in info? 1102 = Objectionable Words List? 2001+ = user events/contact info 00000008 LONG IDX pointer to next entry (-1 = end of chain) 0000000C LONG IDX pointer to previous entry (-1 = none) 00000010 LONG DAT pointer to corresponding DAT entry It seems that ICQ resizes the IDX file as necessary, to provide space for entries in blocks of 1000 (20000 bytes). I'm not sure if this amount is in relation to 20-byte alignment (file size will be 225+(20*entries)), or the alignment of the last entry written. I'm also uncertain what causes this shift in alignment, though I have observed it before. > .DAT FILE FORMAT The uin.DAT file begins with a 213-byte header (I think). The rest of the file contains DAT entries that are pointed to by the linked list in uin.IDX. The generic DAT entry format, as well as the currently known specific formats, are also covered below. offset data type description ----------- ----------- ------------------------------------------------- 00000000 LONG ??? (4) 00000004 LONG ??? (8) 00000008 LONG ??? (201) 0000000C 4 LONGs unused??? (0) 0000001C LONG ??? 00000020 LONG ??? (0) 00000024 LONG ??? (64) 00000028 LONG ??? 0000002C LONG ??? 00000030 10 LONGs unused??? (0) 00000058 LONG ??? (-129) 0000005C 121 BYTEs reserved? (FFh) //sometimes contains data? 000000D5 --- start of DAT entry space //Not much luck with this header, either. All DAT entries seem to begin with a generic header that further specifies the format of the entry. ================================================================ == Format of DAT entry header: ================================================================ offset data type description ----------- ----------- ------------------------------------------------- 00000000 LONG size of following entry data in bytes 00000004 LONG where entry is filed? -1 = not filed? 0 = Messages? 1 = Contact list? 2 = Ignore list? 9 = System Messages? 00000008 LONG DAT entry number (see offset +4 in IDX entry) 0000000C 16 BYTEs valid DAT entry/type signature {##h,23h,A3h,DBh,DFh,B8h,D1h,11h, 8Ah,65h,00h,60h,08h,71h,A3h,91h} First byte (E0h..F1h,F6h) expresses an entry type: E0h = Message / URL Message / Request For Authorization / "Authorization" / System Request / "You Were Added" / Contacts List E1h = Chat Request E2h = File Request E4h = My Details E5h = contact information E6h = Reminder E7h = address book? ECh = Voice Message??? //I have no idea EEh = Note EFh = event folder F1h = servers list / objectionable words list F6h = (new to ICQ 99b???) Whole signature = {0}: ???a 0000001C --- beginning of type-specific DAT entry data offset data type description ----------- ----------- ------------------------------------------------- ================================================================ == Format of ???a data: ================================================================ 00000008 LONG DAT entry number -- denotes a filing category? 0000000C 16 BYTEs signature data = {0} 0000001C LONG DAT entry number duplicated? 00000020 LONG number of following LONGs (excluding first) 00000024 LONG ??? 00000028 n LONGs IDX pointers to entries that link to ???b entries in the DAT file -- the DAT entry numbers of these IDX entries correspond to DAT entries which are filed in this category (n = LONG at ofs 20) ================================================================ == Format of ???b data: == (does not use a typical DAT entry header) ================================================================ 00000000 LONG size of following entry data in bytes 00000004 16 BYTEs unused??? (0) 00000014 LONG DAT pointer to next ???b entry 00000018 LONG ??? 0000001C ?? BYTEs ??? ================================================================ == Format of Message data: ================================================================ 0000000C BYTE first byte of signature = E0h 0000001C WORD //separator value 0000001E LONG filing status flags: bit 0 = filed as 0:Sent, 1:Received bit 1 = in Deleted Items -- 0:no, 1:yes bit 2 = in Messages -- 0:no, 1:yes 00000022 WORD entry type: 0001h = Message 0004h = URL Message 0013h = Contacts List 00000024 LONG UIN of sender/recipient 00000028 WORD length of text 0000002A ASCIIZ text (0001h: message; 0004h -- FEh separates fields: description, URL; 0013h -- FEh terminates fields: number of contacts (ASCII), {ICQ number (ASCII), nickname}, ...) $+00000000 LONG ??? +00000004 LONG 0:received, 1:sent +00000008 WORD //separator value +0000000A LONG timestamp ================================================================ == Format of Chat Request data: ================================================================ 0000000C BYTE first byte of signature = E1h 0000001C WORD //separator value 0000001E LONG filing status flags: bit 0 = filed as 0:Sent, 1:Received bit 2 = in Messages -- 0:no, 1:yes 00000022 WORD entry type: 0002h = Chat Request 00000024 LONG UIN of sender/recipient 00000028 WORD length of reason message 0000002A ASCIIZ reason message for chat $+00000000 LONG ??? +00000004 LONG 0:received, 1:sent +00000008 WORD //separator value +0000000A LONG timestamp ================================================================ == Format of File Request data: ================================================================ 0000000C BYTE first byte of signature = E2h 0000001C WORD //separator value 0000001E LONG filing status flags: bit 0 = filed as 0:Sent, 1:Received bit 2 = ??? (1) 00000022 WORD entry type: 0003h = File Request 00000024 LONG UIN of sender/recipient 00000028 WORD length of file description 0000002A ASCIIZ file description $+00000000 LONG 0:accepted, 1:declined +00000004 LONG 0:received, 1:sent +00000008 WORD //separator value +0000000A LONG timestamp +0000000E ? BYTEs unused??? (0); 5 bytes if sent, 13 if received? $+00000000 LONG ??? (-1) +00000004 WORD ??? +00000006 WORD length of file name +00000008 ASCIIZ file name (may read "n Files" for multiple) $+00000000 LONG size of file (or size of batch if multiple?) +00000004 WORD length of local path (0 if canceled/declined) +00000006 ASCIIZ local path where file was saved $+00000000 8 BYTEs undefined??? ================================================================ == Format of System Message data: ================================================================ 00000004 LONG 9 0000000C BYTE first byte of signature = E0h 0000001C WORD //separator value 0000001E LONG ??? (1) 00000022 WORD Entry type: 0006h = Request For Authorization 0007h = "Authorization" (denied) 0008h = "Authorization" (accepted) 0009h = System Request 000Ch = "You Were Added" 00000024 LONG UIN of sender/recipient 00000028 WORD length of text 0000002A ASCIIZ text (0007h/0008h -- null string; 0006h/0009h/ 000Ch -- FEh separates fields: nickname, first name, last name, e-mail, status (ASCII number), message) values of "status": 0 = ??? 1 = ??? 3 = System Request (from ICQ)? $+00000000 LONG ??? +00000004 LONG 0:received, 1:sent +00000008 WORD //separator value +0000000A LONG timestamp ================================================================ == Format of Reminder data: ================================================================ 0000000C BYTE first byte of signature = E6h 0000001C WORD //separator value 0000001E LONG filing status flags: bit 0 = filed as 0:Sent, 1:Received 00000022 WORD entry type: 0018h = Reminder 00000024 LONG UIN of sender/recipient 00000028 WORD length of text 0000002A ASCIIZ reminder text $+00000000 LONG ??? (0) +00000004 LONG ??? +00000008 WORD //separator value +0000000A LONG timestamp of reminder's creation +0000000E 23 BYTEs unused??? (0) +00000025 WORD ??? +00000027 LONG timestamp of reminder's target time ================================================================ == Format of Note data: ================================================================ 0000000C BYTE first byte of signature = EEh 0000001C WORD //separator value 0000001E WORD ??? (0) 00000020 WORD 0:hidden, 1:visible 00000024 WORD length of text 0000002A ASCIIZ note text $+00000000 LONG status flags: bit 1 = filed in 0:Notes, 1:Deleted Notes +00000004 LONG timestamp +00000008 LONG background color of note window (00BBGGRRh) +0000000C LONG 0:normal Z-order, 1:Always on Top +00000010 LONG top (Y) position of note window, in pixels +00000014 LONG left (X) position of note window, in pixels +00000018 LONG height of note window, in pixels +0000001C LONG width of note window, in pixels +00000020 LONG ??? +00000024 LONG ??? +00000028 LONG font attributes: bit 0 = Bold bit 1 = Italic bit 2 = Underline bit 3 = Strikeout bit 4 = ??? (1) +0000002C LONG font size * 20 (for example: 240 = 12-point font) +00000030 LONG ??? +00000034 LONG font color (00BBGGRRh) +00000038 BYTE ??? (0) +00000039 BYTE maximum length of font name (excludes null) +00000040 ASCIIZ[n] font name (n = maximum length + 1) ================================================================ == Format of Voice Message??? data: ================================================================ 0000000C BYTE first byte of signature = ECh 0000001C WORD //separator value 0000001E LONG UIN of sender/recipient 00000022 16 BYTEs ??? 00000032 LONG ??? (0) 00000036 LONG ??? 0000003A LONG ??? 0000003E 9 BYTEs ??? 00000047 LONG length of WAV file name 0000004B ASCIIZ complete path and file name of ??? WAV file $+00000000 DWORD ??? (0) ================================================================ == Format of ICQ Servers List data: ================================================================ 00000008 LONG DAT entry number = 1100 0000000C BYTE first byte of signature = F1h 0000001C LONG timestamp??? 00000020 LONG number of servers 00000024 --- list of consecutive server entries >> Format of each server entry: 00000000 LONG unused??? (0) 00000004 WORD port 00000006 WORD length of server name 00000008 ASCIIZ server name ================================================================ == Format of Objectionable Words List data: ================================================================ 00000008 LONG DAT entry number = 1102 0000000C BYTE first byte of signature = F1h 0000001C LONG unused??? (0) 00000020 LONG number of objectionable word entries 00000024 --- list of consecutive objectionable word entries >> Format of each objectionable word entry: 00000000 LONG ??? (-1) 00000004 WORD length of objectionable word 00000006 ASCIIZ objectionable word ================================================================ == Format of My Details (NewDB) data: ================================================================ 00000008 LONG DAT entry number = 1005 0000000C BYTE first byte of signature = E4h 0000001C WORD //separator value 0000001E LONG label = 55534552h ('USER') 00000022 LONG user entry status: 6 = "My Details" 00000026 44 BYTEs unused??? (0) 00000052 WORD //separator value 00000054 LONG number of default event WAV entries 00000058 --- list of consecutive default event WAV entries $+00000000 36 BYTEs unused??? (0) +00000024 WORD //separator value +00000026 --- 99a user information for owner of this DAT file $+00000000 WORD length of password +00000002 ASCIIZ user's ICQ password $+00000000 LONG ??? +00000004 14 BYTEs ??? +00000012 WORD length of POP3 account user name +00000014 ASCIIZ POP3 account user name $+00000000 WORD length of POP3 account password +00000002 ASCIIZ POP3 account password $+00000000 WORD length of POP3 server name +00000002 ASCIIZ POP3 server name $+00000000 21 BYTEs ??? +00000015 LONG number of contact groups +00000019 --- list of consecutive contact group entries $+00000000 LONG unused??? (0) +00000004 BYTE ??? +00000005 WORD //separator value +00000007 LONG number of additional user properties +0000000B --- list of consecutive user properties >> Format of each event WAV entry: 00000000 WORD //separator value 00000002 LONG user event for which WAV will be played: 1 = Message 2 = Chat 3 = File 4 = URL 10 = Externals 19 = Contact 20 = Phone 2007 = User ID //not in My Details 2010 = Online Alert 00000006 LONG 0:play default WAV, 1:play the user-specified WAV 0000000A WORD length of file name 0000000C ASCIIZ full path and file name of WAV >> Format of 99a user information: 00000000 WORD //separator value 00000002 LONG number of user properties 00000006 --- list of consecutive user properties $+00000000 WORD length of user name +00000002 ASCIIZ user name (what user is called; usually nickname) $+00000000 WORD length of nickname +00000002 ASCIIZ nickname $+00000000 WORD length of First Name +00000002 ASCIIZ First Name $+00000000 WORD length of Last Name +00000002 ASCIIZ Last Name $+00000000 WORD length of primary e-mail address +00000002 ASCIIZ primary e-mail address $+00000000 LONG UIN of this user +00000004 BYTE authorization -- 0:required to add user, 1:none +00000005 CHAR GMT offset (negative count of half-hours): [...] -2 = GMT +(01:00) -1 = GMT +(00:30) 0 = GMT (00:00) 1 = GMT -(00:30) 2 = GMT -(01:00) [...] +00000006 DWORD current/last IP address (network byte order) +0000000A BYTE gender -- 0:Not Specified, 1:Female, 2:Male +0000000B LONG Home Country: (WINDOWS\SYSTEM\icqmutl.dll) 1 = USA 7 = Russia 20 = Egypt 27 = South Africa 30 = Greece 31 = Netherlands 32 = Belgium 33 = France 34 = Spain 36 = Hungary 39 = Italy 40 = Romania 41 = Switzerland 42 = Czech Republic 43 = Austria 44 = United Kingdom 45 = Denmark 46 = Sweden 47 = Norway 48 = Poland 49 = Germany 51 = Peru 52 = Mexico 53 = Cuba 54 = Argentina 55 = Brazil 56 = Chile 57 = Colombia 58 = Venezuela 60 = Malaysia 61 = Australia 62 = Indonesia 63 = Philippines 64 = New Zealand 65 = Singapore 66 = Thailand 81 = Japan 82 = Korea (Republic of) 84 = Vietnam 86 = China 90 = Turkey 91 = India 92 = Pakistan 93 = Afghanistan 94 = Sri Lanka 95 = Myanmar 98 = Iran 101 = Anguilla 102 = Antigua 103 = Bahamas 104 = Barbados 105 = Bermuda 106 = British Virgin Islands 107 = Canada 108 = Cayman Islands 109 = Dominica 110 = Dominican Republic 111 = Grenada 112 = Jamaica 113 = Montserrat 114 = Nevis 115 = St. Kitts 116 = St. Vincent and the Grenadines 117 = Trinidad and Tobago 118 = Turks and Caicos Islands 120 = Barbuda 121 = Puerto Rico 122 = Saint Lucia 123 = United States Virgin Islands 212 = Morocco 213 = Algeria 216 = Tunisia 218 = Libya 220 = Gambia 221 = Senegal Republic 222 = Mauritania 223 = Mali 224 = Guinea 225 = Ivory Coast 226 = Burkina Faso 227 = Niger 228 = Togo 229 = Benin 230 = Mauritius 231 = Liberia 232 = Sierra Leone 233 = Ghana 234 = Nigeria 235 = Chad 236 = Central African Republic 237 = Cameroon 238 = Cape Verde Islands 239 = Sao Tome and Principe 240 = Equatorial Guinea 241 = Gabon 242 = Congo 243 = Dem. Rep. of the Congo 244 = Angola 245 = Guinea-Bissau 246 = Diego Garcia 247 = Ascension Island 248 = Seychelle Islands 249 = Sudan 250 = Rwanda 251 = Ethiopia 252 = Somalia 253 = Djibouti 254 = Kenya 255 = Tanzania 256 = Uganda 257 = Burundi 258 = Mozambique 260 = Zambia 261 = Madagascar 262 = Reunion Island 263 = Zimbabwe 264 = Namibia 265 = Malawi 266 = Lesotho 267 = Botswana 268 = Swaziland 269 = Mayotte Island 290 = St. Helena 291 = Eritrea 297 = Aruba 298 = Faeroe Islands 299 = Greenland 350 = Gibraltar 351 = Portugal 352 = Luxembourg 353 = Ireland 354 = Iceland 355 = Albania 356 = Malta 357 = Cyprus 358 = Finland 359 = Bulgaria 370 = Lithuania 371 = Latvia 372 = Estonia 373 = Moldova 374 = Armenia 375 = Belarus 376 = Andorra 377 = Monaco 378 = San Marino 379 = Vatican City 380 = Ukraine 381 = Yugoslavia 385 = Croatia 386 = Slovenia 387 = Bosnia and Herzegovina 389 = F.Y.R.O.M. (Former Yugoslav Republic of Macedonia) 500 = Falkland Islands 501 = Belize 502 = Guatemala 503 = El Salvador 504 = Honduras 505 = Nicaragua 506 = Costa Rica 507 = Panama 508 = St. Pierre and Miquelon 509 = Haiti 590 = Guadeloupe 591 = Bolivia 592 = Guyana 593 = Ecuador 594 = French Guiana 595 = Paraguay 596 = Martinique 597 = Suriname 598 = Uruguay 599 = Netherlands Antilles 670 = Saipan Island 671 = Guam 672 = Christmas Island 673 = Brunei 674 = Nauru 675 = Papua New Guinea 676 = Tonga 677 = Solomon Islands 678 = Vanuatu 679 = Fiji Islands 680 = Palau 681 = Wallis and Futuna Islands 682 = Cook Islands 683 = Niue 684 = American Samoa 685 = Western Samoa 686 = Kiribati Republic 687 = New Caledonia 688 = Tuvalu 689 = French Polynesia 690 = Tokelau 691 = Micronesia, Federated States of 692 = Marshall Islands 705 = Kazakhstan 706 = Kyrgyz Republic 708 = Tajikistan 709 = Turkmenistan 711 = Uzbekistan 800 = International Freephone Service 850 = Korea (North) 852 = Hong Kong 853 = Macau 855 = Cambodia 856 = Laos 870 = INMARSAT 871 = INMARSAT (Atlantic-East) 872 = INMARSAT (Pacific) 873 = INMARSAT (Indian) 874 = INMARSAT (Atlantic-West) 880 = Bangladesh 886 = Taiwan, Republic of China 960 = Maldives 961 = Lebanon 962 = Jordan 963 = Syria 964 = Iraq 965 = Kuwait 966 = Saudi Arabia 967 = Yemen 968 = Oman 971 = United Arab Emirates 972 = Israel 973 = Bahrain 974 = Qatar 975 = Bhutan 976 = Mongolia 977 = Nepal 994 = Azerbaijan 995 = Georgia 2691 = Comoros 4101 = Liechtenstein 4201 = Slovak Republic 5399 = Guantanamo Bay 5901 = French Antilles 6101 = Cocos-Keeling Islands 6701 = Rota Island 6702 = Tinian Island 6721 = Australian Antarctic Territory 6722 = Norfolk Island 9999 = Unknown else = (not entered) // ICQ uses 0 +0000000F LONG age of user (-1 = not entered) +00000013 WORD length of Home City text +00000015 ASCIIZ Home City text $+00000000 WORD length of Home State text +00000002 ASCIIZ Home State text $+00000000 WORD length of additional details text +00000002 ASCIIZ additional details text (info specified by user) $+00000000 WORD length of user's Homepage URL +00000002 ASCIIZ user's Homepage URL $+00000000 WORD length of Home Phone number +00000002 ASCIIZ Home Phone number $+00000000 WORD length of notes text +00000002 ASCIIZ notes text (empty in My Details) $+00000000 LONG Home Zip Code (0 = not entered) +00000004 LONG timestamp of last Phonebook update +00000008 LONG unused??? (0) +0000000C LONG number of Phonebook entries +00000010 --- list of consecutive Phonebook entries $+00000000 WORD length of picture file name +00000002 ASCIIZ local path and file name of user's saved picture $+00000000 8 BYTEs unused??? (0) +00000008 WORD //separator value +0000000A LONG timestamp of last My Details update +0000000E WORD length of secondary e-mail address +00000010 ASCIIZ secondary e-mail address $+00000000 WORD length of old e-mail address +00000002 ASCIIZ old e-mail address $+00000000 LONG ??? (0) +00000004 BYTE day of birthdate +00000005 BYTE month of birthdate (1..12 = January..December) +00000006 BYTE year of birthday (0..99 = 1900..1999) //Y2K!!! +00000007 LONG ??? +0000000B LONG ??? +0000000F 3 BYTEs languages spoken: (WINDOWS\SYSTEM\icqmutl.dll) 1 = Arabic 2 = Bhojpuri 3 = Bulgarian 4 = Burmese 5 = Cantonese 6 = Catalan 7 = Chinese 8 = Croatian 9 = Czech 10 = Danish 11 = Dutch 12 = English 13 = Esperanto 14 = Estonian 15 = Farci 16 = Finnish 17 = French 18 = Gaelic 19 = German 20 = Greek 21 = Hebrew 22 = Hindi 23 = Hungarian 24 = Icelandic 25 = Indonesian 26 = Italian 27 = Japanese 28 = Khmer 29 = Korean 30 = Lao 31 = Latvian 32 = Lithuanian 33 = Malay 34 = Norwegian 35 = Polish 36 = Portuguese 37 = Romanian 38 = Russian 39 = Serbo-Croatian 40 = Slovak 41 = Slovenian 42 = Somali 43 = Spanish 44 = Swahili 45 = Swedish 46 = Tagalog 47 = Tatar 48 = Thai 49 = Turkish 50 = Ukrainian 51 = Urdu 52 = Vietnamese 53 = Yiddish 54 = Yoruba 55 = Afrikaans 56 = Bosnian 57 = Persian 58 = Albanian else = (empty) //ICQ uses 0 +00000012 WORD length of Home Street Address +00000014 ASCIIZ Home Street Address $+00000000 WORD length of Home Fax number +00000002 ASCIIZ Home Fax number $+00000000 WORD length of Home Cellular number +00000002 ASCIIZ Home Cellular number $+00000000 LONG ??? (0) +00000004 WORD length of Company Div/Dept +00000006 ASCIIZ Company Div/Dept $+00000000 BYTE Occupation: (ICQ\Defaults\Occupation.dat) 1 = Academic 2 = Administrative 3 = Art/Entertainment 4 = College Student 5 = Computers 6 = Community & Social 7 = Education 8 = Engineering 9 = Financial Services 10 = Government 11 = High School Student 12 = Home 13 = ICQ - Providing Help 14 = Law 15 = Managerial 16 = Manufacturing 17 = Medical/Health else = (empty) //ICQ uses 0 +00000001 LONG ??? (0) +00000005 WORD length of Company Position +00000007 ASCIIZ Company Position $+00000000 WORD length of Company Name +00000002 ASCIIZ Company Name $+00000000 WORD length of Work Street Address +00000002 ASCIIZ Work Street Address $+00000000 WORD length of Work State text +00000002 ASCIIZ Work State text $+00000000 WORD length of Work City text +00000002 ASCIIZ Work City text $+00000000 LONG Work Zip Code (0 = not entered) +00000004 LONG Work Country (see "Home Country" for values) +00000008 WORD length of Work Phone number +0000000A ASCIIZ Work Phone number $+00000000 WORD length of Work Fax number +00000002 ASCIIZ Work Fax number $+00000000 WORD length of Work Homepage URL +00000002 ASCIIZ Work Homepage URL $+00000000 WORD length of Past Background #1 keywords +00000002 ASCIIZ Past Background #1 keywords $+00000000 WORD Past Bkg. #1 category: (ICQ\Defaults\PastBG.dat) 0 = (empty) 300 = Elementary School 301 = High School 302 = College 303 = University 304 = Military 305 = Past Work Place 306 = Past Organization 399 = Other +00000002 WORD length of Past Background #2 keywords +00000004 ASCIIZ Past Background #2 keywords $+00000000 WORD Past Bkg. #2 category (see list for Past Bkg. #1) +00000002 WORD length of Past Background #3 keywords +00000004 ASCIIZ Past Background #3 keywords $+00000000 WORD Past Bkg. #3 category (see list for Past Bkg. #1) +00000002 WORD length of Affiliation #1 keywords +00000004 ASCIIZ Affiliation #1 keywords $+00000000 WORD Affiliation #1 category: (ICQ\Defaults\Group.dat) 0 = (empty) 200 = Alumni Org. 201 = Charity Org. 202 = Club/Social Org. 203 = Community Org. 204 = Cultural Org. 205 = Fan Clubs 206 = Fraternity/Sorority 207 = Hobbyists Org. 208 = International Org. 209 = Nature and Environment Org. 210 = Professional Org. 211 = Scientific/Technical Org. 212 = Self Improvement Group 213 = Spiritual/Religious Org. 214 = Sports Org. 215 = Support Org. 216 = Trade and Business Org. 217 = Union 218 = Volunteer Org. 299 = Other +00000002 WORD length of Affiliation #2 keywords +00000004 ASCIIZ Affiliation #2 keywords $+00000000 WORD Affiliation #2 category (see list for Affil. #1) +00000002 WORD length of Affiliation #3 keywords +00000004 ASCIIZ Affiliation #3 keywords $+00000000 WORD Affiliation #3 category (see list for Affil. #1) +00000002 20 BYTEs unused??? (0) +00000016 WORD length of Interest #1 keywords +00000018 ASCIIZ Interest #1 keywords $+00000000 WORD Interest #1 category: (ICQ\Defaults\Interest.dat) 0 = (empty) 100 = Art 101 = Cars 102 = Celebrity Fans 103 = Collections 104 = Computers 105 = Culture & Literature 106 = Fitness 107 = Games 108 = Hobbies 109 = ICQ - Providing Help 110 = Internet 111 = Lifestyle 112 = Movies/TV 113 = Music 114 = Outdoor Activities 115 = Parenting 116 = Pets/Animals 117 = Religion 118 = Science/Technology 119 = Skills 120 = Sports 121 = Web Design 122 = Nature and Environment 123 = News & Media 124 = Government 125 = Business & Economy 126 = Mystics 127 = Travel 128 = Astronomy 129 = Space 130 = Clothing 131 = Parties 132 = Women 133 = Social science 134 = 60's 135 = 70's 136 = 80's 137 = 50's +00000002 WORD length of Interest #2 keywords +00000004 ASCIIZ Interest #2 keywords $+00000000 WORD Interest #2 category (see list for Interest #1) +00000002 WORD length of Interest #3 keywords +00000004 ASCIIZ Interest #3 keywords $+00000000 WORD Interest #3 category (see list for Interest #1) +00000002 WORD length of Interest #4 keywords +00000004 ASCIIZ Interest #4 keywords $+00000000 WORD Interest #4 category (see list for Interest #1) +00000002 40 BYTES unused??? (0) >> Format of each user property: 00000000 WORD length of property name 00000002 ASCIIZ property name $+00000000 BYTE property value type: 100 = CHAR 101 = BYTE 102 = WORD 103 = INTEGER 104 = DWORD 105 = LONG 107 = WORD (length) + ASCIIZ (string) +00000001 property value >> Format of each Phonebook entry: 00000000 WORD length of phone number entry name 00000002 ASCIIZ phone number entry name $+00000000 WORD length of area code text +00000002 ASCIIZ area code text $+00000000 WORD length of prefix text +00000002 ASCIIZ prefix text $+00000000 WORD length of country name +00000002 ASCIIZ country name $+00000000 WORD ??? (0) +00000002 WORD length of number (last 4 digits) text +00000004 ASCIIZ number text >> Format of each contact group entry: 00000000 LONG group value: 3 = Awaiting Authorization 1000+ = user-defined group 00000004 WORD length of group name 00000006 ASCIIZ group name $+00000000 LONG ??? (-1) +00000004 WORD group visual status -- 0:closed, 1:open ================================================================ == Format of My Details (Db99b) data: ================================================================ 00000008 LONG DAT entry number = 1005 0000000C BYTE first byte of signature = E4h 0000001C WORD //separator value 0000001E LONG label = 55534552h ('USER') 00000022 LONG user entry status 6 = "My Details" 00000026 LONG 0? (corresponds to contact group value) 0000002A 40 BYTEs unused??? (0) 00000052 WORD //separator value 00000054 LONG number of default event WAV entries 00000058 --- list of consecutive default event WAV entries $+00000000 WORD //separator value +00000002 --- 99b user information for owner of this DAT file $+00000000 LONG number of contact groups +00000004 --- list of consecutive contact group entries $+00000000 9 BYTEs ??? +00000009 WORD //separator value +0000000B WORD ??? (0) >> Format of 99b user information: 00000000 LONG number of 99b property blocks 00000004 --- collection of consecutive 99b property blocks (see ICQPROP.TXT for property descriptions) $+00000000 12 BYTEs unused??? (0) +0000000C WORD //separator value +0000000E DWORD timestamp of last information update (local time) >> Format of each 99b property block: 00000000 WORD //separator value 00000002 LONG number of user properties in this block 00000006 --- list of consecutive user properties ================================================================ == Format of Contact (NewDB) data: ================================================================ 0000000C BYTE first byte of signature = E5h 0000001C WORD //separator value 0000001E LONG label = 55534552h ('USER') 00000022 LONG user entry status: 2 = active 5 = removed from contact list 12 = deleted from address book? 13 = outdated/defunct??? 14 = outdated/defunct??? 00000026 LONG value of contact group containing user 0000002A 40 BYTEs ??? 00000052 WORD //separator value 00000054 LONG number of user event WAV entries 00000058 --- list of consecutive user event WAV entries (see format under "My Details (NewDB)") $+00000000 38 BYTEs ??? +00000026 WORD //separator value +00000028 --- 99a user information for contact (see format under "My Details (NewDB)") ================================================================ == Format of Contact (Db99b) data: ================================================================ 0000000C BYTE first byte of signature = E5h 0000001C WORD //separator value 0000001E LONG label = 55534552h ('USER') 00000022 LONG user entry status: 2 = active 5 = removed from contact list 12 = deleted from address book? 13 = outdated/defunct??? 14 = outdated/defunct??? 00000026 LONG value of contact group containing user 0000002A WORD //separator value 0000002C LONG number of user event WAV entries 00000030 --- list of consecutive user event WAV entries (see format under "My Details (NewDB)") $+00000000 WORD //separator value +00000002 --- 99b user information for contact (see format under "My Details (Db99b)") ================================================================ == Format of Address Book? data: ================================================================ 0000000C BYTE first byte of signature = E7h 0000001C WORD //separator value 0000001E LONG label = 47524752h ('GRGR') 00000022 LONG ??? 00000026 LONG unused??? (0) 0000002A LONG ??? (-10001) 0000002C WORD length of address book name 0000002E ASCIIZ address book name ================================================================ == Format of Event Folder data: ================================================================ 0000000C BYTE first byte of signature = EFh 0000001C WORD //separator value 0000001E LONG number of event subfolder folders 00000020 --- list of consecutive event subfolder entries $+00000000 LONG ??? (0) +00000004 LONG ??? +00000008 WORD ??? +0000000A WORD ??? +0000000C WORD length of event folder name +0000000E ASCIIZ event folder name $+00000000 LONG ??? (-1) +00000004 LONG ??? (0) >> Format of each event subfolder entry: 00000000 WORD //separator value 00000002 LONG number of contact entries 00000006 --- list of consecutive contact entries $+00000000 LONG ??? +00000004 LONG ??? (0) +00000008 WORD ??? +0000000A WORD ??? +0000000C WORD length of event subfolder name +0000000E ASCIIZ event subfolder name $+00000000 LONG ??? (-1) +00000004 LONG ??? (0) +00000008 LONG total events in this subfolder >> Format of each contact entry: 00000000 WORD //separator value 00000002 LONG ??? (0) 00000006 LONG ??? 0000000A LONG ??? (0) 0000000E WORD ??? 00000010 WORD ??? 00000012 WORD length of nickname 00000014 ASCIIZ contact's nickname (as shown in the contact list) $+00000000 LONG ??? (-1) +00000004 LONG UIN of contact +00000008 LONG events in this subfolder concerning this contact > CREDITS The following people have contributed to this document: Derek Soeder : initial draft (version 0.10) and preliminary research Michael T. Babcock : HTML version; available at http://www.linuxsupportline.com/~pgp/linux/icq99db.html Sergey Didyk (AKA Dedok) : located GMT offset value in "User Information", and documented its values Contributions are always welcome! If you think you have new information to add, an update to some incomplete or obsolete information, or a correction to make, please contact the document's current manager (name and e-mail listed in the notice at the beginning of the document).