-------[  RtC Mag, At the end of the universe  ]

--------------[  La Bombe du mag : Country  ]
---------[ in RtC mag 3 ]
----[  by Androgyne <androgyne-rtc@fr.st>  ]


-------[  La gchette

	Pas de bombe complte cette fois mais simplement une petite gchette base sur le pays. C'est facile  faire, a s'intgre  n'importe quel virus. Le code est archi simple, on fait un simple appel  la fonction 38h de l'interruption 21h. Cette fonction renvoie tout un tas d'informations sur le pays en question. On a juste besoin d'un buffer de 40 octets qui sera actualis aprs l'appel.

--- COUNTRY.ASM ---------------------------------------------------------------

COUNTRY:
	mov ah,38h
	mov al,0
	mov dx,offset buffer
	int 21h
	cmp bx,XX
	ret

--- COUNTRY.ASM ---------------------------------------------------------------

	L, je vais me prendre un Coca parce que je suis trop creve. En fait, je n'ai pas tout  fait fini. C'est bien beau tout a mais a ne nous dit pas  quoi on compare bx. Tout l'intrt est de connatre le code du pays que l'on vise. Et l, Androgyne arrive. En fait, les codes pays pour PC sont exactement les mmes que les codes tlphoniques internationaux (enfin des gars pas trop cons qui ont rflchi 5 minutes avant de faire une connerie qui cote des milliards comme le non bug de l'an 2000).


-------[  La fonction 38h de l'interruption 21h


	Voici donc le dtail de la fonction 38h.

--- 21h.38h -------------------------------------------------------------------

Fonction 38h : Get country/specific information
paramtres d'entre:
    AH=38h
    DS:DX=pointeur sur le buffer o mettre les infos
     si on veut les infos concernant le pays dans lequel on se trouve,
      AL=00h
     si on veut les infos concernant un pays particulier,
      AL=code du pays si le code est entre 01h et FEh
        ou
      AL=FFh
      BX=code 16 bits du pays

paramtres de sortie:
    C mis  1 s'il y a eu une erreur
    AX=code d'erreur si chec
    C mis  0 s'il n'y a pas eu d'erreur
    BX=code 16 bits du pays
    DS:DX le buffer est actualis

--- 21h.38h -------------------------------------------------------------------


    Le buffer est actualis comme suit (c'est en anglais, j'ai pas eu le temps de le traduire) :


--- COUNTRY.NFO ---------------------------------------------------------------

Format of DOS 2.00-2.10 country info:
Offset	Size	Description	(Table 01398)
 00h	WORD	date format  0 = USA	mm dd yy
			     1 = Europe dd mm yy
			     2 = Japan	yy mm dd
 02h	BYTE	currency symbol
 03h	BYTE	00h
 04h	BYTE	thousands separator char
 05h	BYTE	00h
 06h	BYTE	decimal separator char
 07h	BYTE	00h
 08h 24 BYTEs	reserved

Format of DOS 2.11+ country info:
Offset	Size	Description	(Table 01399)
 00h	WORD	date format (see #01398)
 02h  5 BYTEs	ASCIZ currency symbol string
 07h  2 BYTEs	ASCIZ thousands separator
 09h  2 BYTEs	ASCIZ decimal separator
 0Bh  2 BYTEs	ASCIZ date separator
 0Dh  2 BYTEs	ASCIZ time separator
 0Fh	BYTE	currency format
		bit 2 = set if currency symbol replaces decimal point
		bit 1 = number of spaces between value and currency symbol
		bit 0 = 0 if currency symbol precedes value
			1 if currency symbol follows value
 10h	BYTE	number of digits after decimal in currency
 11h	BYTE	time format
		bit 0 = 0 if 12-hour clock
			1 if 24-hour clock
 12h	DWORD	address of case map routine
		(FAR CALL, AL = character to map to upper case [>= 80h])
 16h  2 BYTEs	ASCIZ data-list separator
 18h 10 BYTEs	reserved

--- COUNTRY.NFO ---------------------------------------------------------------


-------[  Les codes des pays


Et finalement, les codes de quasiment tous les pays... (galement en anglais, l je pense qu'il ne devrait pas y avoir de problmes de traduction)


--- COUNTRYCODE.LST -----------------------------------------------------------

(Table 01400)
Values for country code:
 001h (1)	United States
 002h (2)	Canadian-French
 003h (3)	Latin America
 004h (4)	Canada (English)
 007h (7)	Russia
 014h (20)	Egypt
 01Bh (27)	South Africa
 01Eh (30)	Greece
 01Fh (31)	Netherlands
 020h (32)	Belgium
 021h (33)	France
 022h (34)	Spain
 023h (35)	Bulgaria???
 024h (36)	Hungary (not supported by DR DOS 5.0)
 026h (38)	Yugoslavia (not supported by DR DOS 5.0) -- obsolete
 027h (39)	Italy / San Marino / Vatican City
 028h (40)	Romania
 029h (41)	Switzerland / Liechtenstein
 02Ah (42)	Czechoslovakia / Tjekia / Slovakia (not supported by DR DOS 5.0)
 02Bh (43)	Austria (DR DOS 5.0)
 02Ch (44)	United Kingdom
 02Dh (45)	Denmark
 02Eh (46)	Sweden
 02Fh (47)	Norway
 030h (48)	Poland (not supported by DR DOS 5.0)
 031h (49)	Germany
 033h (51)	Peru
 034h (52)	Mexico
 035h (53)	Cuba
 036h (54)	Argentina
 037h (55)	Brazil (not supported by DR DOS 5.0)
 038h (56)	Chile
 039h (57)	Columbia
 03Ah (58)	Venezuela
 03Ch (60)	Malaysia
 03Dh (61)	International English / Australia
 03Eh (62)	Indonesia / East Timor
 03Fh (63)	Philippines
 040h (64)	New Zealand
 041h (65)	Singapore
 042h (66)	Thailand (or Taiwan???)
 051h (81)	Japan (DR DOS 5.0, MS-DOS 5.0+)
 052h (82)	South Korea (DR DOS 5.0)
 054h (84)	Vietnam
 056h (86)	China (MS-DOS 5.0+)
 058h (88)	Taiwan (MS-DOS 5.0+)
 05Ah (90)	Turkey (MS-DOS 5.0+)
 05Bh (91)	India
 05Ch (92)	Pakistan
 05Dh (93)	Afghanistan
 05Eh (94)	Sri Lanka
 062h (98)	Iran
 063h (99)	Asia (English)
 066h (102)	??? (Hebrew MS-DOS 5.0)
 070h (112)	Belarus
 0C8h (200)	Thailand (PC DOS 6.1+)
		(reported as 01h due to a bug in PC DOS COUNTRY.SYS)
 0D4h (212)	Morocco
 0D5h (213)	Algeria
 0D8h (216)	Tunisia
 0DAh (218)	Libya
 0DCh (220)	Gambia
 0DDh (221)	Senegal
 0DEh (222)	Maruitania
 0DFh (223)	Mali
 0E0h (224)	African Guinea
 0E1h (225)	Ivory Coast
 0E2h (226)	Burkina Faso
 0E3h (227)	Niger
 0E4h (228)	Togo
 0E5h (229)	Benin
 0E6h (230)	Mauritius
 0E7h (231)	Liberia
 0E8h (232)	Sierra Leone
 0E9h (233)	Ghana
 0EAh (234)	Nigeria
 0EBh (235)	Chad
 0ECh (236)	Centra African Republic
 0EDh (237)	Cameroon
 0EEh (238)	Cape Verde Islands
 0EFh (239)	Sao Tome and Principe
 0F0h (240)	Equatorial Guinea
 0F1h (241)	Gabon
 0F2h (242)	Congo
 0F3h (243)	Zaire
 0F4h (244)	Angola
 0F5h (245)	Guinea-Bissau
 0F6h (246)	Diego Garcia
 0F7h (247)	Ascension Isle
 0F8h (248)	Seychelles
 0F9h (249)	Sudan
 0FAh (250)	Rwhanda
 0FBh (251)	Ethiopia
 0FCh (252)	Somalia
 0FDh (253)	Djibouti
 0FEh (254)	Kenya
 0FFh (255)	Tanzania
 100h (256)	Uganda
 101h (257)	Burundi
 103h (259)	Mozambique
 104h (260)	Zambia
 105h (261)	Madagascar
 106h (262)	Reunion Island
 107h (263)	Zimbabwe
 108h (264)	Namibia
 109h (265)	Malawi
 10Ah (266)	Lesotho
 10Bh (267)	Botswana
 10Ch (268)	Swaziland
 10Dh (269)	Comoros
 10Eh (270)	Mayotte
 122h (290)	St. Helena
 129h (297)	Aruba
 12Ah (298)	Faroe Islands
 12Bh (299)	Greenland
 15Eh (350)	Gibraltar
 15Fh (351)	Portugal
 160h (352)	Luxembourg
 161h (353)	Ireland
 162h (354)	Iceland
 163h (355)	Albania
 164h (356)	Malta
 165h (357)	Cyprus
 166h (358)	Finland
 167h (359)	Bulgaria
 172h (370)	Lithuania (reported as 372 due to a bug in MS-DOS COUNTRY.SYS)
 173h (371)	Latvia (reported as 372 due to a bug in MS-DOS COUNTRY.SYS)
 174h (372)	Estonia
 175h (373)	Moldova
 177h (375)	??? (MS-DOS 7.10 / Windows98)
 17Ch (380)	Ukraine
 17Dh (381)	Serbia / Montenegro
 180h (384)	Croatia
 181h (385)	Croatia (PC DOS 7+)
 182h (386)	Slovenia
 183h (387)	Bosnia-Herzegovina (Latin)
 184h (388)	Bosnia-Herzegovina (Cyrillic) (PC DOS 7+)
		(reported as 381 due to a bug in PC DOS COUNTRY.SYS)
 185h (389)	FYR Macedonia
 1A5h (421)	Czech Republic / Tjekia (PC DOS 7+)
 1A6h (422)	Slovakia
		(reported as 421 due to a bug in COUNTRY.SYS)
 1F4h (500)	Falkland Islands
 1F5h (501)	Belize
 1F6h (502)	Guatemala
 1F7h (503)	El Salvador
 1F8h (504)	Honduras
 1F9h (505)	Nicraragua
 1FAh (506)	Costa Rica
 1FBh (507)	Panama
 1FCh (508)	St. Pierre and Miquelon
 1FDh (509)	Haiti
 24Eh (590)	Guadeloupe
 24Fh (591)	Bolivia
 250h (592)	Guyana
 251h (593)	Ecuador
 252h (594)	rench Guiana
 253h (595)	Paraguay
 254h (596)	Martinique / French Antilles
 255h (597)	Suriname
 256h (598)	Uruguay
 257h (599)	Netherland Antilles
 29Ah (666)	Russia??? (PTS-DOS 6.51 KEYB)
 29Bh (667)	Poland??? (PTS-DOS 6.51 KEYB)
 29Ch (668)	Poland??? (Slavic???) (PTS-DOS 6.51 KEYB)
 29Eh (670)	Saipan / N. Mariana Island
 29Fh (671)	Guam
 2A0h (672)	Norfolk Island (Australia) / Christmas Island/Cocos Islands / Antartica
 2A1h (673)	Brunei Darussalam
 2A2h (674)	Nauru
 2A3h (675)	Papua New Guinea
 2A4h (676)	Tonga Islands
 2A5h (677)	Solomon Islands
 2A6h (678)	Vanuatu
 2A7h (679)	Fiji
 2A8h (680)	Palau
 2A9h (681)	Wallis & Futuna
 2AAh (682)	Cook Islands
 2ABh (683)	Niue
 2ACh (684)	American Samoa
 2ADh (685)	Western Samoa
 2AEh (686)	Kiribati
 2AFh (687)	New Caledonia
 2B0h (688)	Tuvalu
 2B1h (689)	French Polynesia
 2B2h (690)	Tokealu
 2B3h (691)	Micronesia
 2B4h (692)	Marshall Islands
 2C7h (711)	??? (currency = EA$, code pages 437,737,850,852,855,857)
 311h (785)	Arabic (Middle East/Saudi Arabia/etc.)
 324h (804)	Ukraine
 329h (809)	Antigua and Barbuda / Anguilla / Bahamas / Barbados / Bermuda
		British Virgin Islands / Cayman Islands / Dominica
		Dominican Republic / Grenada / Jamaica / Montserra
		St. Kitts and Nevis / St. Lucia / St. Vincent and Grenadines
		Trinidad and Tobago / Turks and Caicos
 352h (850)	North Korea
 354h (852)	Hong Kong
 355h (853)	Macao
 357h (855)	Cambodia
 358h (856)	Laos
 370h (880)	Bangladesh
 376h (886)	Taiwan (MS-DOS 6.22+)
 3C0h (960)	Maldives
 3C1h (961)	Lebanon
 3C2h (962)	Jordan
 3C3h (963)	Syria / Syrian Arab Republic
 3C4h (964)	Iraq
 3C5h (965)	Kuwait
 3C6h (966)	Saudi Arabia
 3C7h (967)	Yemen
 3C8h (968)	Oman
 3C9h (969)	Yemen??? (Arabic MS-DOS 5.0)
 3CBh (971)	United Arab Emirates
 3CCh (972)	Israel (Hebrew) (DR DOS 5.0,MS-DOS 5.0+)
 3CDh (973)	Bahrain
 3CEh (974)	Qatar
 3CFh (975)	Bhutan
 3D0h (976)	Mongolia
 3D1h (977)	Nepal
 3E3h (995)	Myanmar (Burma)
      (10xxx)	reserved for ISO 28601/ISO 8601 or derivative national stds
      (11xxx)	reserved for Euro currency support
      (12xxx)	reserved for ISO 28601 + Euro currency
      (1xxxx)	not yet defined
      (20xxx)	reserved for ISO 28601/ISO 8601 or derivative national stds
      (21xxx)	reserved for Euro currency support
      (22xxx)	reserved for ISO 28601 + Euro currency
      (2xxxx)	not yet defined
      (30xxx)	reserved for user-definable country codes
      (31xxx)	reserved for OEM-defined country codes
      (32000+)	reserved for future expansion

--- COUNTRYCODE.LST -----------------------------------------------------------


-------[  Conclusion


	Pour finir, je vais rappeler que le virus Pearl Harbor possdait une gchette de ce type associe  une gchette sur la date. Pearl Harbor se dclenchait uniquement au Japon, le 7 dcembre. Qu'ils sont drles ces auteurs de virus... Le code source de ce virus est disponible avec le mag (c'est pas un beau cadeau ?).


-------[  EOF
