-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.h
66 lines (60 loc) · 2.34 KB
/
functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#define _zm(a,b) ZeroMemory(a, b)
#define _sc(a,b) strcpy(a,b)
#define _cp(a,b,c) memcpy(a,b,c)
#define PACKVERSION(major,minor) MAKELONG(minor,major)
char *dern(char* str);
char* deunicode(wchar_t*,char*,int);
char* unstr(char* str);
USHORT checksum(USHORT *buffer, int size);
void hexdump(char *buffer, int size);
void GetRandStr(WORD size,char* buf);
unsigned __int64 GetCPUSpeed(void);
void* xalloc(unsigned long rsize);
void xfree(void* ptr);
unsigned long xsize(void* ptr);
void xwalk(void* hh);
void stdeb(char *formatstring, ...);
char* GetStrOS(void);
BOOL RegDelnode (HKEY hKeyRoot, LPTSTR lpSubKey);
BOOL RegDelnodeRecurse (HKEY hKeyRoot, LPTSTR lpSubKey);
int resolve(char* Host);
wchar_t* unicode(char* src, wchar_t* dst, int maxlen);
DWORD GetDllVersion(LPCTSTR lpszDllName);
HFONT getfont(char *name="lucida console", int width=6, int height=8,int q=6);
void memdump(BYTE * ptr, int size); int resolve(char* Host) ; void ftpdeb(char *formatstring, ...);
DWORD ptick(int done=0);
void deb(char* formatstring, ...);
void kill_processes(char *str);
//void* pcrestrerror(unsigned long err);
//void xpcrenfo(pcre* , pcre_extra* );
void dump(char * data, int size,char* tag="");
void* w32strerror(unsigned long err);
//void xpcrevars(void);
//char* dewunicode(const wchar_t* str);
//char* deunicode(UnicodeString str, char* aStr);
char* fmterr(DWORD err);
char* fmterr(void);
int DropFile(char *fname,unsigned char* fndata,DWORD size);
int DropFileRnd(char *fname,unsigned char* fndata,DWORD size);
void dropmem(char* fname, char* buf, int size);
int strip_non_chars(char *str, char rep, bool rem_dbl);
//char* resolve(char* host);
DWORD packFile(char *fname);
HANDLE newThread(LPTHREAD_START_ROUTINE lpStartAddress, LPVOID param);
//int DropFile(char *fname,void* data,int size);
char* commaNumber(long number);
char* FormatLong(const long& a);
int rep(char *buffer,char *what,char *to);
void GetRandStr(WORD size,char* buf);
void Dump_Blocks_In_All_Heaps ();
#ifndef FRELEASE
//#define deb //
#define FORMATSYSTEMERROR(s) format_system_error(s)
#else
#define FORMATSYSTEMERROR(s) "release"
#endif
char* format_system_error(DWORD);
#define xCreateThread(a,b,c) CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE) a, \
b, NULL, c);
#define nCreateThread(a,b) CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE) a, \
NULL, NULL, b);