• Welcome to Valhalla Legends Archive.
 

Product Language

Started by deth, June 27, 2004, 04:36 PM

Previous topic - Next topic

deth

I have seen someone post a topic about this before but the reply was GetLocaleInfo, which i have been using but i can't get the LCTYPE for this.
from sniffing i got:
"SUne"
which is enUS for product language.
the LCTYPES that i found:
LOCALE_SABBREVLANGNAME gives me ENU
LOCALE_SISO639LANGNAME gives me en
LOCALE_SABBREVCTRYNAME gives me USA

is there a single LCTYPE that gives me enUS or am i supposed to combine 2 LCTYPES (LOCALE_SISO639LANGNAME and country) if so i get country with LOCALE_SABBREVCTRYNAME and trim that to 2 characters then combine string and send?

Eibro

Set a breakpoint on GetLocaleInfo before you initiate the logon sequence in Starcraft. Check the disassembly at this point and see how GetLocaleInfo is called. I'd do it myself, but I don't have SC installed right now.
Eibro of Yeti Lovers.

UserLoser.

#2
From what I have, it only uses:


GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, returnbuf, 0x40);

&

GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SENGCOUNTRY, returnbuf, 0x80);


Edit: after doing further research, it sets this value after checking some value which i'm yet to determine.

See: .text:1900F990 sub_1900F990

(newest starcraft battle.snp)

Edit2: Seems to be comparing results of GetSystemDefaultLangID().

This is probably wrong, but best i could do at this time, and doesn't make sense on why it's subtracting 0x409 from 0x407, but i'm most likely wrong, someone should correct this:


result = GetSystemDefaultLangID();

if (result > 0x407) {
result -= 0x409;
if (result > 0x0d) {
 productid = 0;
} else {
  switch (result) {
   case 0x600: productid = 'enUS'; break;
   case 0x201: productid = 'esES'; break;
   case 0x306: productid = 'frFR'; break;
   case 0x606: productid = 'itIT'; break;
   case 0x406: productid = 'ptBR'; break;
   default: productid = 0;
  }
}
else if (result == 0x407) {
productid = 'deDE';
}

deth

I haven't disassembled before (anything) but I got softICE only and going to disassemble sc.exe myself if i can only get softICE to work damn thing.

UserLoser.

Quote from: deth on June 28, 2004, 01:23 PM
I haven't disassembled before (anything) but I got softICE only and going to disassemble sc.exe myself if i can only get softICE to work damn thing.

Battle.snp has everything Battle.net related