| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Game Hacking Dojo Master Cheater
 
  Reputation: 1 
 Joined: 17 Sep 2023
 Posts: 250
 
 
 | 
			
				|  Posted: Sun Aug 18, 2024 1:42 pm    Post subject: Export Code List (Advanced Options) Entries |   |  
				| 
 |  
				| For a very long time, I have been using Cheat Engine as my main game-hacking tool. And never did I use anything like Ghidra/IDA (Decompiler). I am just an assembly enjoyer. Yes, sick I know, thank you. So to make my life easier using Cheat Engine and not need to go into the code list and check my over 200-entry list to find something manually, I made this script to make my life, and the lives of those like me, easier. 
 Usage:
 code_list(): registers all entries as symbols
 code_list(1): exports all entries to a txt file located in the current cheat table directory
 code_list(2): registers all entries as symbols and exports them
 
 
  	  | Code: |  	  | local function code_list(type) if process == nil then messageDialog("Make sure you attach to the target process first", 2) return end
 local code_list
 local process_name = process:gsub("%.exe$","")
 local file_name = process_name.." - Code List.txt"
 local file_dir = getMainForm().OpenDialog1.InitialDir
 local file_path = file_dir..file_name
 local separator = "    -    "
 if file_dir == "" then messageDialog("Make sure you open a cheat table first", 2) return end
 for i = 0, getFormCount() do
 if (getForm(i) and getForm(i).name == "AdvancedOptions") then
 code_list = getForm(i);
 end
 end
 if code_list.lvCodelist.Items.Count == 0 then messageDialog("Code list unavailable", 0) return end
 if type == 1 or type == 2 then
 file = io.open(file_path, "w")
 local first_line = "Process: "..process..separator.."Time of creation: "..os.date()..separator.."Total entries: "..code_list.lvCodelist.Items.Count.."\n"
 file:write(first_line)
 end
 for i = 0, code_list.lvCodelist.Items.Count - 1 do
 local item = code_list.lvCodelist.Items[i]
 local index = item.index + 1
 local label = string.match(item.SubItems[0], "^[^:]+")
 local opcode = item.SubItems[0]
 local address = item.Caption
 if type ~= 1 or type == 2 then registerSymbol(label, address) end
 local line = index..separator..address..separator..opcode.."\n\n"
 if file then file:write(line) end
 if (item.name == 'Codelist2') then cl = item end
 end
 if file then file:close() file = nil messageDialog("The code list has been saved successfully\n"..file_path, 2) end
 end
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Seedlord How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 14 Oct 2007
 Posts: 1
 
 
 | 
			
				|  Posted: Thu Aug 29, 2024 7:27 am    Post subject: |   |  
				| 
 |  
				| thanks. this comes handy. 
 what do you do if your executable gets updated and the instruction addresses shift by certain offsets?
 no way you manually replace 200 entries xD
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| xxhehe Expert Cheater
 
 ![]() Reputation: 0 
 Joined: 11 Mar 2015
 Posts: 154
 
 
 | 
			
				|  Posted: Mon Sep 02, 2024 5:00 am    Post subject: |   |  
				| 
 |  
				|  	  | Seedlord wrote: |  	  | thanks. this comes handy. 
 what do you do if your executable gets updated and the instruction addresses shift by certain offsets?
 no way you manually replace 200 entries xD
 | 
 AOB?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Game Hacking Dojo Master Cheater
 
  Reputation: 1 
 Joined: 17 Sep 2023
 Posts: 250
 
 
 | 
			
				|  Posted: Mon Sep 02, 2024 1:18 pm    Post subject: |   |  
				| 
 |  
				| I have something up my sleeve that I didn't include in the script but I basically, get an AOB signature for every entry when exporting, making it almost impossible to miss |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |