2019-09-23 16:46:57 +03:00
|
|
|
//#
|
2022-03-09 17:56:42 +03:00
|
|
|
//# Copyright (C) 2018-2022 QuasarApp.
|
2019-09-23 16:46:57 +03:00
|
|
|
//# Distributed under the lgplv3 software license, see the accompanying
|
|
|
|
//# Everyone is permitted to copy and distribute verbatim copies
|
|
|
|
//# of this license document, but changing it is not allowed.
|
|
|
|
//#
|
|
|
|
|
2019-03-17 18:42:07 +03:00
|
|
|
#ifndef PE_H
|
|
|
|
#define PE_H
|
|
|
|
|
2019-03-20 18:05:14 +03:00
|
|
|
#include <QFile>
|
2019-03-17 18:42:07 +03:00
|
|
|
#include <QString>
|
2019-03-22 23:36:22 +03:00
|
|
|
#include <QVector>
|
2019-03-18 10:33:03 +03:00
|
|
|
#include "igetlibinfo.h"
|
2019-03-17 18:42:07 +03:00
|
|
|
|
2019-12-24 11:46:11 +03:00
|
|
|
#define API_MS_WIN "api-ms-win-"
|
|
|
|
#define API_MS_WIN_CORE "-core-"
|
|
|
|
#define API_MS_WIN_EVENTING "-Eventing-"
|
|
|
|
#define API_MS_WIN_DEVICES "-devices-"
|
|
|
|
#define API_MS_WIN_CRT "-crt-"
|
|
|
|
#define API_MS_WIN_SECURITY "-security-"
|
|
|
|
#define API_MS_WIN_BASE "-base-"
|
2019-12-23 21:55:15 +03:00
|
|
|
|
2019-03-23 20:40:33 +03:00
|
|
|
namespace peparse {
|
|
|
|
struct parsed_pe_internal;
|
|
|
|
}
|
2019-03-18 10:33:03 +03:00
|
|
|
class PE : public IGetLibInfo {
|
2019-03-17 18:42:07 +03:00
|
|
|
|
2019-03-17 20:16:48 +03:00
|
|
|
private:
|
2019-03-21 00:34:57 +03:00
|
|
|
|
2019-08-31 22:22:26 +03:00
|
|
|
bool getDep(peparse::parsed_pe_internal *, LibInfo &res) const;
|
2019-12-24 13:48:37 +03:00
|
|
|
QHash<WinAPI, QSet<QString>> _winAPI;
|
2019-03-18 17:12:40 +03:00
|
|
|
|
2019-03-17 18:42:07 +03:00
|
|
|
public:
|
|
|
|
|
|
|
|
PE();
|
2019-12-24 11:46:11 +03:00
|
|
|
WinAPI getAPIModule(const QString &libName) const;
|
2019-03-18 10:33:03 +03:00
|
|
|
|
2019-08-31 22:22:26 +03:00
|
|
|
bool getLibInfo(const QString& lib, LibInfo& info) const override;
|
2019-03-18 17:12:40 +03:00
|
|
|
|
|
|
|
~PE() override;
|
|
|
|
|
2019-12-24 13:48:37 +03:00
|
|
|
QHash<WinAPI, QSet<QString>> getWinAPI() const;
|
|
|
|
void setWinAPI(const QHash<WinAPI, QSet<QString>> &winAPI);
|
2019-03-17 18:42:07 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PE_H
|