MCPcopy Create free account
hub / github.com/connorjaydunn/BinaryShield / getRandomInt

Function getRandomInt

src/util.cpp:3–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "util.h"
2
3int getRandomInt(int min, int max)
4{
5 std::random_device rd;
6 std::mt19937 generator(rd());
7 std::uniform_int_distribution<int> distribution(min, max);
8
9 return distribution(generator);
10}
11
12DWORD align(DWORD x, DWORD alignment) { return (x + alignment - 1) & ~(alignment - 1); }
13

Callers 2

getVmHandlerRvaFunction · 0.85
addVmHandlersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected