public static void GenereteData() { if (!GenData) { Code = Code + ".DATA" + "\n"; Code = Code + "buff_ db 11 Dup(?),0" + "\n"; Code = Code + "stdInHandle_0 dd ?" + "\n"; Code = Code + "bytesRead_0 dd ?"+ "\n"; Code = Code + "minus_ db '-',0" + "\n"; Code = Code + "size_mes dd ($-minus_-1)" + "\n"; Code = Code + "consoleHandle_0 dd 0" + "\n"; Code = Code + "bytesWrite_0 dd ?" + "\n"; Code = Code + "consoleHandle_1 dd 0" + "\n"; Code = Code + "bytesWrite_1 dd ?" + "\n"; Const_Strings str_1; int i = 1; foreach (DictionaryEntry str in Parser.const_str) { str_1 = (Const_Strings)str.Value; Code = Code + "str_" + i.ToString() + " DB " + str_1.Value + ",0\n"; Code = Code + "size_" + i.ToString() + " DD " + "($ - str_" + i.ToString() + "-1)\n"; c_str = new Const_str(); c_str.Name = "str_" + i.ToString(); c_str.Size = "size_" + i.ToString(); try{ const_str.Add(str_1.Value, c_str); } catch { }; i++; } GenData = true; } }
public static void GenerateStr(string str) { Const_str cs = (Const_str)const_str[str]; Code = Code + "mov eax, offset " + cs.Name + "\n"; Code = Code + "mov edx," + cs.Size + "\n"; }