You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.3 KiB
55 lines
1.3 KiB
#pragma once
|
|
#include <QtWidgets/QFileDialog>
|
|
#include <QtWidgets/QInputDialog.h>
|
|
#include <QtWidgets/QMainWindow>
|
|
#include <QtWidgets/QMessageBox.h>
|
|
#include <qpushbutton.h>
|
|
#include <qtreewidget.h>
|
|
|
|
#include <Windows.h>
|
|
#include <filesystem>
|
|
#include <fstream>
|
|
#include <vmprofiler.hpp>
|
|
|
|
#include "ui_qvminspector.h"
|
|
#include <ia32.hpp>
|
|
#include <vmprofiler.hpp>
|
|
|
|
#define ABS_TO_IMG( addr, mod_base, img_base ) ( addr - mod_base ) + img_base
|
|
Q_DECLARE_METATYPE( vm::instrs::virt_instr_t * )
|
|
|
|
struct rtn_data_t
|
|
{
|
|
std::uint32_t rtn_rva;
|
|
std::vector< vm::instrs::code_block_t > rtn_blks;
|
|
};
|
|
|
|
class QVMInspector : public QMainWindow
|
|
{
|
|
friend class QVirtualMachineInstructions;
|
|
friend class QVirtualMachineHandlers;
|
|
friend class QVirtualRoutines;
|
|
Q_OBJECT
|
|
public:
|
|
QVMInspector( QWidget *parent = Q_NULLPTR );
|
|
|
|
private slots:
|
|
void OnOpen();
|
|
void OnClose();
|
|
|
|
private:
|
|
void DbgPrint( QString DbgOutput );
|
|
void DbgMsg( QString DbgOutput );
|
|
void UpdateUI();
|
|
bool SerializeVmp2( std::vector< rtn_data_t > &VirtRtns );
|
|
bool InitData();
|
|
|
|
Ui::QVMProfilerClass ui;
|
|
QString file_path;
|
|
|
|
std::uint64_t ImgBase, ModuleBase, ImgSize;
|
|
vm::ctx_t *g_vm_ctx;
|
|
|
|
vmp2::v4::FileHeader *FileHeader;
|
|
std::vector< rtn_data_t > VirtRtns;
|
|
}; |