HyperDbg Debugger
Loading...
Searching...
No Matches
rev-ctrl.h File Reference

headers for controller of the reversing machine's module More...

Go to the source code of this file.

Functions

BOOLEAN RevRequestService (REVERSING_MACHINE_RECONSTRUCT_MEMORY_REQUEST *RevRequest)
 Request service from the reversing machine.

Detailed Description

headers for controller of the reversing machine's module

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.2
Date
2023-03-23

Function Documentation

◆ RevRequestService()

BOOLEAN RevRequestService ( REVERSING_MACHINE_RECONSTRUCT_MEMORY_REQUEST * RevRequest)

Request service from the reversing machine.

Parameters
RevRequest
Returns
BOOLEAN
29{
30 BOOLEAN Status;
31 ULONG ReturnedLength;
32
33 //
34 // Check if debugger is loaded or not
35 //
37
38 //
39 // Send the request to the kernel
40 //
41 Status = DeviceIoControl(
42 g_DeviceHandle, // Handle to device
44 // code
45 RevRequest, // Input Buffer to driver.
47 RevRequest, // Output Buffer from driver.
49 // buffer in bytes.
50 &ReturnedLength, // Bytes placed in buffer.
51 NULL // synchronous call
52 );
53
54 if (!Status)
55 {
56 ShowMessages("ioctl failed with code 0x%x\n", GetLastError());
57 return FALSE;
58 }
59
60 //
61 // Check if the service request was successful or not
62 //
64 {
65 ShowMessages("the reversing machine service request was successful!\n");
66 }
67 else
68 {
69 ShowErrorMessage(RevRequest->KernelStatus);
70 return FALSE;
71 }
72
73 return FALSE;
74}
UCHAR BOOLEAN
Definition BasicTypes.h:35
#define FALSE
Definition BasicTypes.h:113
unsigned long ULONG
Definition BasicTypes.h:31
#define DEBUGGER_OPERATION_WAS_SUCCESSFUL
General value to indicate that the operation or request was successful.
Definition ErrorCodes.h:23
#define IOCTL_REQUEST_REV_MACHINE_SERVICE
ioctl, request service from the reversing machine
Definition Ioctls.h:333
#define SIZEOF_REVERSING_MACHINE_RECONSTRUCT_MEMORY_REQUEST
Definition RequestStructures.h:137
BOOLEAN ShowErrorMessage(UINT32 Error)
shows the error message
Definition debugger.cpp:40
#define AssertShowMessageReturnStmt(expr1, expr2, message1, message2, rc)
Definition common.h:59
#define ASSERT_MESSAGE_VMM_NOT_LOADED
Definition common.h:31
#define ASSERT_MESSAGE_DRIVER_NOT_LOADED
Definition common.h:27
#define AssertReturnFalse
Definition common.h:21
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
BOOLEAN g_IsVmmModuleLoaded
shows whether the VMM module is loaded or not
Definition globals.h:28
UINT32 KernelStatus
Definition RequestStructures.h:150