Logo

CS.RIN.RU - Steam Underground Community

IRC: #cs.rin.ru at irc.rizon.net
It is currently Friday, 17 Apr 2015, 09:46

English | Русский




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message

Post Post subject: Weird ClientRegistry.Txt In Steam-Down Folder   
Posted: Tuesday, 25 Jan 2005, 11:51   
Advanced forumer Завсегдатай
Joined: Sunday, 09 May 2004, 05:55
Posts: 80
Location: Vancouver, Canada
This is what is said.

#ifndef _CLIENTREGISTRY_H_
#define _CLIENTREGISTRY_H_

#include <windows.h>

#if STEAM_REG_BUILDING_DLL
# define STEAM_REG_DLLIMPORT __declspec(dllexport)
#else
# define STEAM_REG_DLLIMPORT __declspec(dllimport)
#endif
#define STEAM_REG_CALL __cdecl

// For some reason these data types aren't defined in C...
#ifndef bool
#define bool BOOL
#endif
#ifndef true
#define true TRUE
#endif
#ifndef false
#define false FALSE
#endif

#ifdef __cplusplus
extern "C" {
#endif

/*** CLIENT REGISTRY STRUCTURES ***/

typedef struct tagEnumerationHeader
{
short Magic; // always 0x5001
unsigned long BlockLength; // length of block (for hierarchy)
unsigned long NullPadding; // how many bytes of 0's there are after the data segment
} EnumerationHeader;
// This is the *exact* size of the structure (in the file)
#define EnumerationHeaderSize 10
// Every one of these structures has a Magic equal to this value
#define STEAM_HEADER_MAGIC 0x5001

typedef struct tagEnumeratedItem
{
short DescriptorLength;
unsigned long DataLength;
} EnumeratedItem;
// This is the *exact* size of the structure (in the file)
#define EnumeratedItemSize 6

// To determine whether the data is a key or a value
#define STEAM_REG_SECTION_KEYS 1
#define STEAM_REG_SECTION_VALUES 2

// To determine whether the value descriptor is a datatype or the actual data
#define STEAM_REG_VALUE_TYPE 1
#define STEAM_REG_VALUE_DATA 2

// Value datatypes
#define STEAM_REG_SZ 0
#define STEAM_REG_DWORD 1
#define STEAM_REG_BINARY 2
// Not official, but these make sense (start at 10)
#define STEAM_REG_BOOL 10
// "Special" value types (start at 20)
#define STEAM_REG_IPADDR 20
#define STEAM_REG_IPADDRPORT 21
#define STEAM_REG_TIMESTAMP 22
#define STEAM_REG_CHECKSUM 23
#define STEAM_REG_ENUM 24
#define STEAM_REG_KEYENUM 25

/*** PARSER STRUCTURES ***/

typedef struct _steamregKey steamregKey;
typedef steamregKey* steamregKeyPtr;
struct _steamregKey
{
char* Name;
struct _steamregKey* PrevKey;
struct _steamregKey* NextKey;
struct _steamregKey* Children;
struct _steamregKey* Parent;
struct _steamregValue* Values;
};

typedef struct _steamregValue steamregValue;
typedef steamregValue* steamregValuePtr;
struct _steamregValue
{
char* Name;
unsigned long Type;
void* DataPtr; // Reference to actual data
unsigned long DataSize;
struct _steamregValue* PrevValue;
struct _steamregValue* NextValue;
struct _steamregKey* Parent;
};

/*** SPECIAL STRUCTURES ***/

typedef struct _IPAddrPort IPAddrPort;
struct _IPAddrPort
{
unsigned long IP;
unsigned short port;
};

typedef struct _W3CDTF W3CDTF;
struct _W3CDTF
{
unsigned long year;
unsigned long month;
unsigned long day;
unsigned long hour;
unsigned long minute;
unsigned long second;
unsigned long offset_add; // boolean
unsigned long offset_hours;
unsigned long offset_minutes;
};

typedef struct _SteamChecksum SteamChecksum;
struct _SteamChecksum
{
unsigned long FileSize;
unsigned long Checksum;
};

typedef struct _Enumeration Enumeration;
typedef Enumeration* EnumerationPtr;
struct _Enumeration
{
char* Name; // This is sometimes used in place of EnumItem
unsigned long EnumItem;
void* FilePtr;
unsigned long DataSize;
struct _Enumeration* Parent;
struct _Enumeration* Child;
struct _Enumeration* PrevEnum;
struct _Enumeration* NextEnum;
};

/*** FUNCTIONS ***/

// Main functions
STEAM_REG_DLLIMPORT steamregKeyPtr STEAM_REG_CALL SteamRegOpenFile(const char* FileName);
STEAM_REG_DLLIMPORT void STEAM_REG_CALL SteamRegCloseFile(steamregKeyPtr Key);

// Misc functions
STEAM_REG_DLLIMPORT char* STEAM_REG_CALL SteamRegGetKeyPath(const steamregKeyPtr Key);
STEAM_REG_DLLIMPORT char* STEAM_REG_CALL SteamRegGetValuePath(const steamregValuePtr Value);
STEAM_REG_DLLIMPORT bool STEAM_REG_CALL SteamRegTestKeyPath(const steamregKeyPtr Key, const char* Expression);
STEAM_REG_DLLIMPORT bool STEAM_REG_CALL SteamRegTestValuePath(const steamregValuePtr Value, const char* Expression);

// Special parser functions
STEAM_REG_DLLIMPORT IPAddrPort* STEAM_REG_CALL SteamRegParseIPAddrPort(void* FilePtr, const long DataLength);
STEAM_REG_DLLIMPORT W3CDTF* STEAM_REG_CALL SteamRegParseTimeStamp(void* FilePtr, long DataLength);
STEAM_REG_DLLIMPORT SteamChecksum STEAM_REG_CALL SteamRegParseChecksum(void* FilePtr, const long DataLength);
STEAM_REG_DLLIMPORT unsigned long STEAM_REG_CALL SteamRegParseRawEnum(EnumerationPtr RootPtr, void* FilePtr, const unsigned long DataSize, const bool Recursive);
STEAM_REG_DLLIMPORT EnumerationPtr STEAM_REG_CALL SteamRegParseEnum(void* FilePtr, const long DataLength);
STEAM_REG_DLLIMPORT EnumerationPtr STEAM_REG_CALL SteamRegParseKeyEnum(void* FilePtr, const long DataLength);

#ifdef __cplusplus
}
#endif

#endif /* _CLIENTREGISTRY_H_ */

_________________
- The grandmasta is in ze hood -


Top
 Profile  

Post Post subject:    
Posted: Tuesday, 25 Jan 2005, 12:26   
Eyebrows of manliness.
User avatar
Joined: Saturday, 01 Jan 2005, 14:21
Posts: 3718
Location: 日本
i have no idea what that means

_________________
Image


Top
 Profile  

Post Post subject:    
Posted: Tuesday, 25 Jan 2005, 12:29   
User Редкий гость
Joined: Monday, 27 Dec 2004, 20:00
Posts: 43
It's a C header file. How hard is it?
Would be good to have the rest?


Top
 Profile  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 4 guests


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum




Powered by phpBB® Forum Software © phpBB Group