Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | READ_ENCINT(var) |
#define | TOLOWER(x) tolower(x) |
#define | GET_UTF8_CHAR(s, e, c) |
Variables | |
static const char * | content_name = "::DataSpace/Storage/MSCompressed/Content" |
static const char * | control_name = "::DataSpace/Storage/MSCompressed/ControlData" |
static const char * | spaninfo_name = "::DataSpace/Storage/MSCompressed/SpanInfo" |
static const char * | rtable_name |
static const unsigned char | guids [32] |
#define READ_ENCINT | ( | var | ) |
|
static |
Definition at line 194 of file chmd.c.
References mschm_decompressor_p::base, mschmd_header::chunk_cache, mspack_system::close, mschmd_header::files, mspack_system::free, i, lzxd_free(), MSPACK_ERR_OK, mschmd_file::next, NULL, mschmd_header::num_chunks, and mschmd_header::sysfiles.
Referenced by chmd_real_open(), and mspack_create_chm_decompressor().
|
static |
Definition at line 1356 of file chmd.c.
References mschm_decompressor_p::base, and MSPACK_ERR_ARGS.
Referenced by mspack_create_chm_decompressor().
|
static |
Definition at line 887 of file chmd.c.
References mspack_system::alloc, mschm_decompressor_p::base, bytes, mschmd_decompress_state::chm, chmd_init_decomp(), chmd_sys_write(), mspack_system::close, fh, mschmd_header::filename, length, lzxd_decompress(), lzxd_free(), MSPACK_ERR_ARGS, MSPACK_ERR_NOMEMORY, MSPACK_ERR_OK, MSPACK_ERR_OPEN, MSPACK_ERR_READ, MSPACK_ERR_SEEK, MSPACK_ERR_WRITE, MSPACK_SYS_OPEN_READ, MSPACK_SYS_OPEN_WRITE, MSPACK_SYS_SEEK_START, NULL, mspack_system::open, mspack_system::read, run(), mspack_system::seek, mschmd_decompress_state::sys, mspack_system::tell, and mspack_system::write.
Referenced by mspack_create_chm_decompressor().
|
static |
Definition at line 534 of file chmd.c.
References mschm_decompressor_p::base, mschmd_section::chm, mspack_system::close, D, test_evm::end, EndGetI32, err, fh, mschmd_header::filename, mschmd_header::first_pmgl, mschmd_header::index_root, mschmd_file::length, memset(), MSPACK_ERR_ARGS, MSPACK_ERR_DATAFORMAT, MSPACK_ERR_OK, MSPACK_ERR_OPEN, MSPACK_SYS_OPEN_READ, n, NULL, mschmd_header::num_chunks, mschmd_file::offset, mspack_system::open, p, pmgl_NextChunk, read_chunk(), READ_ENCINT, search_chunk(), mschmd_header::sec0, mschmd_header::sec1, and mschmd_file::section.
Referenced by find_sys_file(), and mspack_create_chm_decompressor().
|
static |
Definition at line 135 of file chmd.c.
References chmd_real_open().
Referenced by mspack_create_chm_decompressor().
|
static |
Definition at line 1035 of file chmd.c.
References mschmd_sec_mscompressed::content, content_name, mschmd_sec_mscompressed::control, control_name, D, EndGetI32, err, find_sys_file(), mspack_system::free, length, mschmd_file::length, LZX_FRAME_SIZE, lzxcd_ResetInterval, lzxcd_Signature, lzxcd_SIZEOF, lzxcd_Version, lzxcd_WindowSize, lzxd_init(), MSPACK_ERR_DATAFORMAT, MSPACK_ERR_NOMEMORY, MSPACK_ERR_SIGNATURE, NULL, mschmd_file::offset, read_reset_table(), read_spaninfo(), and read_sys_file().
Referenced by chmd_extract().
|
static |
Definition at line 123 of file chmd.c.
References chmd_real_open().
Referenced by mspack_create_chm_decompressor().
|
static |
Definition at line 262 of file chmd.c.
References mspack_system::alloc, mschmd_sec_uncompressed::base, mschmd_sec_mscompressed::base, mschmd_section::chm, chmhead_GUID1, chmhead_LanguageID, chmhead_Signature, chmhead_SIZEOF, chmhead_Timestamp, chmhead_Version, chmhs0_FileLen, chmhs0_SIZEOF, chmhs1_ChunkSize, chmhs1_Density, chmhs1_Depth, chmhs1_FirstPMGL, chmhs1_IndexRoot, chmhs1_LastPMGL, chmhs1_NumChunks, chmhs1_SIZEOF, chmhst3_OffsetCS0, chmhst3_SIZEOF, chmhst_OffsetHS0, chmhst_OffsetHS1, mschmd_header::chunk_cache, mschmd_header::chunk_size, mschmd_sec_mscompressed::content, content_name, mschmd_sec_mscompressed::control, control_name, mspack_system::copy, D, mschmd_header::density, mschmd_header::depth, mschmd_header::dir_offset, test_evm::end, EndGetI16, EndGetI32, EndGetM32, fh, mschmd_file::filename, mschmd_header::files, mschmd_header::first_pmgl, mspack_system::free, guids, mschmd_section::id, mschmd_header::index_root, mschmd_header::language, mschmd_header::last_pmgl, length, mschmd_header::length, mschmd_file::length, link, mspack_system::message, MSPACK_ERR_DATAFORMAT, MSPACK_ERR_NOMEMORY, MSPACK_ERR_OK, MSPACK_ERR_READ, MSPACK_ERR_SEEK, MSPACK_ERR_SIGNATURE, MSPACK_SYS_SEEK_CUR, MSPACK_SYS_SEEK_START, name, mschmd_file::next, NULL, mschmd_header::num_chunks, mschmd_sec_uncompressed::offset, mschmd_file::offset, p, pmgl_Entries, pmgl_QuickRefSize, pmgl_Signature, mspack_system::read, READ_ENCINT, read_off64(), mschmd_sec_mscompressed::rtable, rtable_name, mschmd_header::sec0, mschmd_header::sec1, mschmd_file::section, mspack_system::seek, mschmd_sec_mscompressed::spaninfo, spaninfo_name, mschmd_header::sysfiles, mspack_system::tell, mschmd_header::timestamp, mschmd_header::version, and x.
Referenced by chmd_real_open().
|
static |
Definition at line 148 of file chmd.c.
References mspack_system::alloc, mschm_decompressor_p::base, chmd_close(), chmd_read_headers(), mspack_system::close, error(), fh, mschmd_header::filename, mschmd_header::files, mspack_system::message, MSPACK_ERR_DATAFORMAT, MSPACK_ERR_NOMEMORY, MSPACK_ERR_OK, MSPACK_ERR_OPEN, MSPACK_SYS_OPEN_READ, NULL, mspack_system::open, and mschmd_header::sysfiles.
Referenced by chmd_fast_open(), and chmd_open().
|
static |
Definition at line 1019 of file chmd.c.
References bytes.
Referenced by chmd_extract().
Definition at line 864 of file chmd.c.
References c1, c2, GET_UTF8_CHAR, s1, s2, and TOLOWER.
Referenced by search_chunk().
|
static |
Definition at line 1280 of file chmd.c.
References mspack_system::alloc, mschmd_sec_mscompressed::base, mschmd_section::chm, chmd_fast_find(), mschmd_file::filename, MSPACK_ERR_DATAFORMAT, MSPACK_ERR_NOMEMORY, MSPACK_ERR_OK, name::next, mschmd_file::section, and mschmd_header::sysfiles.
Referenced by chmd_init_decomp(), read_reset_table(), and read_spaninfo().
struct mschm_decompressor* mspack_create_chm_decompressor | ( | struct mspack_system * | sys | ) |
Creates a new CHM decompressor.
sys | a custom mspack_system structure, or NULL to use the default |
Definition at line 78 of file chmd.c.
References mspack_system::alloc, chmd_close(), chmd_error(), chmd_extract(), chmd_fast_find(), chmd_fast_open(), chmd_open(), mspack_default_system, MSPACK_ERR_OK, mspack_valid_system(), and NULL.
Referenced by main().
void mspack_destroy_chm_decompressor | ( | struct mschm_decompressor * | self | ) |
Destroys an existing CHM decompressor.
self | the mschm_decompressor to destroy |
Definition at line 104 of file chmd.c.
References mschm_decompressor_p::base, mspack_system::close, mspack_system::free, and lzxd_free().
Referenced by main().
|
static |
Definition at line 624 of file chmd.c.
References mspack_system::alloc, mschmd_header::chunk_cache, mschmd_header::chunk_size, mschmd_header::dir_offset, fh, mspack_system::free, if(), memset(), MSPACK_ERR_NOMEMORY, MSPACK_ERR_READ, MSPACK_ERR_SEEK, MSPACK_SYS_SEEK_START, NULL, mschmd_header::num_chunks, mspack_system::read, and mspack_system::seek.
Referenced by chmd_fast_find().
|
static |
Definition at line 1369 of file chmd.c.
References EndGetI32, EndGetI64, fh, mem, and mspack_system::message.
Referenced by chmd_read_headers(), read_reset_table(), and read_spaninfo().
|
static |
Definition at line 1157 of file chmd.c.
References D, EndGetI32, err, find_sys_file(), mspack_system::free, LD, mschmd_file::length, LZX_FRAME_SIZE, lzxrt_EntrySize, lzxrt_FrameLen, lzxrt_headerSIZEOF, lzxrt_NumEntries, lzxrt_TableOffset, lzxrt_UncompLen, pos, read_off64(), read_sys_file(), mschmd_sec_mscompressed::rtable, and rtable_name.
Referenced by chmd_init_decomp().
|
static |
Definition at line 1237 of file chmd.c.
References D, err, find_sys_file(), mspack_system::free, mschmd_file::length, MSPACK_ERR_DATAFORMAT, MSPACK_ERR_OK, read_off64(), read_sys_file(), mschmd_sec_mscompressed::spaninfo, and spaninfo_name.
Referenced by chmd_init_decomp().
|
static |
Definition at line 1318 of file chmd.c.
References mspack_system::alloc, mspack_system::free, if(), int, len, MSPACK_ERR_DATAFORMAT, MSPACK_ERR_NOMEMORY, MSPACK_ERR_READ, MSPACK_ERR_SEEK, MSPACK_SYS_SEEK_START, NULL, mspack_system::read, and mspack_system::seek.
Referenced by chmd_init_decomp(), read_reset_table(), and read_spaninfo().
|
static |
Definition at line 691 of file chmd.c.
References mschmd_header::chunk_size, cmp(), compare(), D, mschmd_header::density, test_evm::end, EndGetI16, EndGetI32, L, M, NULL, p, pmgi_Entries, pmgl_Entries, pmgl_QuickRefSize, R, READ_ENCINT, and start.
Referenced by chmd_fast_find().
|
static |
Definition at line 66 of file chmd.c.
Referenced by chmd_init_decomp(), and chmd_read_headers().
|
static |
Definition at line 67 of file chmd.c.
Referenced by chmd_init_decomp(), and chmd_read_headers().
Definition at line 243 of file chmd.c.
Referenced by chmd_read_headers().
|
static |
Definition at line 69 of file chmd.c.
Referenced by chmd_read_headers(), and read_reset_table().
|
static |
Definition at line 68 of file chmd.c.
Referenced by chmd_read_headers(), and read_spaninfo().