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.

57 lines
1.5 KiB

#pragma once
#define NOMINMAX
#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 * )
using qmain_window_t = QMainWindow;
using qwidget_t = QWidget;
using qstring_t = QString;
using qfile_t = QFile;
using qtree_widget_item_t = QTreeWidgetItem;
using qmsg_box_t = QMessageBox;
class qvminspector_t : public qmain_window_t
friend class qvirt_instrs_t;
friend class qvirt_handlers_t;
qvminspector_t( qwidget_t *parent = Q_NULLPTR );
private slots:
void on_open();
void on_close();
void dbg_print( qstring_t DbgOutput );
void dbg_msg( qstring_t DbgOutput );
void update_ui();
void add_branch_children( qtree_widget_item_t *item, std::uintptr_t branch_addr );
bool init_data();
Ui::QVMProfilerClass ui;
qstring_t file_path;
qstring_t VMProtectedFilePath;
std::uint64_t image_base, vm_entry_rva, module_base, image_size;
vm::ctx_t *vmctx;
vmp2::v3::file_header *file_header;
vmp2::v3::code_block_t *first_block;
std::vector< std::uintptr_t > code_block_addrs;