Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Assemblyscan and save Addresses (X.exe+Y)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
lyaniku
Newbie cheater
Reputation: 0

Joined: 26 Aug 2017
Posts: 15

PostPosted: Tue Dec 04, 2018 4:35 am    Post subject: Assemblyscan and save Addresses (X.exe+Y) Reply with quote

Hello,

I want to save all results from the Assemblyscan window: i.imgur[dot]]com/YCrFjtS.png

I don't think there is a inbuilt feature for that, so I was hopnig someone could tell me how to make a lua script for that.

Suppose I want to find all occourences of

xor *,*
and *,*
mov *,*
cmp *,*

and save those to a .CT so that i can analyse it time by time?

Thanks for any help!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4300

PostPosted: Tue Dec 04, 2018 11:48 am    Post subject: This post has 1 review(s) Reply with quote

This adds a menu item to the right click menu:
Code:
asmScanWriteFilePlugin = registerFormAddNotification(
function(frm)
  if frm.ClassName == 'TfrmDisassemblyscan' then
    local t = createTimer()
    t.Interval = 100
    t.OnTimer = function(t)
      if not (frm.PopupMenu1 and frm.ListBox1) then return end

      local dialog = createSaveDialog(frm)
      dialog.DefaultExt = '.txt'
      dialog.Filter = 'Text files (*.txt)|*.TXT|Log files (*.log)|*.LOG'
      dialog.FilterIndex = 1

      local lb = frm.ListBox1
      local mi = createMenuItem(frm.PopupMenu1)
      mi.Caption = 'Save to file'
      mi.Shortcut = 'ctrl+s'
      mi.OnClick = function(mi)
        if not dialog.execute() or lb.Items.Count == 0 then return end
        local filename = dialog.Filename

        local sl = createStringList()
        sl.beginUpdate()
        for i = 0, lb.Items.Count-1 do
          sl.add(lb.Items[i])
        end
        sl.endUpdate()
        sl.saveToFile(filename)
        sl.destroy()
      end
      frm.PopupMenu1.Items.add(mi)

      t.destroy()
    end
  end
end)

Save this as a .lua file in CE's autorun directory.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites