Back to legacygamers.net
WARPGATE

File

CGrfArchive, CFileSystem, CResourceMgr, CResourceCache, LZ4, zlib, libpng, ZipWriter, OLE/BIFF/Excel, CMemMappedFile

Functions 1,023Code 324 KBAddresses 0x004012B0 to 0x00EAE550Group Library
1,023 functions
AddressSizeNameDescription
0x004012B020CFileReader__init_vtableInitializes CFileReader vtable, zeros size/error/buffer fields
0x004012D042CFileReader__reset_and_free_bufferResets CFileReader error and size fields, frees buffer at offset 0xc
0x00401300202CFileReader__open_file_wideOpens file via CreateFileW for reading, gets file size with GetFileSizeEx
0x00401730113CFileReader__read_data_from_bufferReads data from CFileReader internal buffer, sets error codes 1 or 3
0x004018704CFileReader__get_file_sizeReturns CFileReader file size from offset 0x8
0x004018804CFileReader__get_error_codeReturns CFileReader error code from offset 0x4
0x0040189048CFileReader__cleanup_and_freeResets CFileReader vtable, zeros fields, frees buffer at offset 0xc
0x004018C089CFileReader__open_file_ansiConverts ANSI filename to wide char then calls open_file_wide
0x00401920178CFileReader__load_with_hash_checkLoads file and verifies MD5 hash from data+size params
0x004019E0210CFileReader__load_file_with_md5_checkOpens wide file, computes MD5 hash via mmap, then reads buffer
0x00401AC068CFileReader__destructorCFileReader destructor: resets vtable, frees buffer, optional scalar delete
0x00401B10148CFileReader__load_ansi_with_hash_checkConverts ANSI path to wide, loads file with MD5 verification
0x00401BB0131CFileReader__load_ansi_with_md5_checkConverts ANSI path to wide, loads file with MD5 check via mmap
0x0044BEC0225CResourceMgr__init_sprite_managerInits sprite resource manager vtable, registers as sprite type
0x0044BFB0225CResourceMgr__init_model_managerInits model resource manager vtable, registers as model type
0x0044C1A0157CResourceMgr__init_generic_mgr_0044c1a0Inits resource manager for unnamed type, registers with system
0x0044C340123CResourceMgr__init_texture_mgr_aInits texture resource manager instance A
0x0044C3C0123CResourceMgr__init_texture_mgr_bInits texture resource manager instance B
0x0044C440123CResourceMgr__init_texture_mgr_cInits texture resource manager instance C
0x0044C4C0123CResourceMgr__init_texture_mgr_dInits texture resource manager instance D
0x0044C540204CResourceMgr__init_texture_mgr_complexInits texture manager with extended fields, registers with system
0x0044C710137CResourceMgr__init_emblem_managerInits emblem texture resource manager for tmpEmblem files
0x0044C8A0282CResourceMgr__init_texture_effect_mgrInits texture effect manager with 0x380 array, STL string
0x0044CAC0344CResourceMgr__init_complex_resource_mgrInits complex resource manager with STL string at offset
0x0044CD20157CResourceMgr__init_named_mgr_0044cd20Inits named resource manager, registers with system
0x0044CEC0299CResourceMgr__init_model_list_mgrInits model resource manager with two linked lists for tracking
0x0044CFF0153CResourceMgr__init_3dmob_model_mgrInits 3D mob model resource manager, registers as model_3dmob
0x0044D090123CResourceMgr__init_model_variant_mgrInits model variant resource manager with custom constructor
0x0057B94054CFileStream__close_handleCloses file handle or frees stream buffer
0x0057B980404CFileStream__read_and_decryptReads and decrypts file data
0x0057BB50203CFileSystem__file_exists_checkChecks if file exists
0x0057BC201034CFileSystem__normalize_pathNormalizes file path
0x0057C030431CFileStream__openOpens file for reading/writing
0x0057C1E0125CFileStream__readReads bytes from file stream
0x0057C260107CFileStream__read_with_advanceReads bytes and advances position
0x0057C2D097CFileStream__seekCfilestream: seek, small utility function
0x0057C34050CFileStream__writeWrites bytes to file
0x005B8410236CFileStream__open_csv_fileOpens file for CSV reading; validates path, detects BOM encoding, skips UTF-8 BOM, rejects UTF-16
0x005ED5B029CGrfFileRecord__copy_range_backwardCopies a range of GRF file record data backward (from end to adjusted position). Used for shifting elements during vector insert operations. Computes destination as param_3 - (param_2 - param_1).
0x005ED5D029CGrfFileRecord__copy_range_backward_BCopies a range of GRF file record data backward. Identical implementation to copy_range_backward at 005ed5b0 - separate instantiation for a different element type.
0x005ED5F034CGrfFileRecord__copy_range_forwardCopies a range of bytes forward via memcpy. Returns pointer past the end of the destination. Used in GRF file record vector operations.
0x005EE270423CGrfFileRecord__make_heapBuilds a max-heap from an array of 0x120-byte GRF file records (Floyd's algorithm). Starts from the middle element and sifts down each element. Uses CGrfFileRecord__compare_less_than for ordering. Part of STL sort implementation for GRF files.
0x005EE420207CGrfFileRecord__median_of_three_sortPerforms median-of-three selection and sorting for 3 GRF file record elements. Compares and swaps elements to place the median in the middle position. Used as pivot selection for introsort. Element size: 0x120 bytes (72 dwords).
0x005EE4F034CGrfFileRecord__copy_range_forward_BCopies a range of bytes forward via memcpy. Returns pointer past end of destination. Same as CGrfFileRecord__copy_range_forward but separate template instantiation.
0x005EE52034CGrfFileRecord__copy_range_forward_CCopies a range of bytes forward via memcpy. Returns pointer past end of destination. Same as CGrfFileRecord__copy_range_forward but another template instantiation.
0x005EE550990CGrfFileRecord__introsort_partitionIntrosort partition (Hoare scheme) for 0x120-byte GRF file records. Selects pivot via median-of-three, then partitions array into elements less than and greater than pivot. Returns partition boundaries via param_1 output array. Handles equal-to-pivot elements specially to avoid worst-case behavior.
0x005EE930255CGrfFileRecord__heap_sift_downHeap sift-down operation for 0x120-byte GRF file records. Moves an element down the heap from position param_2 until heap property is restored. Compares children, swaps with larger child, then sifts the displaced element back up. Element size: 72 dwords.
0x005EEA30692CGrfFileRecord__introsortHybrid introsort for 0x120-byte GRF file records. Uses quicksort with median-of-three pivot selection. Falls back to heapsort when recursion depth (param_3) reaches 0. Uses insertion sort for small ranges (<0x21 elements / 0x2520 bytes). Recursion depth reduced by 3/4 each level.
0x005EECF052CGrfFileRecord__copy_range_to_destCGrfFileRecord: copy range to dest
0x005EEED067CGrfArchive__delete_node_12bytesDeletes a 12-byte (0xC) heap allocation stored at offset+4 of the object. Part of CGrfArchive tree node cleanup. SEH protected.
0x005EEF2067CGrfArchive__delete_node_32bytesDeletes a 32-byte (0x20) heap allocation stored at offset+4 of the object. Part of CGrfArchive tree node cleanup. SEH protected.
0x005EEF7067CGrfArchive__delete_node_32bytes_v2Deletes a 32-byte (0x20) heap allocation stored at offset+4 of the object. Duplicate of 005eef20 with different SEH unwind label. Part of CGrfArchive tree node cleanup.
0x005EEFC067CGrfArchive__delete_node_40bytesDeletes a 40-byte (0x28) heap allocation stored at offset+4 of the object. Part of CGrfArchive tree node cleanup. SEH protected.
0x005EF01078CGrfArchive__delete_node_12bytes_v2Deletes a 12-byte (0xC) heap allocation stored at offset+4 of the object. Variant with different SEH unwind setup order. Part of CGrfArchive tree node cleanup.
0x005EF060111CGrfArchive__destroy_linked_list_and_sentinelIterates a linked list of 0x20-byte nodes, calls a cleanup function on each node's data (offset+8), deletes each node, then deletes the sentinel node. Part of CGrfArchive tree/list destruction.
0x005EF0E076CGrfArchive__destroy_tree_and_sentinel_40bytesDestroys a red-black tree by calling stub_005edbd0 to erase all child nodes from the root, then frees the 0x28-byte sentinel node. Part of CGrfArchive cleanup.
0x005EF14078CGrfArchive__delete_node_32bytes_v3Deletes a 32-byte (0x20) heap allocation stored at offset+4 of the object. Variant with different SEH unwind setup. Part of CGrfArchive tree node cleanup.
0x005EF19078CGrfArchive__delete_node_32bytes_v4Deletes a 32-byte (0x20) heap allocation stored at offset+4 of the object. Another variant with different SEH unwind setup. Part of CGrfArchive tree node cleanup.
0x005EF1E0104CGrfArchive__destroy_node_with_string_40bytesDestroys a 0x28-byte node that contains an embedded std::string. First destructs the string via STL_string_dtor, then frees the 40-byte allocation. Part of CGrfArchive tree node cleanup.
0x005EF25078CGrfArchive__delete_node_32bytes_v5Deletes a 32-byte (0x20) heap allocation stored at offset+4 of the object. Yet another variant with different SEH unwind label. Part of CGrfArchive tree node cleanup.
0x005EF2A078CGrfArchive__delete_node_32bytes_v6Deletes a 32-byte (0x20) heap allocation stored at offset+4. Part of CGrfArchive tree node cleanup.
0x005EF2F078CGrfArchive__delete_node_40bytes_v2Deletes a 40-byte (0x28) heap allocation stored at offset+4. Part of CGrfArchive tree node cleanup.
0x005EF34065CGrfArchive__destroy_linked_list_wrapperWrapper that calls CGrfArchive__destroy_linked_list_and_sentinel (005ef060) to destroy the linked list. SEH protected wrapper.
0x005EF39087CGrfArchive__destroy_tree_and_sentinel_40bytes_v2Destroys a red-black tree by erasing all child nodes from the root, then frees the 0x28-byte sentinel node. Variant of 005ef0e0 with different SEH unwind setup.
0x005EF400100CGrfArchive__dtor_baseCGrfArchive base destructor. Sets vtable to derived class vtable, calls cleanup function (005f7810), deallocates a vector buffer, then sets vtable to base class (_Facet_base). Does NOT free the object itself.
0x005EF470107CGrfArchive__dtor_completeCGrfArchive complete destructor. Like dtor_base (005ef400) but with additional cleanup steps (state index 2 vs 1). Sets vtable, calls cleanup, deallocates vector, resets to base vtable.
0x005EF5A094CGrfArchive__compare_file_offsetCompares two GRF file offset entries. Compares first field (uint), then compares a 64-bit offset composed of fields at index 2 and 3. Returns 1 if first < second, 0 otherwise. Used for sorting/searching file offsets in the GRF archive.
0x005EF60093CGrfArchive__compare_file_record_keyCompares two GRF file record keys. Compares a 64-bit value (fields 0+1), then if equal, compares field 2 as a tiebreaker. Returns 1 if first < second, 0 otherwise. Used for tree ordering of file records.
0x005EF690121CGrfArchive__scalar_deleting_dtorCGrfArchive scalar deleting destructor. Calls full destructor (cleanup, vector dealloc, vtable reset to base), then optionally frees the 0x20-byte object if bit 0 of param is set.
0x005EF710128CGrfArchive__scalar_deleting_dtor_v2CGrfArchive scalar deleting destructor variant. Uses state index 2 for more thorough cleanup, then optionally frees the 0x20-byte object if bit 0 of param is set.
0x005EF790188CGrfArchive__add_grf_entry_to_listAdds a GRF entry (param_2) to the linked list at this+0x148. Allocates a 0xC-byte list node, stores the entry pointer at node+8, links it into the doubly-linked list. Increments count at this+0x14C. Throws std::_Xlength_error if list is at max capacity (0x15555555). Then updates the file name set at this+0x150.
0x005EF850330CGrfArchive__reset_all_entriesResets the CGrfArchive to empty state. Calls cleanup on internal data, resets GRF entry state via CGrfEntry__reset_state, iterates the GRF entry list (this+0x148) calling virtual destructors on each entry, frees all list nodes, reinitializes the linked list sentinel, clears the file name tree (this+0x150), shrinks/deallocates multiple vectors (file records at 0x24/0x30, gap list at 0x158) and resets their sizes.
0x005EF9A021254CGrfArchive__init_des_encryption_tablesCGrfArchive: init des encryption tables
0x005F4CB0790CGrfArchive__build_free_space_mapBuilds a free-space (gap) map for the GRF archive. Starts with offset 0x2E (after GRF header), adds the archive's own offset range (this+0x18..0x20), then iterates file records at this+0x24 adding each file's offset+0x2E with its size. For each gap between entries, inserts a node into a red-black tree (free space map). Finally checks total file size and adds trailing free space if needed.
0x005F4FD0477CGrfArchive__read_and_decrypt_file_dataReads file data from a GRF entry and optionally decrypts it. Reads raw data via virtual call on this+8. If file is compressed (flag bit 7), just copies raw data. Otherwise builds a DES key from the filename, generates DES subkeys, and decrypts using either single-pass (flag & 4) or multi-pass (flag & 2) DES encryption based on a digit-count cipher mode. Clears encryption flags and copies result to output buffer.
0x005F51B081CGrfArchive__build_filename_indexIterates all file records in the vector at (param+0x24..param+0x28) with 0x120-byte stride. For each record that has a file extension (strrchr for '.'), adds its filename to an index/set structure. Used to build a filename lookup for the GRF archive.
0x005F5210164CGrfArchive__allocate_space_for_fileAllocates space in the GRF archive for a file of given size. Searches the free-space tree (this+0x164) for a gap that fits. If no gap found, gets the total archive size and returns the end-of-file offset. If a gap is found but larger than needed, splits the gap and adds the remainder back. Removes the used gap node from the tree. Returns the allocated offset as a 64-bit value.
0x005F52C0134CGrfArchive__calculate_total_file_data_sizeIterates all nodes in the free-space tree (this+0x164) and sums up the size field (offset+0x10) of each node. Returns the total size as a 64-bit value. This computes the total amount of file data stored in the GRF archive.
0x005F5350125CGrfArchive__read_file_table_from_entriesReads the file table by iterating GRF entries in the linked list (this+0x148). For each entry, calls CGrfEntry__read_file_table_data. Stops when data is read successfully (param_2[1] != param_2[0]). If no entry provides data, falls back to copying from a default buffer at this+0x194..0x198. Reserves more space in the output vector if needed.
0x005F53D01508CGrfArchive__save_archiveSaves the GRF archive to disk (1,508 bytes). Calls init_des_encryption_tables, then build_free_space_map. Iterates all file names in the tree (this+0x150), setting each file record's name. For each file, reads the entry data, sorts records, serializes file record headers and data into a byte buffer, compresses with zlib, reads the existing file table, allocates space for the compressed table + file table, writes the compressed table header (12 bytes: file_table_size, compressed_size, uncompressed_size), writes compressed data, writes file table, and writes the 'Event Horizon' GRF header at offset 0x1E with file count and version 0x300. Reports progress via callback.
0x005F59C071CGrfArchive__open_and_loadOpens a GRF archive file and loads its contents. Calls open_file (005f7890), then parses the GRF header via CGrfEntry__parse_header_and_load on the file handle at this+0x170, and reads the file table data into buffer at this+0x194. Returns 1 on success, 0 on failure.
0x005F5A102307CGrfArchive__import_grf_and_mergeImports files from another GRF archive and merges them into this archive (2,307 bytes). Opens the source GRF, reads its 'Event Horizon' header, iterates file entries in the source tree, for each file: reads its name, finds the corresponding record, allocates a decompression buffer, calls read_and_decrypt_file_data, allocates space in this archive, writes the file data to the new location, serializes file record headers, compresses the file table with zlib, reads the existing file table, writes header+compressed table+file table, then writes the GRF header with updated file count. Reports progress via callback.
0x005F6320594CGrfArchive__add_or_replace_fileAdds or replaces a file in the GRF archive (594 bytes). Iterates GRF entries looking for a file record matching the given name. If found, reads and decrypts the file data, allocates space in the archive, writes the data at the allocated offset, then binary-searches the file record vector to find the insertion/replacement point. If record exists, overwrites it; if not, appends to the record vector (expanding at this+0x158..0x15C). Returns 1 on success, 0 on failure.
0x005F66F0123CGrfArchive__alloc_aligned_bufferAllocates an aligned byte buffer for GRF file data. For sizes < 0x1000, does a simple allocation. For sizes >= 0x1000, allocates size+0x23 bytes and aligns the result to a 32-byte boundary, storing the original allocation pointer at aligned_ptr-4 for later freeing. Initializes a 3-element vector header (base, end, capacity). Throws on overflow or allocation failure.
0x005F6770122CGrfArchive__replace_file_record_vectorReplaces the file record vector's backing buffer. Frees the old buffer (handling aligned allocations >= 0x1000 via the stored original pointer at base-4). Replaces with new buffer pointer param_2, setting count = param_3 * 0x120 + base and capacity = param_4 * 0x120 + base. 0x120 is the size of one GRF file record.
0x005F67F0704CGrfArchive__rbtree_erase_nodeRed-black tree node erasure for CGrfArchive's free-space tree (704 bytes). Standard RB-tree deletion: finds successor, splices out the node, performs rotations and recoloring to maintain RB-tree invariants. Handles all cases: node with two children (swap with successor), node with one child, leaf node. Decrements the tree size counter. Returns the removed node pointer (caller must free it).
0x005F6AB03CGrfArchive__identity_returnIdentity function that returns its parameter unchanged. 3-byte function (just returns param_1). Likely a trivial converter or type-cast stub in the CGrfArchive subsystem.
0x005F7150260CGrfArchive__reallocate_byte_bufferReallocates a byte buffer (vector-like). Allocates a new buffer of specified size (with 32-byte aligned allocation for sizes >= 0x1000), copies existing data from old buffer, frees the old buffer, and updates the vector header (base, used, capacity). Used for growing byte vectors in CGrfArchive operations.
0x005F73A0151CGrfArchive__free_file_record_vectorFrees the file record vector's backing buffer. Handles aligned allocations (>= 0x1000) by reading the original allocation pointer at base-4. Zeroes out the vector header (base, used, capacity). Part of CGrfArchive cleanup. 0x120 is the file record stride.
0x005F744036CGrfArchive__memcpy_file_recordsCopies file record data from source range [param_1, param_2) to destination param_3 via memcpy. Returns the new destination end pointer (param_3 + bytes_copied). Used during file record vector reallocation to copy existing records to a new buffer.
0x00643330109CFileSystem__resize_cipher_output_bufferResizes the output buffer (offset 0x20) to match the size returned by the vtable method at offset 0x8. Calls resize_cipher_buffers first to resize the other two internal buffers.
0x006433A0182CFileSystem__resize_cipher_buffersResizes two internal cipher buffers (offsets 0x8 and 0x14) to match the size returned by the vtable method. Zero-fills any new space. Part of cipher state initialization.
0x0064346021CFileSystem__finalize_cipherFinalizes cipher and clears key material
0x0064348046CFileSystem__setup_aes_contextSets up AES context with key and IV
0x006434B0331CFileSystem__xor_buffersXORs two source buffers (param_2, param_3) into destination (param_1) for param_4 bytes. Processes 16 bytes at a time in the fast path, with SIMD-unrolled 64-byte inner loop when buffers don't overlap. Used as a building block for CBC-mode XOR step.
0x00643600260CFileSystem__xor_buffer_inplaceXORs buffer param_2 into buffer param_1 in-place for param_3 bytes. Processes 16 bytes at a time, with SIMD-unrolled 64-byte inner loop for non-overlapping buffers. Used for CBC-mode decryption XOR step.
0x00643710221CFileSystem__bswap32_bufferByte-swaps an array of 32-bit integers from param_2 into param_1. Processes param_3/4 dwords. Uses SSSE3 pshufb for fast 16-byte batches, scalar fallback reverses bytes via shifts. Converts between big-endian and little-endian representation.
0x0064386017CFileSystem__is_encryption_enabledReturns whether file encryption is enabled
0x00643CC017CFileSystem__is_compression_enabledCFileSystem: is compression enabled
0x0064413029CFileSystem__get_cipher_block_sizeReturns cipher block size for current mode
0x0065C94087CResourceCache__expire_old_entriesRemoves expired entries from the timed deque. Entries older than 60 seconds (60000ms via timeGetTime) are popped from the front. Decrements count and advances front index.
0x0065C9A0225CResourceCache__deque_find_and_popSearches the pair-deque for a matching (key1, key2) entry using a secondary lookup table. If found, pops from front via deque_pop_front and returns the pair. If not found, returns (0,0).
0x0065CA90252CResourceCache__deque_push_backSearches the pair-deque for an existing (param_2, param_3) entry. If not found, grows the buffer if needed and appends the new pair at the back. Allocates 0x10 byte blocks for storage.
0x0065CB90415CResourceCache__process_and_register_sky_textureCombines expire_old_entries + deque_find_and_pop. If a matching entry is found, calls CSkyDataProviderB__register_sky_texture with the pair values, timestamps it via timeGetTime, and pushes to the timed deque (with 12-byte entries: pair + timestamp).
0x0065CD30417CResourceCache__deque_grow_buffer_8byteGrows the circular deque buffer for 8-byte elements (pairs). Doubles capacity, allocates new aligned buffer, copies existing data preserving circular layout, frees old buffer. Throws _Xlength_error if overflow.
0x0065CEE0400CResourceCache__deque_grow_buffer_12byteGrows the circular deque buffer for 12-byte elements (pair + timestamp). Same doubling/copy/free logic as the 8-byte variant. Used by the timed entry deque. Throws _Xlength_error if overflow.
0x0065D0A018CResourceCache__deque_pop_frontPops the front element from the deque. Decrements count at offset+0x10. If count becomes 0, resets front index to 0. Otherwise advances front index at offset+0xc.
0x0065D760272CResourceCache__ctorCResourceCache constructor. Initializes: vtable, rbtree with 0x1c head node (uint set), rbtree with 0x28 head node (string map), deque/vector (blocks 9-11), max_size=0xC800, creates file handle via CPacketStream__construct_0065c5f0.
0x0065DBC0200CResourceCache__dtorCResourceCache destructor. Sets vtable, destroys file handle (virtual call), frees deque blocks, destroys string map rbtree (0x28 nodes with strings), destroys uint set rbtree (0x1c nodes). SEH protected with staged cleanup.
0x0065DC9068CResourceCache__deque_free_blocksFrees the deque block array via STL_vector_dealloc_raw_buffer_v2. SEH protected wrapper used during CResourceCache destruction.
0x0065DED0221CResourceCache__scalar_deleting_dtorCResourceCache scalar deleting destructor. Cleans up file handle, deque blocks, string map rbtree, uint set rbtree, then optionally frees 0x34 bytes of memory if param_2 & 1.
0x0065DFB0623CResourceCache__register_directory_entryRegisters a file path in the directory-keyed string map. Extracts directory prefix (up to last backslash). Looks up the directory in the rbtree; if not found, inserts a new node. Uses Insert_node for rbtree insertion. Checks map size limit (0x6666666).
0x0065E220109CResourceCache__create_file_handleCreates a new file handle object (0x2C bytes) via CPacketStream__construct_0065c5f0 and stores it at this+0x10. Returns true if allocation succeeded.
0x0065E290373CResourceCache__get_or_create_instanceSingleton accessor for CResourceCache. Creates instance at global DAT_0138cf20 if null. Initializes full CResourceCache (rbtrees, deque, file handle). Returns 1 on success, 0 on failure (destroys instance if file handle creation fails).
0x0065E41025CResourceCache__destroy_file_handleDestroys the file handle object at this+0x10. Calls virtual destructor (vtable[0]) with delete flag=1, then nulls the pointer.
0x0065E43027CResourceCache__destroy_singletonDestroys the CResourceCache singleton at DAT_0138cf20. Calls virtual destructor with delete flag=1, then nulls the global pointer.
0x0065E450491CResourceCache__load_resource_fileLoads a resource file by ID. Uses _Find_lower_bound to search the uint rbtree. If found and value > 0, builds cache path, gets CResourceMgr instance, and loads via CResourceMgr__load_resource_by_string. Falls back to secondary rbtree if first load fails and DAT_016f7144==0. Returns result as std::string.
0x0065E64065CResourceCache__lookup_by_idLooks up a resource ID in the uint rbtree using _Find_lower_bound. Returns the associated value (at node+0x18) if found, 0 otherwise.
0x0065E69095CResourceCache__insert_or_update_by_idInserts or updates a uint rbtree entry. Looks up key via _Find_lower_bound. If found, updates the value by calling deque_push_back. If not found, also calls deque_push_back with value=0.
0x0065E6F0414CResourceCache__has_directory_entryChecks if a file path's directory exists in the string map rbtree. Extracts directory prefix (up to last backslash), looks up in rbtree via STL_rbtree_lower_bound_string. Returns true if directory entry found, false otherwise.
0x0065E8901132CResourceCache__compress_and_save_to_fileMajor file caching function. Formats a string (vsnprintf), builds cache path, compresses data via zlib. Creates output directory if needed (_mkdir). Opens stringstream, writes header + compressed size. Iterates directory files, deleting old cache entries (_chmod+_unlink). Writes compressed data to file via fopen/fwrite/fclose. Falls back to register_directory_entry on compression failure.
0x0065ED00309CResourceCache__build_cache_pathBuilds a cache file path using stringstream. Reads base path from global DAT_01732d98 (std::string), appends separator and version/hash (param_2 with 0x7FFFFFFF offset), converts to std::string via str(). Result stored in param_1.
0x0065EE408CResourceCache__process_sky_texture_staticStatic wrapper that calls CResourceCache__process_and_register_sky_texture. Simple thunk/forwarding function (8 bytes).
0x0065EE5066CResourceCache__notify_ui_windowNotifies a UI window after resource loading. Calls get_field4_if_mode1 to check mode, processes multibyte string if active (mbstr_to_wstr_and_process_b). Finds UI window type 0x3C via CUIWindowMgr and calls virtual method at vtable+0x98.
0x0065EEA0245CResourceCache__set_id_map_entrySets/inserts an entry in the uint-keyed rbtree (std::map<uint, value>). Uses _Find_lower_bound to locate insertion point. If key not found, allocates a 0x1c byte node, inserts via Insert_node. Sets value at node+0x18 to param_3. Throws if map exceeds 0x9249249 entries.
0x0065F2B0151CResourceCache__entry_ctorCResourceCache entry constructor. Copies vtable from param_3, zeros 0x30 bytes of fields, initializes two SSO strings (capacity=0xF) and three counters to 0. Entry size is 0x34 bytes.
0x006E806051LZ4__set_dictionary_streamSets external dictionary buffer for LZ4 streaming compression context
0x006E80A080LZ4__compress_defaultLZ4 default compression with auto-calculated max output size bound
0x006E80F044LZ4__compress_boundReturns worst-case compressed size for given input size, 0 if too large
0x006E812065LZ4__compress_fast_extstateLZ4 fast compression using external state buffer, auto-calculated bound
0x006E817027LZ4__compress_dest_size_wrapperWrapper for LZ4 compression with explicit destination size limit
0x006E819067LZ4__compress_dest_size_stackLZ4 compression with stack-allocated 16KB hash table for destination-size mode
0x006E81E02831LZ4__compress_generic_smallLZ4 core compression for small inputs (<64KB), uses 16-bit hash table entries
0x006E8D6069LZ4__compress_fast_stackLZ4 fast compression with stack-allocated 16KB state buffer
0x006E8DB08670LZ4__compress_generic_largeLZ4 core compression for large inputs (>64KB), uses 32-bit hash table with acceleration
0x006EAF904947LZ4__compress_generic_fullFull LZ4 compression with configurable acceleration, handles both small and large inputs
0x006EC3D04805LZ4__compress_HCLZ4 high-compression mode with optimal match search for better ratios
0x006EE1802831LZ4__compress_HC_optimalLZ4 HC optimal parsing compression for maximum compression ratio
0x006EEC9027LZ4__compress_fast_with_dest_sizeLZ4 fast compression wrapper with explicit destination size, acceleration=1
0x006EECB030LZ4__compress_extstate_largeLZ4 compression using external state for large buffers, acceleration=1
0x006EECD030LZ4__compress_extstate_fullLZ4 full compression using external state buffer, acceleration=1
0x006EECF065LZ4__compress_fast_auto_boundLZ4 fast compression with auto-calculated output bound, acceleration=1
0x006EEDB039LZ4__decode_boundReturns max decompressed size for given compressed input size, min 16 bytes
0x006EEDE0245LZ4__decompress_safeLZ4 safe decompression with bounds checking, returns compressed bytes consumed
0x006EEEE0489LZ4__decompress_safe_continueLZ4 streaming decompression with dictionary continuation support
0x006EF0D0333LZ4__decompress_safe_with_dictLZ4 safe decompression using external dictionary for back-references
0x006EF220285LZ4__decompress_safe_partialLZ4 partial decompression with dictionary prefix support
0x006EF340245LZ4__decompress_safe_64kLZ4 safe decompression for data compressed with 64KB window limit
0x006EF4401549LZ4__decompress_fastLZ4 fast decompression with optimized copy loops, known output size
0x006EFA502085LZ4__decompress_fast_continueLZ4 fast streaming decompression with dictionary continuation
0x006F02801982LZ4__decompress_fast_with_dictLZ4 fast decompression using external dictionary for back-references
0x006F0A401576LZ4__decompress_fast_partial_dictLZ4 fast partial decompression with external dictionary support
0x006F10701944LZ4__decompress_safe_partial_dictLZ4 safe partial decompression with external dictionary support
0x006F1810132LZ4__decompress_dispatchLZ4 decompression dispatcher: routes to LZ4__decompress_fast_partial_dict, LZ4__decompress_safe_partial_continue, LZ4__decompress_safe_partial_dict_continue, or LZ4__decompress_safe_partial_dict based on dictionary size and buffer adjacency.
0x006F18A01561LZ4__decompress_safe_partial_continueLZ4 safe partial decompression with 64KB sliding window. Reads literal/match tokens, copies literals, resolves back-references with bounds checking. Previously misnamed as compress_continue_generic.
0x006F1EC01593LZ4__decompress_safe_partial_dict_continueLZ4 safe partial decompression with external dictionary prefix. Similar to decompress_safe_partial_continue but handles dictionary-relative back-references. Previously misnamed as compress_continue_dest_size.
0x006F2500120LZ4__decompress_fast_dispatchLZ4 fast decompression dispatcher: routes to LZ4__decompress_fast, LZ4__decompress_fast_optimized, LZ4__decompress_fast_dict_optimized, or LZ4__decompress_fast_with_dict based on dictionary params.
0x006F25801550LZ4__decompress_fast_optimizedLZ4 fast decompression with optimized 16-byte/32-byte block copy loops and small-offset special handling. Uses known output size. Previously misnamed as compress_HC_continue.
0x006F2B901566LZ4__decompress_fast_dict_optimizedLZ4 fast decompression with dictionary-relative back-references and optimized block copy loops. Uses known output size. Previously misnamed as compress_HC_continue_dest_size.
0x006F31B024LZ4__stream_free_safeFrees LZ4 stream state with null check, returns 0
0x006F31D024LZ4__decode_stream_freeFrees LZ4 decompression streaming state with null check
0x006F31F051LZ4__init_stream_stateInitializes LZ4 stream state buffer, requires 4-byte alignment and min 0x4020 size
0x006F3230148LZ4__load_dictLoads dictionary into LZ4 stream state, populates hash table from dict data
0x006F32D0131LZ4__renorm_dict_entriesRenormalizes LZ4 hash table entries when offset exceeds 2GB to prevent overflow
0x006F336023LZ4__reset_stream_stateZeroes out entire LZ4 stream state (0x4014 bytes)
0x006F338025LZ4__reset_stream_and_returnZeroes LZ4 stream state and returns 0 (success code)
0x006F33A0124LZ4__stream_reset_partialPartial reset of LZ4 stream, clears hash table if mode changed or offset too large
0x006F342079LZ4__save_dictCopies last 64KB of dictionary from stream to external buffer for reuse
0x006F347048LZ4__decode_stream_initInitializes LZ4 decompression stream context with output buffer pointers
0x006F34C014LZ4__get_stream_dict_ptrReturns pointer to current dictionary base from LZ4 stream state
0x006F34D09LZ4__decompress_safe_thunkThunk to LZ4_decompress_safe
0x006F34E09LZ4__decompress_fast_thunkThunk to LZ4_decompress_fast
0x006F351037LZ4__read_variable_lengthReads LZ4 variable-length integer from byte stream (0xFF continuation encoding)
0x00732D6080CFileLogger__ctorConstructor for CFileLogger. Initializes vtable, sets log enabled flag, initializes critical section for thread safety, then calls initialize_log_file to set up the log directory and first log file. Object size is 0x834 bytes.
0x00732DB065CFileLogger__dtorDestructor for CFileLogger. Sets vtable and deletes the critical section.
0x00732E0093CFileLogger__scalar_deleting_dtorScalar deleting destructor for CFileLogger. Calls destructor, then optionally frees the 0x834-byte object.
0x00732E701126CFileLogger__initialize_log_fileInitializes the file logger's log directory and file. Creates the log directory, generates a date-based filename pattern, cleans up old log files older than the cutoff date, then finds or creates the current log file. Supports file rotation when log exceeds 3MB (0x300000 bytes). Returns true if file index < 10000.
0x007332E0468CFileLogger__cleanup_old_logsCleans up old log files that are older than param_3 days. Searches the log directory for files matching the logger's prefix, compares filenames against a date-based cutoff string, and deletes (unlinks) any files that are too old.
0x007334C0797CFileLogger__write_log_entryWrites a formatted log entry to the current log file. Thread-safe via scoped lock. Handles date rollover by creating new files when the date changes. Formats the entry with timestamp (YYYY-MM-DD HH:MM:SS.ms), source file, and line number. Rotates to a new file when size exceeds 3MB.
0x007337F017CFileLogger__set_enabledSets the enabled flag for the file logger at offset +5. When disabled, conditional logging calls will not write to file.
0x00733810757CFileLogger__write_log_rawWrites a raw string log entry (param_4 is the string, not varargs). Same log file rotation and timestamping logic as write_log_entry. Thread-safe with scoped lock. Only writes if logger and params are non-null.
0x00733B10807CFileLogger__write_log_if_enabledWrites a formatted log entry only if the logger's enabled flag (offset +5) is set. Same logic as write_log_entry but with an additional enabled check. Thread-safe with scoped lock.
0x00733E40106CLoggerMap__destroy_tree_nodesRecursively destroys all nodes in a red-black tree used by CLoggerMap. Each node is 0x814 bytes (contains an embedded CFileLogger). Traverses left subtrees recursively and right subtrees iteratively.
0x00733EB075CLoggerMap__lower_boundPerforms a lower_bound search in the CLoggerMap's red-black tree. Searches for a node with key >= param_3. Returns an iterator-like struct with the found node, comparison result, and parent.
0x00733F00141CLoggerMap__ctorConstructor for CLoggerMap (a std::map-like container for CFileLogger instances). Initializes vtable, creates a 0x814-byte sentinel/header node for the red-black tree, and initializes a critical section. Node count stored at offsets +7 and +8.
0x00733F9070CLoggerMap__free_sentinel_nodeFrees the 0x814-byte sentinel node from the CLoggerMap tree if it exists.
0x00733FE079CLoggerMap__clear_and_freeClears all nodes from the CLoggerMap tree by calling destroy_tree_nodes on the root, then frees the sentinel node.
0x0073404081CLoggerMap__free_node_aFrees a single 0x814-byte tree node from the CLoggerMap if the node pointer is non-null.
0x007340A081CLoggerMap__free_node_bFrees a single 0x814-byte tree node from the CLoggerMap if the node pointer is non-null. Duplicate of free_node_a, possibly for a different calling context.
0x0073410090CLoggerMap__clear_treeClears all nodes from the CLoggerMap tree by calling destroy_tree_nodes on the root subtree and then freeing the sentinel node (0x814 bytes).
0x00734160130CLoggerMap__dtorDestructor for CLoggerMap. Sets vtable, deletes critical section, then destroys all tree nodes and frees the sentinel.
0x007341F0242CLoggerMap__find_or_insertFinds an existing logger entry in the map by key, or inserts a new one if not found. Uses lower_bound to locate the position, allocates a 0x814-byte node (containing an embedded CFileLogger buffer of 0x800 bytes), and inserts into the red-black tree. Returns pointer to the logger data at node+0x14.
0x007342F0153CLoggerMap__scalar_deleting_dtorScalar deleting destructor for CLoggerMap. Calls destructor logic then optionally frees the 0x24-byte object.
0x00734390209CLoggerMap__get_thread_bufferGets or creates the per-thread log buffer. Uses the current thread handle as a key to look up in the CLoggerMap. If the thread's buffer doesn't exist yet, inserts a new zeroed 0x800-byte buffer. Thread-safe with scoped lock.
0x0074C9D032png_read_callbackPNG read callback used with libpng. Wraps std::basic_istream::read to provide data from a stream to the PNG decoder.
0x00755710121CFileStreamEntry__ctorConstructor for CFileStreamEntry. Sets vtable, initializes file handle to -1, zeroes buffer fields, initializes an SSO string.
0x0076B873239CFileReader__LoadWithMD5CheckLoads a file with MD5 integrity check. Acquires mutex (FUN_00737130), calls CFileReader__load_ansi_with_md5_check. On failure, gets error code, formats error string "%s (%d)", logs via FUN_0076dfa0 with source path "C:\\repositories\\RagnarokClient\\R..." at line 0x8c. Returns 1 on success, 0 on failure.
0x0076B973236CFileReader__LoadWithHashCheckLoads a file with hash integrity check. Acquires mutex, calls CFileReader__load_ansi_with_hash_check with 3 params. On failure, gets error code, formats error string, logs via FUN_0076dfa0 at line 100 (0x64). Returns 1 on success, 0 on failure.
0x0076BA60228CFileReader__LoadBasicBasic file load without integrity check. Acquires mutex, calls thunk_00401640 for reading. On failure, gets error code, formats error string, logs via FUN_0076dfa0 at line 0x42. Returns 1 on success, 0 on failure.
0x00AE99D0543CGrfMgr__create_and_add_entryCreates a new GRF entry pair (0x148-byte timer manager + 0x40-byte sub-manager), links them into the 0x10-byte linked list at param_1. Initializes critical section, vtables. Calls FUN_00aebdb0 to process the new entry. Throws list_too_long if at max.
0x00AE9BF043CGrfMgr__load_fileLoads a file, first trying disk (load_file_from_disk), then GRF archive (load_file_from_grf) if disk fails.
0x00AE9FE0255CGrfMgr__load_file_from_grfLoads a file from a GRF archive. Iterates GRF entries in the linked list, calls FUN_00aeba30 to find the file. Allocates buffer via VirtualAlloc, extracts via FUN_00aeb710. Returns buffer or NULL.
0x00AEA0E0163CGrfMgr__file_existsChecks if a file exists in GRF archives or on disk. If param_3==0, searches GRF entries first via FUN_00aeba30. Always checks disk via FindFirstFileA. Returns 1 if found, 0 if not.
0x00AEA1F3513CGrfMgr__find_best_grf_dataIterates all GRF entries, extracts file listing data from each, and keeps the best (largest) version in a byte vector. If found, applies the data to all GRF entries via FUN_00aec9f0.
0x00AEB710798CGrfEntry__extract_fileExtracts a file from a GRF archive entry. Reads compressed data from the GRF file, then based on file flags: (1) encrypted+compressed: uses PacketCrypto__decrypt_and_verify, (2) DES encrypted: derives key from filename, uses CDesCipher, (3) DES+cycle encrypted: similar but with digit-count-based cycle parameter. Decompresses if needed via zlib. Uses scoped lock for thread safety.
0x00AEBA30167CGrfEntry__find_file_recordBinary searches the GRF file table (vector of 0x120-byte records at offsets +0x24/+0x28) for a file by name. Uses FUN_00aecee0/00aece80 as comparison functions. Copies the 0x120-byte record to param_3 if found. Returns 1 if found, 0 if not.
0x00AEBAE0280CGrfEntry__read_file_table_dataReads file table data from a GRF archive. Handles 3 GRF format versions (0x100, 0x200, 0x300) with different header layouts. Reads compressed data, resizes the byte vector, copies data, and optionally extracts version info.
0x00AEBC0055CGrfEntry__reset_stateResets GRF entry state. Sets end pointer = begin pointer for file table, zeroes fields at offsets +8 through +0x20, resets byte vector end to begin.
0x00AEBDB0667CGrfEntry__parse_header_and_loadParses GRF archive header and loads file table. Reads magic bytes (0x2E offset), validates against two known signatures (XOR-encrypted). Extracts file count, offsets. Dispatches to version-specific file table parsers (v1/v2/v3). Resets state on failure.
0x00AEC050967CGrfEntry__parse_v1_file_tableParses GRF v1 (0x100) file table. Reads raw file entries with DES decryption and nibble swapping. Each entry has: compressed size, uncompressed size, flags, filename. Builds 0x120-byte records in the file table vector. Sorts after loading.
0x00AEC420498CGrfEntry__parse_v2_file_tableParses GRF v2 (0x200) file table. Reads 8-byte header (compressed/uncompressed sizes), decompresses with zlib, then parses entries sequentially. Each entry: null-terminated name + 0x11 bytes of metadata. Sorts after loading.
0x00AEC620509CGrfEntry__parse_v3_file_tableParses GRF v3 (0x300) file table. Reads 12-byte header (compressed size, uncompressed size, entry count), decompresses, parses entries with null-terminated names + 0x16 bytes metadata (extra 4 bytes vs v2). Sorts after loading.
0x00AEC820451CGrfEntry__read_raw_file_tableReads the raw file table data from a GRF archive. Handles v2 and v3 format differences. Reads compressed data, decompresses with zlib, extracts version info. Returns version byte (masked to low byte) or 0xFF on failure.
0x00AECA5074CMemMappedFile__closeCloses a memory-mapped file. UnmapViewOfFile if mapped, CloseHandle for mapping and file handles. Zeroes all handle pointers.
0x00AECAA0103CMemMappedFile__initInitializes CMemMappedFile members. Gets system allocation granularity via GetSystemInfo, sets view size to 0x20000000 (512MB), computes alignment mask. Zeroes all file/mapping handles and state.
0x00AECB10151CMemMappedFile__openOpens a file for memory-mapped reading. CreateFileA with read-only shared access, GetFileSizeEx, CreateFileMappingA with PAGE_READONLY. Returns 1 on success, 0 on failure.
0x00AECBB0425CMemMappedFile__read_at_offsetReads data at a given file offset via memory-mapped view. Checks if offset falls within current mapped view; if not, unmaps and remaps. Aligns offset to allocation granularity. Falls back to ReadFile if mapping fails (halves view size on failure). Returns pointer into mapped view or read buffer.
0x00AECDE021CGrfFileRecord__set_nameSets the name of a GRF file record by calling FUN_00aecf90 with param_2. Returns this pointer.
0x00AECE0017CGrfFileRecord__set_empty_nameSets the name of a GRF file record to an empty string (DAT_010d4ee8). Returns this pointer.
0x00AECE2085CGrfFileRecord__compare_namesCompares two GRF file record names byte-by-byte. First compares the initial dword, then does a byte-by-byte strcmp-like comparison. Returns 1 if equal, 0 if different.
0x00AECE8085CGrfFileRecord__compare_not_equalCompares two GRF file records for inequality. First compares hash dwords, then does byte-by-byte name comparison. Returns non-zero if not equal (for use as binary search comparator with 'not less' semantics).
0x00AECEE083CGrfFileRecord__compare_less_thanLess-than comparison for GRF file records. First compares hash dwords, then byte-by-byte name comparison. Returns 1 if this < param_2 (for binary search / sort).
0x00AECF4078CGrfFileRecord__compute_hashComputes DJB2 hash (seed=0x1505, multiply by 33) of the file record name string. Stores hash in the first dword (offset 0) of the record.
0x00AECF90101CGrfFileRecord__set_name_and_hashSets the file record name from param_2. Copies string to offset +4, lowercases it via _strlwr, then computes and stores DJB2 hash at offset 0.
0x00AEDA40415CGrfEntry__ctorCGrfEntry constructor. Allocates tree sentinel (0x18 bytes), allocates secondary tree sentinel (0x40 bytes), zeroes all state fields (file handles, sizes, offsets, vectors). Initializes critical section for thread safety.
0x00AEE070381CResourceMgr__dtorDestructor for CResourceMgr. For each GRF tree: iterates all entries calling their cleanup method (+0x18) and deleting objects (+0x0), then clears the tree. Deletes the CriticalSection, frees vectors of trees, the name map at 0x44, additional vectors, and the root tree.
0x00AEE310580CResourceMgr__report_load_failureReports a resource file loading failure. Checks if the file has a non-.xxx extension, then enters critical section, checks if the path is already in the failure tree (case-insensitive compare). If new failure, inserts a new 0x28-byte tree node with the path. Dispatches three chat messages: 'Resource File Loading fail', the resource key, and the file path. Limit of 0x6666666 entries.
0x00AEE5E0196CResourceMgr__lookup_resource_by_nameLooks up a resource by name string in the tree at field[0]. Uses std::tree lower_bound with string comparison. Returns the resource value at node+0x14 if found, or 0xffffffff with an error sprintf if not found (ResourceError: %s is Undefined).
0x00AEE6B0182CResourceMgr__find_in_grf_by_indexFinds a resource in a specific GRF file by index. Sets up the GRF file record name, performs tree lower_bound search in the GRF tree at vector[param_2]. Returns the resource value at node+0x14 if found, 0 if not found.
0x00AEE7701350CResourceMgr__load_resource_by_pathLoads a resource by raw path string (int param). Enters critical section, normalizes path to lowercase, looks up resource type by extension. If found in GRF tree cache, updates access time and returns. Otherwise loads from GRF file, sets name/hash/type/access time, inserts into tree. On load failure, checks for map path and reports error.
0x00AEECC01724CResourceMgr__load_resource_by_stringLoads a resource by STL string path. Same logic as load_resource_by_path but accepts std::string. Enters critical section, normalizes, looks up type, checks cache, loads from GRF, inserts into tree, reports failures.
0x00AEF3A0341CResourceMgr__get_path_without_extensionExtracts the path without the file extension. Appends '.xxx' suffix, calls resolve_alias_path, then finds '.xxx' via strstr and returns the substring before it.
0x00AEF500714CResourceMgr__resolve_alias_pathResolves an alias path by looking up in the alias map at offset 0x44. If the path is found, returns the mapped alternative path. If not found, tries stripping '@xxx' version suffixes (searching backwards for '@' then removing 3 chars) and looking up again. Returns the resolved path string.
0x00AEF7D0364CResourceMgr__resource_exists_by_cstrChecks if a resource exists by C string path. Normalizes to lowercase, looks up resource type, builds full path, checks GRF tree cache (updating access time if found). Falls back to CFileSystem__file_exists_check for disk files. Returns 1 if exists, 0 otherwise.
0x00AEF940400CResourceMgr__resource_exists_by_stringChecks if a resource exists by STL string path. Same logic as resource_exists_by_cstr but accepts std::string parameter. Normalizes, checks GRF cache, falls back to filesystem check.
0x00AEFAE0528CResourceMgr__build_full_pathBuilds a full resource path by combining a filename (param_2) with a base path prefix (param_3). If the filename already starts with the prefix (strncmp match), returns the filename as-is. Otherwise concatenates prefix + filename via STL string concatenation.
0x00AEFDB035CResourceMgr__flush_pending_resourcesFlushes pending resource objects. Iterates the pending list between offsets 0x90 and 0x94, calling each resource's virtual method at vtable+8 (likely a finalize/commit operation).
0x00AEFDE0111CResourceMgr__dump_resource_names_to_fileOpens a file and writes all resource names from the tree containers. Iterates through the vector of trees at offset 0x20, walking each tree's nodes and printing the string at node+0x14 using fprintf.
0x00AEFE501626CResourceMgr__load_res_name_tableLoads ResNameTable.txt, reads the entire file into memory, parses line-by-line. Lines starting with '#' separate key/value pairs which are inserted into the resource tree (offset 0x44). Uses CFileStream to open/read/close the file.
0x00AF04B0456CResourceMgr__add_resource_entryAdds a resource entry to the manager. Looks up the name in the tree using lower_bound; if not found, allocates a 0x18-byte node and inserts it. Then appends param_4 and param_3 to vectors at offsets 0x18 and 0x0C respectively. Adjusts the tree vector at offset 0x20 to match the new size.
0x00AF0680198CResourceMgr__release_all_unused_resourcesReleases all unused resources. Resets the active list pointer (offset 0x94 = 0x90), then iterates all resource trees at offset 0x20. For each tree node, calls the release vtable method at vtable+0x18, then destructs the resource object via vtable[0]. Finally destroys and reinitializes each tree.
0x00AF0780182CResourceMgr__remove_resource_by_nameRemoves a resource from the manager by name. Searches the active list (offset 0x90-0x94) for the resource, removes it from the active list via memcpy. Then looks up the resource in the appropriate tree (using field at offset 0x0C of the resource), calls its release method (vtable+0x18), destructs it, and erases the node from the tree.
0x00AF0840198CResourceMgr__release_all_unused_resources_00af0840Identical to CResourceMgr__release_all_unused_resources at 00af0680. Releases all unused resources by resetting active list, iterating all trees, calling release+destruct on each node, then reinitializing each tree. Likely a duplicate or variant for a different call context.
0x00AF0910254CResourceMgr__expire_timed_out_resourcesExpires resources that have timed out. Gets current time via timeGetTime(), compares elapsed time against each resource's timeout. Resources with refcount==0 (field+4) and elapsed time > threshold (field+8) are removed from the active list, released via vtable, destructed, and erased from the tree.
0x00AF0A10206CResourceMgr__release_resources_by_typeReleases all unused resources of a specific type. Calls CResourceMgr__lookup_resource_by_name to get the type index, then iterates that type's tree. Resources with refcount==0 (field+4) are removed from the active list, released via vtable, destructed, and erased from the tree.
0x00AF0AE0246CResourceMgr__release_all_unreferencedReleases all unreferenced resources regardless of timeout. Similar to expire_timed_out but does NOT check elapsed time, only checks refcount==0 (field+4). Calls timeGetTime() but doesn't use the result for filtering. Iterates all trees and removes/destructs unreferenced resources.
0x00AF1620587CResourceMgr__get_instanceSingleton accessor for the global CResourceMgr instance at DAT_016d56c8. On first call, allocates and initializes the entire resource manager structure: tree sentinel, vectors for resource types/names/active list, and a CriticalSection for thread safety. Registers an atexit cleanup handler. Returns pointer to the singleton.
0x00C83C20173OLEStorage__ctor_with_fileOLEStorage constructor with file path parameter. Initializes CResourceManager (memory I/O buffer), CDocumentStream, zeroes internal state fields (0x488-0x49C), then opens the specified file via OLEStorage__open_file_ansi. Object size ~0x4A0 bytes.
0x00C83CD0157OLEStorage__ctor_defaultOLEStorage default constructor. Initializes CResourceManager (memory I/O buffer), CDocumentStream, zeroes internal state fields (0x488-0x49C). No file is opened. Object size ~0x4A0 bytes.
0x00C8BFE01186OLEStorage__add_stream_node_charAdds a new stream node to the OLE storage container by char name. Searches existing nodes for duplicate names, creates CBaseStreamNode + CDocumentStream + CIOStreamNode. If param_3==-1, appends at end; otherwise inserts at specified position. Sets the char string pair name and clears flag bit 0x200.
0x00C8C4901202OLEStorage__add_stream_node_wcharAdds a new stream node to the OLE storage container by wchar name. Identical to char variant but checks wchar string at offset 0x30 (flag bit 0x01 set). Creates CBaseStreamNode + CDocumentStream + CIOStreamNode. Supports insert-at-position or append modes.
0x00C8C950210ExcelWorkbook__compute_sheet_offsetsComputes the byte offset for each sheet in an Excel workbook. Starts from the total workbook header size, then iterates each sheet (0x3C stride at +0x3c8, data at +0x488 with 0x124 stride). For each sheet, sums 6 virtual function calls to get sub-section sizes, stores cumulative offset at sheet+0x28.
0x00C8CA30845ExcelWorkbook__compute_stream_offsetsComputes cumulative byte offsets for all streams in an Excel workbook. Iterates through IO stream nodes (0x124 stride), computing sizes via virtual dispatch. For each sheet's rows, calls ExcelCell__dispatch_compute_size for each cell record. Stores computed offsets at stream+0x70 entries and row data offsets at sheet+0x40/0x44.
0x00C8CD80676ExcelWorkbook__compute_sst_offsetsComputes SST (Shared String Table) offsets and pagination for Excel workbook serialization. Iterates records at 0x44, 0x40, 0x3c, and 0x3c strides, accumulating sizes. Divides total strings into groups of 10, resizing offset/size vectors. Handles BIFF record continuation splits at 0x2020 bytes.
0x00C8D030217ExcelWorkbook__compute_offsets_and_writeComputes sheet offsets (same as compute_sheet_offsets) then calls the write function. Iterates all sheets, calculates cumulative byte positions, then invokes the sheet data writer at 00c8ca30.
0x00C8D120390ExcelWorkbook__get_cell_or_expandGets a cell pointer for (row, col) in the workbook grid, expanding the grid if needed. Returns pointer to a 0x28-byte cell struct. If col >= current col count, expands all rows to the new column count. If row >= current row count, creates new rows. Bounds: row < 0x10000, col < 0x100. Returns 0 if out of bounds.
0x00C8D560100ExcelWorkbook__reset_stream_stateResets the workbook's stream reader state. Calls stream lib function, clears/sets basic_ios state, resets read position (this+4 = this+0), clears parse counters at +0xD4/+0xD8, sets buffer size to 0x200. Returns 1 if the name table at +0x74 is empty, 0 otherwise.
0x00C8D5D0243ExcelWorkbook__reset_full_stateFull reset of workbook state. Copies backup positions (+0x2F8 to +0x2FC, +0x304 to +0x308), frees all sheet data objects (0x7C each) from vector at +0x318, resets the vector, recursively destroys the tree root at +0x310, resets stream reader state, clears read position, and resets buffer to 0x200.
0x00C8DA70157OLEStorage__open_file_unicodeOpens an OLE compound document file given a Unicode filename. Converts the wide string to multibyte, opens the file via basic_filebuf, sets stream state on failure, clears state, then opens the OLE stream. Returns the result of OLEStorage__open_stream_unicode.
0x00C8DB10103OLEStorage__open_file_ansi_00c8db10Opens an OLE compound document file given an ANSI filename. Converts the char* to a wchar_t* via mbstowcs, then delegates to the Unicode version (FUN_00c8db80). Frees the temporary wide string buffer.
0x00C8DB80662OLEStorage__open_and_initOpens an OLE compound document file (Unicode path) and fully initializes the storage. Opens the file stream, reads the OLE compound header, rebuilds sector allocation tables (FAT), updates the root directory entry, initializes the FAT sector array (0x80 entries), writes FAT sectors, creates a Root Entry directory entry, and sets up the initial stream tracking structure. Returns 1 on success.
0x00C8E150329OLEStorage__collect_chain_and_compute_sizeFollows a FAT sector chain starting from param_2, collecting all sector indices into a vector. If param_3 is false, follows the regular FAT chain (offset 0x304); if true, follows the mini-FAT chain (offset 0x2F8). Returns the total byte size = sector_count * sector_size (regular=0x2F4, mini=0x2F0).
0x00C8E870287ExcelWorkbook__compute_total_sizeComputes total serialized byte size for the entire Excel workbook. Sums sizes from the global records, multiple record arrays (strides 0x44, 0x40, 0x4C, 0x3C), plus individual record objects at specific offsets. Each record's size is obtained via virtual method at vtable+0x10.
0x00C8E99075ExcelWorkbook__compute_all_streams_sizeComputes the total size of all streams in the workbook by summing sizes from 6 different record/stream objects via their virtual size methods, including the sheet data size from ExcelWorkbook__compute_all_sheets_size.
0x00C8E9E0791OLEStorage__remove_sectors_and_reindexRemoves specified sectors from the OLE FAT and reindexes all remaining sector references. Takes a sorted array of sector indices to remove. Updates directory entry start sectors, mini-FAT chain entries, and all FAT chain pointers to account for the removed sectors. Sorts the removal list, then shifts remaining entries down and adjusts all indices that reference sectors after the removed ones.
0x00C8ED90102OLEStorage__open_stream_ansi_00c8ed90Opens an OLE stream by ANSI name. Converts the char* to a wchar_t* via mbstowcs, delegates to the Unicode version (FUN_00c8ee00), then frees the wide string buffer. Returns the result of the Unicode open.
0x00C8EE00303OLEStorage__open_stream_by_pathOpens an OLE stream by traversing the directory tree using a path. Pushes the current directory onto a stack, finds the matching directory entry, then recursively processes children: type 0x01 (storage) recurses, type 0x02 (stream) reads size. Pops the directory stack when done. Returns 1 on success, 0xFFFFFFFE if not found.
0x00C8EF30187OLEStorage__remove_directory_entryRemoves a directory entry from the OLE storage. Decrements indices in the tree that are above the removed entry's index, frees the directory entry object, shifts the directory entry array down, then removes the entry from the parent's child list and rebalances the tree.
0x00C8EFF01147OLEStorage__remove_stream_by_indexRemoves a stream from the OLE storage by its index in the stream arrays. Shifts entries in three parallel arrays (stride 0x3C for names, stride 0x124 for stream nodes, stride 0x1C for associated data) down by one to fill the gap. Copies both ANSI and Unicode name strings, clones sub-vectors, and calls destructors on the removed entry. Returns 1 on success, 0 if index out of bounds.
0x00C8F470158OLEStorage__find_and_remove_stream_by_ansi_nameSearches for a stream by ANSI name in the stream name array (stride 0x3C, byte-mode entries). Compares strings and if found, delegates to remove_stream_by_index to delete it. Returns the result of the removal.
0x00C8F510164OLEStorage__find_and_remove_stream_by_unicode_nameSearches for a stream by Unicode name in the stream name array (stride 0x124, wide-char entries). Compares wide strings and if found, delegates to remove_stream_by_index to delete it. Returns the result of the removal.
0x00C8F5C0604OLEStorage__list_child_stream_namesLists child stream names under the current directory. Pushes the current directory, optionally navigates to a subdirectory, then iterates over all child entries collecting their wide-char names into a vector of wstring. Pops the directory stack when done. Returns 1 on success.
0x00C8FB60715OLEStorage__allocate_new_sectorAllocates a new sector in the OLE FAT. Clears the FAT data, then depending on whether it is a regular sector (param_2=0) or a mini-sector (param_2!=0), finds a free slot (0xFFFFFFFF in the appropriate table) and inserts a new sector. Updates sector counts, adjusts indices after the insert, and extends the FAT chain with a ENDOFCHAIN (0xFFFFFFFD) marker.
0x00C8FE30105OLEStorage__get_stream_size_ansiGets the size of an OLE stream by ANSI name. Converts char* to wchar_t* via mbstowcs, calls the Unicode version, then frees the wide buffer. Returns the result.
0x00C8FEA0115OLEStorage__get_stream_size_unicodeGets the size of an OLE stream by Unicode name. Compares the name against a root entry marker; if it matches, uses the root directory entry. Otherwise, searches the directory tree for the named entry. Writes the size (from offset 0x78 in the directory entry) into param_3. Returns 1 on success, 0xFFFFFFFC if not found.
0x00C8FF20224OLEStorage__find_directory_entry_by_idRecursively searches the OLE directory tree for an entry with the given ID (param_2). Uses a stack-based depth-first search, pushing the current directory and recursing into children. Returns the matching directory tree node, or 0 if not found.
0x00C90080272OLEStorage__navigate_to_pathNavigates to a directory entry by path. Pushes the current directory, handles absolute paths (starting with backslash) by resetting to root. Tokenizes the path, navigates subdirectories, then finds the final child by name. Restores the original directory on completion. Returns the found directory node or 0 if not found.
0x00C901901563OLEStorage__remove_sectors_and_compact_FATRemoves specified sectors and compacts the FAT. For regular sectors (param_3=0): reads stream chain data, removes specified sectors from the data, rewrites the chain, updates indices and directory entry sizes. For mini-sectors (param_3=1): copies the removal list, calls remove_sectors_and_reindex, then deletes records from the flat file. Both paths then compact unused trailing sectors from the FAT/mini-FAT, recursively calling themselves until no more sectors can be freed.
0x00C908E039OLEStorage__get_stream_ansi_nameReturns the ANSI name pointer for a stream at the given index. Checks if the stream is byte-mode (flag bit 0 == 0 at offset 0x38 in the 0x3C-stride array). Returns the name pointer at offset 0x34, or 0 if the stream is Unicode-mode.
0x00C90930151OLEStorage__collect_sector_chainCollects a full sector chain into a vector starting from sector param_2. If param_4 is false, follows the regular FAT chain (offset 0x304); if true, follows the mini-FAT chain (offset 0x2F8). Pushes each sector index until ENDOFCHAIN (-2) is reached.
0x00C90A50226OLEStorage__allocate_free_sector_in_chainFinds a free sector slot in the regular or mini FAT chain and marks it as ENDOFCHAIN (-2). For regular sectors (param_2=0), searches the FAT at offset 0x304 for a -1 entry; if none found, allocates a new sector first. For mini-sectors (param_2=1), searches the mini-FAT at offset 0x2F8 similarly.
0x00C90BE058OLEStorage__copy_stream_ansi_nameCopies the ANSI name of a stream at the given index into the output buffer. Checks that the stream is byte-mode (flag bit 0 == 0). Returns 1 on success, 0 if the stream is Unicode-mode.
0x00C90C2061OLEStorage__copy_stream_unicode_nameCopies the Unicode name of a stream at the given index into the output buffer. Checks that the stream is Unicode-mode (flag bit 0 == 1). Returns 1 on success, 0 if the stream is byte-mode.
0x00C91060567OLEStorage__adjust_indices_after_insertAdjusts various indices in the OLE storage structure after rows are inserted. Updates column indices at +0x13c (109 entries), special indices at +0x120/+0x12c/+0x134, dynamic index array at +0x2f8, and directory entry indices at +0x318. Increments indices that are >= insertion points.
0x00C91380126OLEStorage__insert_row_at_indexInserts a row at the given index in the OLE storage. Shifts existing rows down by calling swap operations. Uses flag at +0xc bit 1 to check if storage is writable. Returns 1 on success.
0x00C91400357OLEStorage__build_directory_tree_nodeRecursively builds a directory tree node for OLE compound document. Allocates 0x18-byte node, links parent/child references (offsets +0x44, +0x48, +0x4c), inserts children sorted by index at +8. Calls OLETreeNode__rebalance to finalize node.
0x00C915B048OLEStorage__set_sector_indexSets a sector index value in either the mini-FAT (at +0x2f8, when param_4!=0) or regular FAT (at +0x304, when param_4==0). Index = param_2, value = param_3.
0x00C915E0557OLEStorage__open_file_ansiOpens an OLE compound document file from ANSI path. Converts filename to wide string via mbstowcs, opens the stream, creates CDocumentStream, reads directory looking for 'Workbook' stream (Excel format). Copies filename to buffer at +0x4a0.
0x00C918101132OLEStorage__read_sector_allocation_tablesReads FAT (File Allocation Table) sectors, DIFAT sectors, and mini-FAT sectors from an OLE compound document stream. Reads raw bytes from seekable stream, packs 4 bytes into uint32 entries. Uses three separate sector tables at +0xbe/+0xc1 offsets. Sectors are 512 bytes each (0x200).
0x00C91C80122OLEStorage__validate_and_init_headerValidates OLE compound document header by checking magic bytes (0xE011CFD0 and 0xE11AB1A1), reads sector size from +0xbc, initializes sector count at +0x39 from file size / sector size.
0x00C91D00411OLEStorage__read_directory_entriesReads OLE directory entries from the compound document. Allocates buffer for directory stream data, reads sectors via FAT chain, creates OLEDirectoryEntry objects (0x7c bytes each, 4 per 512-byte sector). Builds directory tree starting from root entry's child index at +0x4c.
0x00C91EA0102OLEStorage__find_stream_by_ansi_nameFinds an OLE stream by ANSI name. Converts the ANSI string to wide string via mbstowcs, then delegates to OLEStorage__find_stream_by_unicode_name. Frees the wide string buffer after.
0x00C91F10226OLEStorage__find_stream_by_unicode_nameFinds/opens an OLE stream by Unicode name. Pushes current directory entry onto stack, creates new OLEDirectoryEntry (0x7c bytes, type=1=storage), delegates to insert_directory_entry, then restores directory state and rebuilds FAT chain.
0x00C92000300OLEStorage__create_stream_by_ansi_nameCreates an OLE storage entry by ANSI name. Converts ANSI to wide string via mbstowcs, creates OLEDirectoryEntry (type=2=stream), delegates to insert_directory_entry. Restores directory state and rebuilds FAT chain.
0x00C92130226OLEStorage__create_stream_by_unicode_nameCreates an OLE storage entry by Unicode name. Creates OLEDirectoryEntry (type=2=stream), delegates to insert_directory_entry. Restores directory state and rebuilds FAT chain.
0x00C92220656OLEStorage__insert_directory_entryInserts a new directory entry into the OLE directory tree. Parses path (backslash = root), tokenizes name, finds sorted insertion position by comparing Unicode names (shorter names first, then lexicographic). Updates tree indices and rebuilds tree node linkage.
0x00C924B0124OLEStorage__move_rowMoves a row from one index to another by repeated adjacent swaps. Direction depends on whether src < dst or src > dst. Returns 1 on success, 0 if storage not writable or indices out of range.
0x00C92530855OLEStorage__reset_and_add_sheetsResets OLE storage stream nodes and adds worksheet sheets. Clears/resizes 4 types of stream node vectors (0x44, 0x40, 0x4c, 0x3c stride). Then adds additional sheets by name 'Sheet_N'. Used when opening Excel workbook with multiple sheets.
0x00C92890286OLEStorage__open_stream_unicodeOpens an OLE stream by Unicode filename. Converts wide name to ANSI via wcstombs, calls low-level file open, then seeks to end to determine file size, calculates sector count. Returns 1 on success.
0x00C929B0106OLEStorage__open_compound_document_ansiOpens an OLE compound document by ANSI filename. Converts to wide string via mbstowcs, delegates to OLEStorage__open_compound_document. Frees the wide string after.
0x00C92A20656OLEStorage__open_compound_documentOpens and initializes an OLE compound document from a Unicode file path. Clears existing data, opens stream, validates OLE header (magic 0xE011CFD0/0xE11AB1A1), reads FAT, reads directory entries, builds directory tree. Core initialization function for OLE file reading.
0x00C92CB0231OLEStorage__read_stream_to_ansi_stringReads current OLE stream content and converts from Unicode to ANSI. Calls read_stream_data to get wide char buffer, then wcstombs to convert. Frees the wide buffer with proper alignment handling.
0x00C92DA0537OLEStorage__read_stream_data_unicodeReads the current OLE stream data as Unicode wide chars into a vector buffer. Returns 1 on success.
0x00C92FC0130OLEStorage__get_current_path_ansiGets the current OLE directory path as an ANSI string. Allocates wide buffer, calls build_full_path to construct the Unicode path, converts to ANSI via wcstombs, frees the wide buffer. Returns 1 on success.
0x00C93050662OLEStorage__build_full_pathBuilds full OLE path by traversing parent directory entries from current to root. Prepends backslash separators. Pushes/pops directory stack at +0x328. Removes the initial root entry name (first 0xb chars) from the result.
0x00C935E0304BIFFRecord__parse_record_12byte_headerParses a 12-byte BIFF record with header. Reads: 2-byte record type (+0x28), 2-byte field (+0x2a), 1-byte field (+0x2c), 1-byte field (+0x2d), 2-byte field (+0x2e), 4-byte size (+0x30). Then reads variable data into buffer and calls virtual handler at vtable+0x10.
0x00C93710244BIFFRecord__parse_record_16byteParses a 16-byte BIFF record. Reads: 2-byte record type, 2-byte field, 2-byte field, 2-byte field, 4-byte field, 4-byte field. Calls virtual handler at vtable+0x10.
0x00C93810933ExcelWorkbook__parse_BIFF_recordsMain BIFF record parser loop for Excel workbook. Reads 2-byte record IDs (0x809 = BOF). Dispatches by sub-record type: type 5 calls FUN_00c96a90 (formula parser), type 0x10 creates CDocumentStream and parses sheet data via FUN_00c96eb0, others use generic record skip. Loops until end of data.
0x00C93BF0137BIFFRecord__parse_record_6byteParses a 6-byte BIFF record. Reads: 2-byte record type, 2-byte field, 2-byte field. Calls virtual handler at vtable+0x10.
0x00C93C80126OLEStorage__seek_and_read_sectorSeeks to a specific sector in the OLE file and reads its data. Sector offset = sector_size * param_2. Uses istream seekg + read. Returns 1 if read succeeded (no error flags).
0x00C93D00159BIFFRecord__parse_record_8byteParses an 8-byte BIFF record. Reads: 2-byte record type, 2-byte field, 2-byte field, 1-byte field, 1-byte field. Calls virtual handler at vtable+0x10.
0x00C93DA0103BIFFRecord__parse_record_with_string_dataParses a BIFF record with a 4-byte uint32 field, two 1-byte fields, then variable-length string data via FUN_00c96480. Calls virtual handler at vtable+0x10.
0x00C93E10198ExcelWorkbook__dispatch_cell_recordDispatches BIFF cell record types to their respective handlers. Record ID 6=Formula(0x6), 0xBD=MulRk, 0xBE=MulBlank, 0xFD=LabelSST, 0x201=Blank, 0x203=Number, 0x205=BoolErr, 0x27E=RK. Each type has its own vtable handler at specific offsets.
0x00C94180162BIFFRecord__parse_record_with_uint16_arrayParses a BIFF record with a 4-byte uint32 field followed by a variable-length array of uint16 values. Array count = (record_size - 4) / 2. Calls virtual handler at vtable+0x10.
0x00C94230200BIFFRecord__parse_record_14byteParses a 14-byte BIFF record. Reads: 4-byte uint32, 4-byte uint32, 2-byte uint16, 2-byte uint16, 2-byte uint16. Calls virtual handler at vtable+0x10.
0x00C94300311BIFFRecord__parse_record_with_uint32_arrayParses a BIFF record with a 2-byte header followed by variable-length array of (uint32, uint16, uint16) triples. Array count = (record_size - 2) / 8. Calls virtual handler at vtable+0x10.
0x00C94440269BIFFRecord__parse_record_14byte_with_stringParses a BIFF record with 5 uint16 fields, 2 byte fields, then variable-length string data via FUN_00c96480. Calls virtual handler at vtable+0x10.
0x00C94550655BIFFRecord__parse_formula_recordParses a BIFF formula record (type 6/0x206). Reads header: 2-byte row, 2-byte col, 2-byte XF index, 8-byte result value, 2-byte flags, 4-byte field, then variable formula data. After formula, dispatches sub-records: 0x221=Array, 0x36=Continue, 0xBC=ShrFmla, 0x4BC=ShrFmla2. Also handles 0x207=String record.
0x00C94B20288BIFFRecord__parse_DBCELL_recordParses a BIFF DBCELL record. Reads: 4-byte row offset, 4-byte field, 4-byte first row, 4-byte field. Calculates bitfield array size from row range, fills uint32 array from remaining record data. Calls virtual handler.
0x00C94C40178BIFFRecord__parse_record_10byteParses a 10-byte BIFF record. Reads: 2-byte record type, 2-byte field, 2-byte field, 4-byte uint32. Calls virtual handler at vtable+0x10.
0x00C94DD0292BIFFRecord__parse_MulBlank_recordParses BIFF MulBlank record (0xBE). Reads row, first column, last column from header. Contains array of XF indices for blank cells spanning first_col to last_col.
0x00C94F00324BIFFRecord__parse_MulRk_recordParses BIFF MulRk record (0xBD). Reads row, first column, last column. Contains array of (uint16 XF, uint32 RK value) pairs for multiple cells in one row.
0x00C95050275BIFFRecord__parse_Number_recordParses BIFF Number record (0x203). Reads row, column, XF index, then 8-byte IEEE 754 double value (read as byte-swapped uint64).
0x00C953D0178BIFFRecord__parse_RK_recordParses BIFF RK record (0x27E). Reads row (2 bytes), column (2 bytes), XF index (2 bytes), and 4-byte RK value (encoded int or float). Calls virtual handler.
0x00C95490415BIFFRecord__read_record_header_and_dataReads BIFF record header (2-byte type, 2-byte size) and copies record data into internal buffer. Handles CONTINUE records (type 0x3C) by appending their data to the previous record. Returns total bytes consumed including all CONTINUE records.
0x00C95630281BIFFRecord__parse_record_16byte_variantParses a 16-byte BIFF record variant. Reads 3 uint16 fields, 3 more uint16 fields, and 1 uint32 field. Calls virtual handler at vtable+0x10.
0x00C957501493ExcelWorkbook__parse_sheet_recordsParses all records in a BIFF sheet stream. Loops reading record IDs: cell records (0x6, 0xBD, 0xBE, 0xFD, 0x201, 0x203, 0x205, 0x27E) are stored in a vector of CResourceEntry (0x2F8 bytes each). Record 0xD7 terminates. Record 0x208 creates CStreamNodeType208 objects. Other records are skipped. Pre-allocates 1000 entries and grows by 1000.
0x00C96260272BIFFRecord__parse_BoolErr_recordParses BIFF BoolErr record (0x205). Header: 2-byte row, 2-byte col, 1-byte bool/error flag, 1-byte type, 2-byte XF index. Variable data follows header. Calls virtual handler.
0x00C96370272BIFFRecord__parse_Blank_recordParses BIFF Blank record (0x201). Same structure as BoolErr: 2-byte row, 2-byte col, 1-byte flags, 1-byte type, 2-byte XF index, variable data. Calls virtual handler.
0x00C96590115BIFFRecord__parse_uint16_array_rawReads a raw array of uint16 values from a BIFF record. Array size = record data size. Resizes output buffer and reads each uint16 from little-endian bytes. Calls virtual handler.
0x00C96610130BIFFRecord__parse_string_or_byte_pairParses a BIFF record that contains either a string or a byte pair. If the 2-byte type field is negative (>=0x8000), reads 2 raw bytes; otherwise parses a BIFF string. Calls virtual handler.
0x00C966A0299BIFFRecord__parse_Window2_recordParses BIFF Window2 record. Reads 16 bytes: 2-byte type, 2-byte col, 1-byte flags, 1-byte type byte, 2-byte field, 2-byte field, 2-byte field, 2-byte field, 2-byte field. Calls virtual handler.
0x00C967D0357BIFFRecord__parse_record_18byteParses an 18-byte BIFF record. Reads 4 uint16 fields, then 4 more uint16 fields, then 1 uint16 field. Calls virtual handler.
0x00C96940322BIFFRecord__parse_record_18byte_with_uint32Parses an 18-byte BIFF record variant with uint32 at end. Reads 4 uint16 fields, 2 more uint16 fields, 1 uint16 field, then 1 uint32 field. Calls virtual handler.
0x00C96A901041ExcelWorkbook__parse_global_recordsParses BIFF global (workbook) records until EOF (record 0x0A). Dispatches known types: 0x31=Font (CStreamNodeWithFont), 0x3D=Window1, 0x85=BoundSheet (CBaseStreamNode), 0xE0=XF (CStreamNodeTypeE0), 0xFC=SST, 0x293=Style (CStreamNodeType293), 0x809=BOF. Unknown records are skipped via read_record_header_and_data.
0x00C96EB0885ExcelWorkbook__parse_workbook_streamParses BIFF workbook stream records until EOF (0x0A). Dispatches: 0x200=Dimensions, 0x208=Row (creates CStreamNodeD7Container, recurses into parse_sheet_records), 0x20B=Index, 0x23E=Window2, 0x809=BOF. Row containers (0x208) are stored in a vector (0x50 stride), pre-allocated to 1000. Unknown records are skipped.
0x00C97230278BIFFRecord__parse_XF_recordParses BIFF XF (Extended Format) record. Reads: 2-byte row, 2-byte col, 2-byte XF, 2 bytes, 2 bytes, 2 bytes, uint32, uint32, 2-byte field. 22 bytes total. Calls virtual handler.
0x00C9735076OLEStorage__read_uint16_and_uint32Reads a uint16 and uint32 from a raw buffer into the object. Used by OLE stream parsing to read small header fields.
0x00C973A0639OLEStorage__read_stream_chain_dataReads data from an OLE stream by following the FAT/mini-FAT chain. If param_4=0 (mini-stream), follows mini-FAT at +0x304, reads mini-sectors from root directory entry data. If param_4=1 (regular), follows regular FAT at +0x2f8, seeks and reads each sector directly. Returns total bytes read.
0x00C97620143OLEStorage__read_named_stream_ansiReads a named stream from OLE storage using ANSI name. Converts name to wide string, finds the stream directory entry, resizes buffer, reads stream content. Returns status code.
0x00C976B0105OLEStorage__read_stream_content_ansiReads stream content by ANSI name. Converts to wide string via mbstowcs, calls read_stream_by_name, frees wide string. Returns status code.
0x00C9772060OLEStorage__find_and_read_streamFinds a named stream in the OLE storage, resizes the buffer, and reads its content. Wrapper that combines find + resize + read operations.
0x00C97760306OLEStorage__read_stream_by_nameReads an OLE stream by Unicode name into output buffer. If name matches root ('\\'), reads from root directory entry. Otherwise finds the stream by name, determines if mini-stream (size<0x1000) or regular, reads the FAT chain data, copies to output.
0x00C978F033BIFFRecord__compute_total_size_with_continueComputes total record size including CONTINUE records. Calls virtual size method at vtable+0xc, adds 4 (header) + continues*4 for CONTINUE record overhead (every 0x2020 bytes).
0x00C9792016BIFFRecord__compute_total_size_simpleComputes simple total record size (no CONTINUE overhead). Calls virtual size method at vtable+0xc, adds 4 for the record header.
0x00C97AE0248ExcelWorkbook__compute_all_sheets_sizeComputes total size for all Excel sheets (CStreamNodeD7Container array, 0x50 stride). For each sheet, sums sizes from CStreamNodeType208 objects (0x38 stride), cell records (0x2F8 stride via dispatch_compute_size), and the EOF marker.
0x00C97BE033BIFFRecord__compute_size_with_continue_bComputes BIFF record total size including CONTINUE record overhead. Same as compute_total_size_with_continue.
0x00C97C5016BIFFRecord__compute_size_simple_bComputes simple BIFF record total size (data + 4 byte header, no CONTINUE). Same as compute_total_size_simple.
0x00C97D0033BIFFRecord__compute_size_with_continue_cComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97D7033BIFFRecord__compute_size_with_continue_dComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97DA033BIFFRecord__compute_size_with_continue_eComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97E7033BIFFRecord__compute_size_with_continue_fComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97EA033BIFFRecord__compute_size_with_continue_gComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97ED033BIFFRecord__compute_size_with_continue_hComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97F6033BIFFRecord__compute_size_with_continue_iComputes BIFF record total size with CONTINUE overhead. Variant instance for specific record type.
0x00C97F9016BIFFRecord__compute_size_simple_cComputes simple BIFF record total size (data + 4 byte header, no CONTINUE). Variant instance.
0x00C97FB075ExcelWorkbook__compute_total_data_sizeComputes total workbook data size by summing sizes of all major sections: global records, SST, sheet data (via compute_all_sheets_size), and other sections. Calls vtable+0x10 on each section object.
0x00C98000102OLEStorage__delete_stream_by_path_ansiANSI string wrapper for OLEStorage__delete_stream_by_path. Converts narrow char* path to wchar_t* via mbstowcs, then calls the Unicode version to delete the stream.
0x00C98070104OLEStorage__delete_stream_by_pathDeletes a stream from the OLE storage by its Unicode path. Navigates to the directory entry, verifies it has no children (returns -3 if it does), removes the entry, rebuilds sector allocation, updates directory, and rewrites FAT sectors.
0x00C980E0102OLEStorage__delete_and_truncate_stream_ansiANSI string wrapper for OLEStorage__delete_and_truncate_stream. Converts narrow char* path to wchar_t* via mbstowcs, then calls the Unicode version.
0x00C98150214OLEStorage__delete_and_truncate_streamDeletes an OLE stream by Unicode path, first truncating its data. If stream is >= 0x1000 bytes, reassigns sector chain via write_SST_strings. Then zeros the stream size, rebuilds allocation, removes directory entry, and rewrites FAT/directory sectors.
0x00C98940917ExcelWorkbook__write_to_ole_streamWrites the entire Excel workbook to an OLE compound file stream. Computes total sizes for all sections and sheets, calculates stream offsets, writes BIFF record data, XF records, and each workbook section. Creates a "Workbook" stream entry in the OLE storage.
0x00C98CE0407ExcelWorkbook__save_to_fileSaves the Excel workbook to a file. Takes an ANSI filename, opens/initializes OLE storage, creates a "Workbook" directory entry, inserts it into the OLE directory tree, rebuilds sector allocation, then calls write_to_ole_stream to write all data.
0x00C98E80324OLEStorage__write_FAT_sectorsWrites all FAT sectors to the OLE storage file. Serializes FAT entries (sector allocation table), DIFAT entries (double-indirect FAT), and mini-FAT entries into 512-byte sector buffers and writes each via update_directory_entry.
0x00C98FD030OLEStorage__rebuild_and_update_rootRebuilds sector allocation and updates the root directory entry. Wrapper that calls rebuild_sector_allocation then update_directory_entry(0, buffer).
0x00C98FF0161OLEStorage__write_directory_entriesSerializes all OLE directory entries into a buffer (0x80 bytes per entry) and writes the buffer to the storage via write_SST_strings. Allocates buffer sized to sector boundaries, zeroes it, then fills with entry data via write_all_directory_entries.
0x00C99700221OLEStorage__tokenize_pathSplits a Unicode path at the last backslash. Outputs directory portion to param_2 and filename portion to param_3. If no backslash found, directory is empty and filename is the full path (skipping leading backslash if present).
0x00C99840172OLEStorage__swap_sectorsSwaps the contents of two sectors in the OLE storage. Reads both sectors via seek_and_read_sector, then writes each to the other's position via update_directory_entry. Requires write access (flag 0x02). Returns 1 on success, 0 on failure.
0x00C999001929ExcelWorkbook__load_cell_dataLoads cell data from BIFF sheet records into CExcelVariant grid. Iterates over all sheets and cell records (0x2F8 stride). Dispatches by record type: MulRk (0xBD) decodes RK values, LabelSST (0xFD) reads SST strings (ANSI or Unicode), Number (0x203) stores doubles, BoolErr (0x205) stores booleans, RK (0x27E) decodes RK values. Populates variant grid at row/column positions.
0x00C9A2E05482ExcelWorkbook__write_biff_record_dataWrites BIFF record data to Excel workbook stream. 5.4K bytes. Called by BIFFRecord__write_record_to_stream. Handles cell expansion, stream nodes, resource entries, string maps, and vector allocations for XLS file format output.
0x00C9B860529OLEStorage__build_row_tableBuilds a row table for the OLE storage. Clears existing rows, reserves space, then iterates through storage entries (stride 0x124) building row descriptors. Each row descriptor is 0x1c bytes, pushed to a vector via emplace. Calls OLEStorage__save_to_file for each entry to populate data.
0x00C9BA80293OLEStorage__write_row_to_streamWrites a row of data to the output stream. Seeks to the correct position via virtual call, writes multiple fields in little-endian (uint16 pairs at offsets 0x28/0x2a/0x2e, uint8 pair at 0x2c/0x2d, uint32 at 0x30, then a variable-length byte array from 0x34-0x38 range). Finishes with write_BIFF_record_with_continuations.
0x00C9BBB0297OLEStorage__write_row_fieldsWrites row fields to the buffer. Serializes 4 uint16 fields (offsets 0x28, 0x2a, 0x2c, 0x2e) and 2 uint32 fields (offsets 0x30, 0x34) in little-endian byte order. Finishes with write_BIFF_record_with_continuations.
0x00C9BCE0339ExcelWorkbook__serialize_sheet_dataSerializes all data for a sheet. Iterates through sheet entries (stride 0x124), calling virtual serializers for header, sub-records, cell data, and footer sections. Accumulates total byte offset as return value.
0x00C9BE40223ExcelWorkbook__serialize_3_uint16_recordSerializes a BIFF record with 3 uint16 fields (at member offsets 0x28, 0x2a, 0x2c) to the output buffer. Seeks/resizes buffer via virtual call, writes fields in little-endian, then calls write_BIFF_record_with_continuations.
0x00C9BF20212OLEStorage__update_directory_entryUpdates an OLE directory entry on disk. Seeks to position (sector_size * index), writes the entry data, updates entry count and total size if index is at or beyond current count. Flushes and reopens the file stream.
0x00C9C000241ExcelWorkbook__serialize_3_uint16_plus_extra_recordSerializes a BIFF record with 3 uint16 fields (offsets 0x28, 0x2a, 0x2c) plus 2 extra bytes (offset 0x2e, 0x2f). Seeks/resizes buffer, writes in little-endian, then calls write_BIFF_record_with_continuations.
0x00C9C100163ExcelWorkbook__serialize_uint32_and_string_recordSerializes a BIFF record with 1 uint32 field (offset 0x28) + 2 single-byte fields + a string field via serialize_string_field. Then calls write_BIFF_record_with_continuations.
0x00C9C1B0152ExcelWorkbook__dispatch_record_serializer_by_typeDispatches record serialization by BIFF record type code. Switch on type: 6=Formula, 0xbd=MulRk, 0xbe=MulBlank, 0xfd=LabelSST, 0x201=Blank, 0x203=Number, 0x205=BoolErr, 0x27e=RK. Each type accesses a different sub-object at varying offsets within the record structure.
0x00C9C400238ExcelWorkbook__serialize_uint32_and_uint16_array_recordSerializes a BIFF record with 1 uint32 field followed by a variable-length array of uint16 values from a vector. Writes count based on vector size, then each uint16 in little-endian. Calls write_BIFF_record_with_continuations.
0x00C9C4F0267ExcelWorkbook__serialize_2_uint32_3_uint16_recordSerializes a BIFF record with 2 uint32 fields + 3 uint16 fields to the output buffer in little-endian. Calls write_BIFF_record_with_continuations at end.
0x00C9C600326ExcelWorkbook__serialize_tuple_array_recordSerializes a BIFF record containing an array of (uint32, uint16, uint16) tuples from member vectors. Writes record type uint16, then iterates through entries writing each 8-byte tuple. Calls write_BIFF_record_with_continuations.
0x00C9C750354ExcelWorkbook__serialize_multi_field_with_string_recordSerializes a BIFF record with 5 uint16 fields + 4 single-byte fields + a string field via serialize_string_field. Calls write_BIFF_record_with_continuations at end.
0x00C9C8C0565ExcelWorkbook__serialize_complex_typed_recordSerializes a complex BIFF record: 3 uint16 fields, 8 raw bytes, 1 uint16, then a variable-length byte array from member vector. After writing data, dispatches to a type-specific sub-serializer based on a type code (0x36, 0xbc, 0x221, 0x4bc). Optionally writes an additional sub-record. Calls virtual finalize at end.
0x00C9CB00633OLEStorage__serialize_directory_entry_to_bufferSerializes an OLE directory entry structure to a raw byte buffer in little-endian format. Copies 0x200+ bytes of fields including name (0x40 wchars), name length, type, color, SIDs (left/right/child), CLSID, state bits, timestamps, start sector, and size.
0x00C9CD80254ExcelWorkbook__serialize_4_uint32_and_array_recordSerializes a BIFF record with 4 uint32 fields followed by a variable-length array of uint32 values from a member vector. Writes fields in little-endian. Calls write_BIFF_record_with_continuations at end.
0x00C9CE80244ExcelWorkbook__serialize_3_uint16_1_uint32_recordSerializes a BIFF record header: 3 uint16 fields + 1 uint32 field to the output buffer in little-endian. Calls write_BIFF_record_with_continuations.
0x00C9CF80237ExcelWorkbook__serialize_string_data_fieldFlushes a sector buffer to the output. Two modes based on flag bit 0: (0) writes narrow data - length uint16 + type byte + raw bytes; (1) writes wide data - length uint16 + type byte + wchar array via ole_write_wchar_array_to_buffer. Returns total bytes written (3 + data).
0x00C9D070350ExcelWorkbook__serialize_header_and_uint16_array_recordSerializes a BIFF record with 2 uint16 fields at beginning, 1 uint16 at variable offset (based on member field 5), then a variable-length array of uint16 values from a member vector. Calls write_BIFF_record_with_continuations.
0x00C9D1D0357ExcelWorkbook__serialize_header_and_tuple_array_recordSerializes a DIFAT-like table: 2 uint16 fields, 1 uint16 at variable offset, then an array of (uint16 + uint32) pairs from a member vector (stride 8). Calls write_BIFF_record_with_continuations.
0x00C9D340263ExcelWorkbook__serialize_3_uint16_1_uint64_recordSerializes a mini-FAT-like record: 3 uint16 fields + 1 uint64 field (written as 8 bytes from two uint32 members). Calls write_BIFF_record_with_continuations.
0x00C9D450473OLEStorage__serialize_single_directory_entrySerializes a single OLE compound file directory entry (0x80 bytes) to a byte buffer. Writes: 32 wchar name chars, name size (uint16), type, color, left/right/child SIDs (uint32 each), CLSID, state bits, creation/modification timestamps, start sector, stream size.
0x00C9D630244ExcelWorkbook__serialize_3_uint16_1_uint32_record_v2Serializes a BIFF record with 3 uint16 fields + 1 uint32 field to the output buffer. Same pattern as write_header_to_buffer. Calls write_BIFF_record_with_continuations.
0x00C9D730624ExcelWorkbook__write_BIFF_record_with_continuationsWrites a BIFF record with CONTINUE records (type 0x3c) for data exceeding the max record size (0x2020 = 8224 bytes). Splits data at CONTINUE record boundaries, writing record type, size prefix, then data chunks. Handles both pre-split (via offset array) and raw data modes.
0x00C9D9A0371ExcelWorkbook__serialize_6_uint16_1_uint32_recordSerializes a BIFF record with 6 uint16 fields + 1 uint32 field to the output buffer. Calls write_BIFF_record_with_continuations at end.
0x00C9DB20292OLEStorage__serialize_storage_childrenSerializes all child streams of an OLE storage entry. Iterates through two vectors: first (stride 0x38) for simple sub-records, second (stride 0x2f8) for complex typed records with type dispatch (same as dispatch_record_serializer_by_type). Ends with a final sub-record serialization. Returns total serialized bytes.
0x00C9DD50288ExcelWorkbook__write_global_recordsSerializes workbook global records. Writes 2 uint32 fields, then iterates through sheet entries calling flush_sector_buffer for each, with optional vector byte inserts at specific offsets. Calls write_BIFF_record_with_continuations at end.
0x00C9DE70276ExcelWorkbook__write_sheet_recordsSerializes sheet records. Writes 2 uint16 fields + 2 single-byte fields + 1 uint16 + 1 uint32, then copies a variable-length byte array from member vector. Calls write_BIFF_record_with_continuations.
0x00C9DF90276ExcelWorkbook__write_all_sheet_recordsSerializes all sheet records (same structure as write_sheet_records). Writes 2 uint16 + 2 bytes + 1 uint16 + variable-length byte array. Calls write_BIFF_record_with_continuations.
0x00C9E0B0171ExcelWorkbook__serialize_string_fieldSerializes a string field to a byte buffer. Writes length byte + type byte, then the string data. Supports both wide (wchar_t, type != 0) and narrow (char, type == 0) strings. Returns total bytes written (2 + string data length).
0x00C9E160201ExcelWorkbook__write_uint16_array_fieldWrites an array of uint16 values from a vector to the output buffer. Iterates through the vector writing each uint16 in little-endian, then calls the BIFF record continuation handler.
0x00C9E230202ExcelWorkbook__write_cell_recordSerializes a BIFF cell record. Writes record type uint16, then conditionally: if type is negative, writes 2 raw bytes; otherwise calls flush_sector_buffer for the cell data. Calls write_BIFF_record_with_continuations at end.
0x00C9E300399ExcelWorkbook__write_row_recordSerializes a BIFF row record. Writes 8 uint16 fields (at offsets 0x28 through 0x36) to the output buffer in little-endian. Calls write_BIFF_record_with_continuations.
0x00C9E490459ExcelWorkbook__write_dimension_recordSerializes a BIFF dimension record. Writes 9 uint16 fields (at offsets 0x28 through 0x38) in little-endian to the output buffer. Calls write_BIFF_record_with_continuations.
0x00C9E660404ExcelWorkbook__write_format_recordSerializes a BIFF format record. Writes 7 uint16 fields + 1 uint32 field (18 bytes total) in little-endian to the output buffer. Calls write_BIFF_record_with_continuations.
0x00C9E800373ExcelWorkbook__serialize_workbook_globalsSerializes workbook global records. Calls virtual serializers for: header record, font records, multiple arrays of XF/format/style/palette records (strides 0x44, 0x40, 0x4c, 0x3c), SST record, and a final record. Returns total serialized bytes.
0x00C9E980205ExcelWorkbook__serialize_sheet_recordsSerializes a sheet's records. Calls virtual serializers for header, cell index, row data, then iterates through cell records (stride 0x50), followed by footer and trailing records. Returns total serialized bytes.
0x00C9EA50333ExcelWorkbook__write_style_recordSerializes a BIFF style/XF record. Writes 3 uint16 fields + 4 raw bytes + 2 uint32 fields + 1 uint16 field (20 bytes total) in little-endian. Calls write_BIFF_record_with_continuations.
0x00C9EBA075ExcelWorkbook__write_SST_headerWrites an SST header: 1 uint16 + 1 uint32 (6 bytes total) to the output buffer in little-endian. Contains the string count and unique string count for the Shared String Table.
0x00C9EBF01964OLEStorage__write_stream_data_to_sectorsWrites stream data to OLE compound file sectors. Manages sector chain allocation: allocates new sectors if data grows, frees sectors if data shrinks, copies data to sectors in chunk size blocks. Handles both regular sectors (param_5 char==0, sector size from 0xbd) and mini-stream sectors (param_5 char!=0, sector size from 0xbc).
0x00C9F3A0110OLEStorage__add_stream_by_ansi_nameAdds a stream to the OLE storage by ANSI name. Converts the char* name to wchar_t via mbstowcs, then calls OLEStorage__write_stream_contents. The second param is dereferenced to get the stream data pointer. Frees the wide string after use.
0x00C9F410108OLEStorage__add_stream_by_ansi_name_directAdds a stream to the OLE storage by ANSI name (direct params). Converts char* name to wchar_t via mbstowcs, then calls OLEStorage__write_stream_contents with the data pointer directly. Frees the wide string after use.
0x00C9F48023OLEStorage__add_stream_by_wchar_nameThin wrapper: adds a stream by wchar_t name. Dereferences param_2 to get stream data, then calls OLEStorage__write_stream_contents.
0x00C9F4A0183OLEStorage__write_stream_contentsWrites stream contents to the OLE compound file. Navigates to the target directory entry by path, determines if data should be in regular sectors (>=0x1000 bytes) or mini-stream (<0x1000 bytes), transitions between modes if needed, writes data via OLEStorage__write_stream_data_to_sectors, then rebuilds FAT, updates directory entry, and writes FAT sectors and directory entries to disk.
0x00D588E0142CResourceCache__handle_multipart_dataHandles multi-part resource data. Part 0: initializes with offset/size, stores cursor. Part 1: appends data bytes to buffer via range insert. Part 2: compresses accumulated data and saves to file, then notifies UI window.
0x00E64260207zlib_compresszlib compress() - compresses source data into dest buffer using default compression level (-1). Initializes deflate stream, loops calling deflate until done.
0x00E64330208zlib_compress2zlib compress2() - compresses source data into dest buffer with specified compression level parameter.
0x00E6440030zlib_compressBoundzlib compressBound() - returns upper bound on compressed size for given source length. Formula: sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + (sourceLen >> 25) + 13.
0x00E64420284zlib_uncompresszlib uncompress() - decompresses source data into dest buffer. Initializes inflate stream, calls inflate in a loop. Returns 0 on success, error codes on failure.
0x00E64540288zlib_uncompress2zlib uncompress2() - decompresses with tracking of consumed source bytes via param_4.
0x00E646601029zlib_deflate_storedzlib deflate_stored() - handles stored (uncompressed) block output in deflate. Copies data directly when no compression needed, manages window sliding and lookahead buffer.
0x00E64A701047zlib_deflate_fastZlib deflate fast, small utility function
0x00E64E901381zlib_deflate_slowZlib deflate slow, small utility function
0x00E654002563zlib_deflatezlib deflate() main entry point. Manages deflate state machine (header writing, compression, trailer). Handles zlib/gzip/raw deflate formats. Dispatches to deflate_stored/fast/slow based on compression level.
0x00E65E10355zlib_deflateBoundzlib deflateBound() - returns upper bound on compressed size for given uncompressed size, accounting for stream format overhead.
0x00E65F80466zlib_deflateCopyzlib deflateCopy() - copies a deflate stream state from source to dest. Allocates new internal buffers, copies hash tables and window data.
0x00E66160232zlib_deflateEndzlib deflateEnd() - frees all dynamically allocated data structures for the stream. Returns Z_DATA_ERROR if state was busy.
0x00E66250144zlib_deflateGetDictionaryzlib deflateGetDictionary() - copies the current sliding window dictionary to the caller's buffer and reports its length.
0x00E662E0568zlib_deflateInit2zlib deflateInit2_() - full initialization with all parameters: level, method, windowBits, memLevel, strategy. Allocates internal state and hash tables.
0x00E6652033zlib_deflateInitzlib deflateInit_() - convenience wrapper calling deflateInit2 with default parameters (method=8, windowBits=15, memLevel=8, strategy=0).
0x00E66550406zlib_deflateParamszlib deflateParams() - dynamically changes compression level and strategy. Flushes pending data if strategy or function pointer changes.
0x00E666F0121zlib_deflatePendingzlib deflatePending() - returns pending output bytes and bits count.
0x00E66770228zlib_deflatePrimezlib deflatePrime() - inserts bits into the deflate output stream (up to 16 bits at a time).
0x00E66860398zlib_deflateResetzlib deflateReset() - resets deflate state for reuse. Clears hash tables, resets lookahead and match state, reinitializes Huffman trees.
0x00E669F0229zlib_deflateResetKeepzlib deflateResetKeep() - partial reset without clearing hash tables and configuration parameters.
0x00E66AE0490zlib_deflateSetDictionaryzlib deflateSetDictionary() - sets the deflate dictionary from caller-provided data, updating hash chains.
0x00E66CD0101zlib_deflateSetHeaderzlib deflateSetHeader() - sets the gzip header for deflate output (only valid for wrap mode 2).
0x00E66D40122zlib_deflateTunezlib deflateTune() - overrides internal deflate parameters (good_length, max_lazy, nice_length, max_chain).
0x00E66DC0523zlib_deflate_huffZlib deflate huff, small utility function
0x00E66FD0883zlib_deflate_rleZlib deflate rle, small utility function
0x00E67350519zlib_fill_windowzlib fill_window() - reads input into the deflate sliding window. Handles window sliding when position is past midpoint, updates hash chain entries, fills lookahead from z_stream input.
0x00E6756078zlib_flush_pendingzlib flush_pending() - flushes pending output from the internal buffer to the z_stream output. Copies min(available, pending) bytes via memcpy.
0x00E675B0371zlib_longest_matchzlib longest_match() - finds the longest string match in the hash chain for LZ77. Compares bytes with optimizations (check last two bytes first, scan 8 bytes at a time). Returns match length.
0x00E6773044zlib_putShortMSBzlib internal putShortMSB() - writes a 16-bit value in big-endian order to the deflate stream's pending output buffer. Increments pending count by 2.
0x00E67760123zlib_read_bufzlib read_buf() - reads input from z_stream into a buffer, updating adler32/crc32 checksum based on wrap mode.
0x00E677E098zlib_slide_hashzlib slide_hash() - slides hash table entries back by one window length. Entries pointing before the new window are zeroed. Called when the window slides forward.
0x00E678506048zlib_inflateCore zlib inflate (decompression) function. 6K bytes. Called by zlib_uncompress, zlib_uncompress2, png_zlib_inflate. Processes compressed data using Huffman tables, sliding window, and fast inflate path.
0x00E6908066zlib_inflateGetDictionary_indexzlib inflateGetDictionary index helper - returns the window index for the inflate dictionary, or -1 on error.
0x00E690D0374zlib_inflateCopyzlib inflateCopy() - copies an inflate stream from source to dest. Allocates new internal state and window buffer.
0x00E6925099zlib_inflateEndzlib inflateEnd() - frees all inflate stream resources (window buffer and internal state).
0x00E692C0128zlib_inflateGetDictionaryzlib inflateGetDictionary() - copies the inflate sliding window dictionary to caller buffer. Handles wraparound of the circular window buffer.
0x00E6934076zlib_inflateGetHeaderzlib inflateGetHeader() - registers a gz_header to receive gzip header info during inflate.
0x00E69390353zlib_inflateInit2zlib inflateInit2_() - initializes inflate state with windowBits parameter. Allocates internal state struct (0x1BD0 bytes).
0x00E6950024zlib_inflateInitzlib inflateInit_() - convenience wrapper calling inflateInit2 with default windowBits=15.
0x00E69520123zlib_inflateMarkzlib inflateMark() - returns current decompression position as a combined value of back distance and bytes consumed.
0x00E695A0127zlib_inflatePrimezlib inflatePrime() - inserts bits into inflate input bit buffer. Accepts negative value to clear.
0x00E69620290zlib_inflateResetzlib inflateReset() - resets inflate state for reuse. Clears counters, resets state machine to initial state, preserves window allocation.
0x00E69750179zlib_inflateReset2zlib inflateReset2() - resets inflate with new windowBits. Frees window if size changes.
0x00E69810213zlib_inflateResetKeepzlib inflateResetKeep() - minimal reset preserving more state than inflateReset.
0x00E698F0194zlib_inflateSetDictionaryzlib inflateSetDictionary() - sets the preset dictionary for inflate. Verifies adler32 checksum if in DICT state.
0x00E699C0321zlib_inflateSynczlib inflateSync() - searches for next valid deflate block in the input stream after a data error. Drains bit buffer, searches for sync point.
0x00E69B1079zlib_inflateSyncPointzlib inflateSyncPoint() - returns 1 if inflate is at a block boundary with no pending bits, 0 otherwise.
0x00E69B6070zlib_inflateUnderminezlib inflateUndermine() - enables/disables strict checking. Sets subvert flag and returns Z_DATA_ERROR.
0x00E69BB084zlib_inflateValidatezlib inflateValidate() - enables or disables checksum validation by setting/clearing bit 2 of the wrap field.
0x00E69C1099zlib_syncsearchzlib syncsearch() - searches for a sync point (00 00 FF FF) marker in inflate input. Used by inflateSync.
0x00E69C80237zlib_updatewindowzlib updatewindow() - copies output data to the inflate sliding window for dictionary/back-reference use.
0x00E69E501062zlib_tr_flush_blockzlib _tr_flush_block() - flushes a Huffman or stored block to the output. Builds literal/distance trees, decides between static/dynamic/stored encoding.
0x00E6A2E0257zlib_tr_stored_blockzlib _tr_stored_block() - outputs a raw stored (uncompressed) block to the deflate bit stream.
0x00E6A3F0175zlib_tr_tallyzlib _tr_tally() - stores a literal byte or distance/length pair to the pending buffer. Updates frequency counts for literal and distance Huffman trees. Returns true when the buffer is full and a block should be flushed. Previously misnamed as build_bl_tree.
0x00E6A580671zlib_build_treezlib build_tree() - constructs an optimal Huffman tree for a given frequency table. Computes code lengths and generates canonical Huffman codes.
0x00E6A8201052zlib_compress_blockzlib compress_block() - outputs a compressed block using the given literal and distance Huffman trees. Encodes each literal/length/distance triple.
0x00E6AC40505zlib_gen_bitlenZlib gen_bitlen: computes optimal bit lengths for a Huffman tree to minimize total encoding size.
0x00E6AE40133zlib_init_blockzlib init_block() - initializes/resets all three Huffman frequency tables (literal 0x11E entries, distance 0x1E entries, bit-length 0x13 entries) and related counters to zero. Sets literal END marker frequency to 1. Previously misnamed as gen_codes.
0x00E6AFC0242zlib_scan_treeZlib scan_tree: scans a Huffman tree to determine the frequencies of bit length codes for compact encoding.
0x00E6B0C0619zlib_send_all_treesZlib send_all_trees: emits the Huffman tree descriptions (literal, distance, bit length) into the compressed output stream.
0x00E6B3301292zlib_send_treezlib send_tree() - encodes and sends a Huffman tree to the output bitstream using bit-length codes with run-length encoding. Handles repeat codes (16, 17, 18) for zero runs and repeated lengths. Previously misnamed as tr_init.
0x00E6B8409thunk_to_zlib_adler32_z_impl_00e6b840Thunk that calls FUN_00e6b9c0 and returns
0x00E6B85025zlib_adler32_combineZlib adler32_combine: combines two Adler-32 checksums computed over sequential data blocks.
0x00E6B87025zlib_adler32_combine64Zlib adler32_combine64: 64-bit length version of adler32_combine for combining sequential Adler-32 checksums.
0x00E6B890291zlib_adler32_combine_internalzlib adler32 combine internal function. Combines two Adler-32 checksums from separate data blocks into a single checksum, using modular arithmetic with the Adler-32 prime (65521). Previously misnamed as adler32_z.
0x00E6B9C0625zlib_adler32_z_implzlib adler32_z() - computes Adler-32 checksum. Maintains two running sums (s1, s2) modulo 65521 (0xFFF1). Processes data in 16-byte unrolled chunks (NMAX=5552 bytes between modulo ops). Returns (s2 << 16) \| s1. Previously misnamed as crc32_z.
0x00E6BC409thunk_to_zlib_crc32_generic_00e6bc40Thunk that calls FUN_00e6bd10 and returns
0x00E6BC5036zlib_crc32_combineZlib crc32_combine: combines two CRC-32 checksums computed over sequential data blocks.
0x00E6BC8036zlib_crc32_combine64Zlib crc32_combine64: 64-bit length version of crc32_combine for combining sequential CRC-32 checksums.
0x00E6BCB021zlib_crc32_combine_genZlib crc32_combine_gen: generates a CRC-32 combine operator matrix for a given length.
0x00E6BCD021zlib_crc32_combine_gen64Zlib crc32_combine_gen64: 64-bit length version of crc32_combine_gen.
0x00E6BCF022zlib_crc32_combine_opZlib crc32_combine_op: combines a CRC-32 checksum using a precomputed operator matrix.
0x00E6BD101028zlib_crc32_genericZlib crc32_generic: computes CRC-32 checksum over a byte buffer using table-based polynomial division.
0x00E6C13062zlib_gf2_matrix_timesZlib gf2_matrix_times: multiplies a GF(2) matrix by a vector, used in CRC-32 combine operations.
0x00E6C170137zlib_gf2_matrix_squareZlib gf2_matrix_square: squares a GF(2) matrix in-place, used for CRC-32 combine operator generation.
0x00E6C20020png__get_data_table_ptrPNG data table accessor. Returns pointer from PTR_DAT_011bade8 indexed by negative offset of param_1. NOT zlib zcalloc.
0x00E6C22022zlib_zcalloc_implZlib zcalloc: allocates memory for zlib internal structures (items * size bytes via calloc).
0x00E6C24017zlib_zcfreeZlib zcfree: frees memory previously allocated by zcalloc.
0x00E6C2801304zlib_inflate_tableZlib inflate_table: builds Huffman decoding tables from a set of code lengths for inflate decompression.
0x00E6C7A01057zlib_inflate_fastZlib inflate_fast: optimized inner loop for inflate decompression, decodes literal/length and distance codes directly.
0x00E6CD8045png__icc_profile_check_lengthPNG ICC profile length validator. Returns 0 (via png__icc_profile_error with "too short") if param_4 < 0x84 (132 bytes minimum ICC header). Returns 1 if length is valid.
0x00E6CDB093png__validate_keyword_charsPNG keyword string validator. Checks that all 4 bytes extracted from input are valid keyword characters (alphanumeric or space). Returns 1 if all valid, 0 if any invalid.
0x00E6CE1052png__is_keyword_charPNG keyword character validator. Returns 1 if the character is a space (0x20), digit (0-9), uppercase letter (A-Z), or lowercase letter (a-z). Returns 0 otherwise.
0x00E6CE50763png__check_cHRM_fixedPNG cHRM chunk validator + xy-to-XYZ conversion. Validates chromaticity endpoints (range 0-100000), computes colorspace matrix using png__muldiv and png__reciprocal. Returns 0 on success, 1 on invalid values, 2 on math error.
0x00E6D150439png__colorspace_endpoints_normalizePNG colorspace endpoint normalizer. Takes 9 fixed-point color values (RGB x3 channels) and normalizes them so each row sums to 100000 using png__muldiv. Returns 0 on success, 1 on failure.
0x00E6D320275png__ascii_from_fixedPNG fixed-point to ASCII converter. Converts a fixed-point integer (scale factor 100000) to a decimal string. Handles negative values, writes digits with decimal point at position 5. Calls png__error if buffer too small (min 13 bytes).
0x00E6D4401141png__ascii_from_fp_doublelibpng: Converts a floating-point double value to an ASCII decimal string. Handles negative values, scientific notation (E+/E-), and precision control. Calls png__error if buffer is too small. This is the floating-point version; png__ascii_from_fixed handles fixed-point integers.
0x00E6D8C0400png__build_gamma_tablePNG gamma table builder. Allocates and populates gamma correction lookup tables. Uses png_calloc for table array, png_malloc for 256-entry sub-tables. Applies gamma-significant check to decide between linear scaling and power-curve calculation.
0x00E6DA50292png__build_16bit_gamma_tablelibpng: Builds a 16-bit gamma lookup table. Allocates a 2D table (shift-based subdivision) and fills entries using gamma correction values. Each table entry maps 16-bit color values through the gamma curve.
0x00E6DB8095png__build_8bit_gamma_tablelibpng: Builds an 8-bit (256-entry) gamma lookup table. If a gamma transform is active, maps each byte through the gamma function; otherwise fills with identity mapping (0-255).
0x00E6DBE0511png__build_gamma_tableslibpng: Master gamma table builder. Handles both 8-bit and 16-bit cases depending on bit depth. Builds encoding/decoding tables and optional alpha channel tables. Logs "gamma table being rebuilt" warning and frees old tables before rebuilding.
0x00E6DDE029png__build_default_palettelibpng: Builds a default color palette based on bit depth (1, 2, 4, 8-bit). Creates RGB triplets with evenly-spaced values for the given color depth. Switch cases handle different depths with appropriate step sizes.
0x00E6DE70109png__update_adler32libpng: Updates Adler-32 checksum (CRC) over a data buffer. Feeds data through the CRC calculation function in chunks, updating the running CRC stored at offset 0x13c in the PNG struct.
0x00E6DEE0509png__validate_IHDRlibpng: Validates all IHDR (Image Header) parameters. Checks width/height (zero, negative, user limit), bit depth (1/2/4/8/16), color type (0/2/3/4/6), interlace method, compression method, and filter method. Reports errors via png_error for invalid combinations.
0x00E6E0E0244png__parse_number_state_machinelibpng: State machine to parse a number from a character buffer. Handles digits (0-9), sign (+/-), decimal point (.), and exponent (E/e). Returns 1 if a valid number was found, updates state and position through output pointers.
0x00E6E27077png__check_number_stringlibpng: Checks if a string represents a valid number. Wrapper around png__parse_number_state_machine. Returns the parsed state if the entire string was consumed, 0 otherwise.
0x00E6E2C080png__save_uint_32_to_stringlibpng: Converts a 32-bit unsigned integer to a big-endian byte string with null terminator. Stores the 4 bytes in MSB-first order for PNG chunk data formatting.
0x00E6E31080png__check_chromaticity_endpointslibpng: Checks chromaticity endpoints (xy values). Calls png__colorspace_check_xy to validate, then copies the endpoint data to local buffer and calls png__colorspace_set_endpoints if invalid.
0x00E6E360134png__colorspace_check_gammalibpng: Checks gamma value against the colorspace. If gamma flag bit is not set, returns true. Otherwise validates the gamma value matches libpng or sRGB expectations. Warns on mismatch with appropriate error level based on param_4.
0x00E6E3F069png__colorspace_check_xylibpng: Validates chromaticity xy endpoints. Converts to XYZ, checks if XYZ values match within tolerance of 5 units, and returns 0 if valid, nonzero on error.
0x00E6E440214png__colorspace_endpoints_matchlibpng: Compares two sets of chromaticity/colorspace endpoints (8 int values each) within a given tolerance. Returns 1 if all 8 values match within the tolerance range, 0 otherwise.
0x00E6E520117png__icc_check_and_set_profilelibpng: Validates and sets an ICC color profile on the colorspace. Checks profile length, header, tag table, and attempts sRGB detection. Returns 1 on success, 0 if colorspace is already invalid. Previously misnamed as png__colorspace_set_chromaticities.
0x00E6E5A0110png__colorspace_set_chromaticities_from_xylibpng: Sets colorspace chromaticities from xy values. Validates the xy data, then calls png__colorspace_set_chromaticities_internal. Errors "invalid chromaticities" on bad data or fatal "internal error" on unexpected return.
0x00E6E610136png__colorspace_set_endpointslibpng: Sets colorspace endpoints from XYZ values. Copies 9 endpoint values to local storage, validates via png__check_chromaticity_endpoints, then stores into the colorspace. Errors "invalid end points" on bad data.
0x00E6E6A0124png__colorspace_set_gammalibpng: Sets gamma value on a colorspace structure. Validates gamma range (>= 16, < 0x2540BE40), checks for duplicates, verifies against existing gamma if check_gamma flag set. Stores gamma value and marks colorspace as having gamma.
0x00E6E720345png__colorspace_compute_XYZ_coefficientslibpng: Computes XYZ color coefficients from cHRM chunk data. Normalizes RGB-to-XYZ values so they sum to 0x8000 (the PNG fixed-point representation of 1.0). Adjusts the largest component to fix rounding. Fatal error on invalid cHRM data.
0x00E6E880264png__colorspace_set_sRGBlibpng: Sets sRGB colorspace with rendering intent. Validates intent (0-3), checks for duplicates, verifies cHRM matches sRGB standard values. Sets sRGB gamma (0xB18F=45455), sRGB chromaticities, and sRGB ICC profile data. Returns 1 on success, 0 on error.
0x00E6E990218png__colorspace_set_chromaticities_internallibpng: Internal implementation to set chromaticities on a colorspace. Checks for inconsistencies with existing chromaticities, copies xy and XYZ endpoint data, and checks if values match sRGB standard (within tolerance of 1000). Returns 2 on success, 0 on inconsistency.
0x00E6EA7093png__copy_colorspace_to_infolibpng: Copies colorspace data from png_struct (offsets 0x2C8-0x310) to png_info (offsets 0x28-0x70). Transfers chromaticity endpoints, XYZ coefficients, and gamma data. Calls png__update_info_colorspace_flags afterward.
0x00E6EAD0111png__update_info_colorspace_flagslibpng: Updates png_info valid flags based on colorspace status flags. Sets/clears sRGB (0x800), cHRM (0x4), and gAMA (0x1) valid bits in info_ptr->valid (offset 0x8) based on the colorspace status word at offset 0x72.
0x00E6EB40467png__icc_check_known_sRGB_profileslibpng: Checks an ICC profile against known sRGB profiles. Compares profile header fields (MD5, size, date) against a table of 7 known sRGB profiles. Warns about out-of-date or incorrect profiles. Returns match index + 1, or 0 if no match.
0x00E6ED2060png__convert_time_to_stringlibpng: Converts a png_time struct to a formatted string. Writes to buffer at png_struct+0x214. Warns "Ignoring invalid time value" on validation failure.
0x00E6ED60415png__format_time_stringlibpng: Formats a png_time to a human-readable date string (e.g. "DD Mon YYYY HH:MM:SS +0000"). Validates year<10000, month 1-12, day 1-31, hour<24, minute<60, second<61. Returns 1 on success, 0 on invalid time.
0x00E6EF0054png__create_info_structlibpng: Allocates and zero-initializes a png_info struct (0x118 bytes). Returns pointer to the new info struct, or NULL if png_ptr is NULL or allocation fails.
0x00E6EF40397png__create_read_structlibpng: Creates a PNG read structure. Initializes a local png_struct with error handling (setjmp), user limits (1M width/height, 1000 chunks), and callbacks. Copies the struct to a heap-allocated buffer (0x314 bytes). Returns the read struct or NULL on failure.
0x00E6F0D065png__data_freerlibpng: Sets or clears data ownership flags for png_info data. param_3=1 sets the flag bits (png frees), param_3=2 clears them (user frees). Fatal error on unknown freer parameter. Flags stored at info_ptr offset 0xF4.
0x00E6F120361png__free_gamma_tableslibpng: Frees all gamma lookup tables from the PNG struct. Releases the 8-bit table (offset 0x190), 16-bit table arrays (offsets 0x194, 0x1A0, 0x1A4) including their sub-tables, and the background gamma table (0x198, 0x19C). Nullifies all pointers after freeing.
0x00E6F29072png__destroy_info_structlibpng: Destroys a png_info struct. Frees owned data via png__free_info_data, zeroes the 0x118 byte struct, then frees the struct itself. Sets the info pointer to NULL.
0x00E6F2E096png__float_to_fixed_pointlibpng: Converts a double-precision float to PNG fixed-point integer (multiplied by 100000). Floors the result with 0.5 rounding. Fatal error if result overflows int range.
0x00E6F3401228png__free_info_datalibpng: Frees data owned by a png_info struct based on ownership flags (offset 0xF4). Handles text chunks (0x4000), tRNS (0x2000), sCAL (0x100), iCCP (0x80), sPLT (0x20), unknown chunks (0x200), PLTE (0x1000), hIST (0x8), pCAL (0x10), rows (0x40), and eXIf (0x8000). Clears corresponding valid bits.
0x00E6F810106png__gamma_16bit_correctlibpng: Applies gamma correction to a 16-bit value. Converts to [0,1] range, raises to gamma power via pow(), and converts back to 16-bit. Returns input unchanged for 0 and 0xFFFF edge cases.
0x00E6F880111png__gamma_8bit_correctlibpng: Applies gamma correction to an 8-bit value. Converts to [0,1] range (divides by 255.0), raises to gamma power via pow(), and converts back to 8-bit. Returns input unchanged for 0 and 255.
0x00E6F8F044png__gamma_correctlibpng: Applies gamma correction to a color value. Dispatches to 8-bit or 16-bit gamma correction based on bit depth (offset 0x154). Returns corrected value masked to appropriate bit width.
0x00E6F92024png__gamma_significantlibpng: Returns true if a gamma value is significantly different from 1.0. Tests if value is outside range 95000-105000 (i.e. not within 5% of unity/100000).
0x00E6F9506png__get_version_string_ptrlibpng: Returns pointer to the libpng version string at DAT_0111ade0.
0x00E6F97017png__get_io_ptrlibpng: Returns the I/O pointer (user data) stored at offset 0x60 in the png_struct. Returns 0 if png_ptr is NULL.
0x00E6F9909thunk_to_png__get_version_string_ptrThunk to png__get_version_string_ptr, returns pointer to the libpng version string.
0x00E6F9A064png__get_chunk_filter_flaglibpng: Looks up a chunk name in the chunk filter list (stored at offsets 0x244/0x248). Searches backward through the list of 5-byte entries (4-byte chunk name + 1-byte flag). Returns the flag byte if found, 0 if not found or list is empty.
0x00E6F9E0779png__icc_check_headerlibpng: Validates an ICC profile header. Checks: length match, alignment, tag count, rendering intent (0-3), signature ('acsp'), PCS illuminant (D50), color space (GRAY/RGB matching image type), profile class (mntr/scnr/prtr/spac allowed, abst/link/nmcl rejected), and PCS encoding (Lab/XYZ). Returns 1 if valid.
0x00E6FCF083png__icc_check_lengthlibpng: Checks ICC profile length against application limits. First validates basic length, then checks if it exceeds the user-specified maximum profile length (offset 0x288). Returns 1 if valid, 0 if exceeds limit.
0x00E6FD50253png__icc_check_tag_tablelibpng: Validates ICC profile tag table entries. Checks that each tag's offset+size fits within the profile, and that tag offsets are 4-byte aligned. Returns 1 if all tags are valid.
0x00E6FE50310png__icc_profile_errorlibpng: Formats and reports an ICC profile error. Builds a message like "profile '<name>': <value>: <description>". Sets the colorspace invalid flag (0x8000) if a colorspace is provided. Reports as warning (level 1) or error (level 2) depending on whether colorspace was provided.
0x00E6FF9075png__icc_set_sRGB_if_knownlibpng: Checks if the ICC profile matches a known sRGB profile and if so, sets sRGB colorspace with the rendering intent extracted from the profile header at offset 0x40.
0x00E6FFE021png__sanitize_byte_to_printablelibpng: Sanitizes a byte to printable ASCII range. Returns the byte if in range [0x20, 0x7E], otherwise returns '?' (0x3F).
0x00E7000072png__format_chunk_taglibpng: Formats a 4-byte chunk tag into a quoted printable string like "'IHDR'". Sanitizes each byte to printable ASCII, wrapping in single quotes.
0x00E7005041png__image_errorlibpng: Sets an error message on a png_image struct. Copies the error string to the message buffer (offset 0x20, max 0x40), sets the error flag bit (0x2) in flags at offset 0x1C, then calls the cleanup handler.
0x00E7008047png__image_freelibpng: Frees a png_image's internal control structure. Checks that the image, control pointer, and reference count (at control+8) are valid. Calls the cleanup callback then NULLs the control pointer.
0x00E700B0157png__image_read_cleanuplibpng: Cleanup callback for png_image read operations. Closes the FILE handle if owned (flag bit 2), copies control data to stack, frees the control struct, then calls either png_read_end or png_destroy_read_struct depending on the high-bit flag. Returns 1 on success, 0 if no png_ptr.
0x00E7015074png__image_init_infolibpng: Initializes or reallocates a png_info struct for a png_image. If the existing struct is too small (< 0x118 bytes), frees it and allocates a new one. Zeroes the 0x118-byte struct.
0x00E701A018png__set_io_ptrlibpng: Sets the I/O pointer (user data) at offset 0x60 in png_struct. This is typically a FILE* or custom I/O struct used by read/write callbacks.
0x00E701C0164png__muldivlibpng: Computes (param_2 * param_3) / param_4 with overflow protection using double-precision float intermediary. Returns 1 on success (result stored in *param_1), 0 on division by zero or overflow.
0x00E7027058png__muldiv_warnlibpng: Wrapper around png__muldiv that warns on overflow. Returns the computed value, or 0 with a "fixed point overflow ignored" warning on failure.
0x00E702B0113png__pow2libpng: Computes 2^n using repeated squaring (exponentiation by squaring). Handles negative exponents by computing 1/(2^\|n\|). Returns 0 for very negative values (< -307). Used for floating-point gamma calculations.
0x00E70330110png__reciprocal2libpng: Computes the product of two values scaled by a constant (reciprocal of 100000). Used for combining two gamma values. Returns 0 on overflow.
0x00E703A0103png__reciprocallibpng: Computes the reciprocal of a gamma value (constant / param_1). Used to invert gamma for encoding/decoding. Returns 0 on overflow.
0x00E70410126png__reciprocal_productlibpng: Computes constant / (param_1 * param_2) for gamma inverse product. Used when combining screen gamma and file gamma. Returns 0 on overflow or if either input is 0.
0x00E7049028png__reset_crclibpng: Resets the CRC-32 value in png_struct (offset 0x13C) to initial state by calling crc32(0, NULL, 0).
0x00E704B031png__reset_zstreamlibpng: Resets the zlib decompression stream. Returns -2 (Z_STREAM_ERROR) if png_ptr is NULL, otherwise delegates to inflateReset.
0x00E704D05png__save_uint_32libpng: png_save_uint_32, stores a 32-bit integer as 4 big-endian bytes to a buffer. Standard PNG byte-order serialization.
0x00E704E085png__set_check_for_invalid_indexlibpng: Sets the palette index checking mode. param_2 selects which 2-bit field in the mode word (offset 0x210) to modify. param_3 controls the new value (2 if 0, 3 if nonzero). Returns the previous value of that field.
0x00E7054044png__set_sig_byteslibpng: Tells libpng how many PNG signature bytes have already been read. Stores count at offset 0x159. Fatal error if count exceeds 8 (the full PNG signature length).
0x00E70570223png__sig_cmplibpng: Compares bytes against the PNG signature (89 50 4E 47 0D 0A 1A 0A). param_2 is the starting offset into the signature, param_3 is the number of bytes to check. Returns 0 if match, -1 or 1 on mismatch.
0x00E70650293png__check_versionlibpng: Checks if the application was compiled with a compatible libpng version. Compares the compile-time version string against the runtime version up to the second dot. Warns "Application built with libpng X but running with Y" on mismatch. Returns 1 if compatible.
0x00E70780332png__xy_from_XYZlibpng: Converts XYZ colorspace values to xy chromaticity coordinates. Computes x=X/(X+Y+Z) and y=Y/(X+Y+Z) for R, G, B primaries and white point using png__muldiv. Returns 0 on success, 1 on overflow.
0x00E708D059png__zalloclibpng: Allocator callback for zlib. Computes total size (items * size) with overflow check. Warns "Potential overflow in png_zalloc" if multiplication would overflow. Returns allocated memory or NULL.
0x00E709105thunk_to_png_free_defaultThunk to png_free_default, calls the custom free callback at png_ptr+0x264 if set, otherwise falls through to png_free_default (C free).
0x00E70920157png__set_zlib_error_messagelibpng: Maps zlib return codes to human-readable error strings. Handles Z_STREAM_END(1), Z_NEED_DICT(2), Z_ERRNO(-1), Z_STREAM_ERROR(-2), Z_DATA_ERROR(-3), Z_MEM_ERROR(-4), Z_BUF_ERROR(-5), Z_VERSION_ERROR(-6), and a special truncated code(-7). Stores message at offset 0x9C only if not already set.
0x00E709F0104png__image_sample_convertlibpng: Converts an 8-bit sample value to the target encoding (linear/sRGB/gamma). Mode 1: lookup table, mode 3: gamma correction via png__gamma_16bit_correct, mode 4: simple 8-to-16 bit expansion (multiply by 0x101), default: pass through.
0x00E70A60160png__image_create_colormap_alphalibpng: Creates a colormap with alpha channel entries. Generates grayscale ramp entries (0x73 step/0xE7 divisor), a fully transparent white entry, then additional alpha-graduated entries in 0x33 steps. Each entry is added via png__image_add_colormap_entry.
0x00E70B0051png__image_create_colormap_graylibpng: Creates a 256-entry grayscale colormap. Each entry maps index N to (R=N, G=N, B=N, A=0xFF) with encoding mode 1 (sRGB).
0x00E70B4051png__image_create_colormap_gray_linearlibpng: Creates a 256-entry linear grayscale colormap. Same as gray version but uses encoding mode 3 (linear/gamma-corrected) instead of mode 1 (sRGB).
0x00E70B8090png__image_create_colormap_rgblibpng: Creates a 6x6x6 RGB color cube colormap (216 entries). Iterates R, G, B in steps of 0x33 (0, 51, 102, 153, 204, 255) producing 216 entries, all with alpha=0xFF and encoding mode 1 (sRGB).
0x00E70BE0131png__image_compose_samplelibpng: Composites a foreground sample over a background sample using alpha blending. Converts both samples via png__image_sample_convert, blends using alpha, then converts back to target encoding (sRGB lookup table or linear).
0x00E70C701286png__image_add_colormap_entrylibpng: Adds a single RGBA entry to a colormap at the given index. Handles color type conversion (grayscale vs RGB), encoding conversion (sRGB/linear/gamma), alpha premultiplication for linear mode, and different output formats (8-bit/16-bit, with/without alpha, BGR/RGB order). Fatal error on index >= 256 or encoding mismatch.
0x00E711A031png__create_read_struct_simplelibpng: Simplified wrapper for png__create_read_struct_2 that passes NULL for the custom memory allocator/deallocator. Creates a png_read_struct with just version, error_ptr, error_fn, and warning_fn.
0x00E711C081png__create_read_struct_2libpng: Creates a PNG read struct with custom allocator. Calls png__create_read_struct, sets mode flags (0x300000), valid flag (0x8000), chunk limit (0x2000), and configures CRC handling via set_crc_action(0,0).
0x00E7122061png__destroy_read_structlibpng: Destroys a PNG read struct and its associated info structs. Destroys both end_info and info structs, then calls png_read_destroy to clean up internal state, and finally frees the png_struct itself.
0x00E71260210png__do_read_transformations_rgb_deltalibpng: Applies RGB delta decoding to a row. For color types 2 (RGB) and 6 (RGBA), converts delta-encoded R,G,B channels by adding the G channel value to R and B. Handles both 8-bit and 16-bit (big-endian) samples.
0x00E7134057png__gamma_threshold_checklibpng: Checks if gamma correction is needed. Returns 1 if gamma >= 100000 (trivially above), 0 if gamma is 0, or delegates to png__gamma_significant to check if gamma differs meaningfully from 1.0.
0x00E71380171png__image_begin_read_from_filelibpng: Begins reading a PNG image from a file path. Validates state (version must be 1), opens the file with fopen, initializes read control, sets the FILE pointer as I/O ptr, marks the file as owned (flag 2), and starts header reading. Closes file on init failure.
0x00E71430139png__image_begin_read_from_memorylibpng: Begins reading a PNG image from a memory buffer. Validates state and params, sets up the memory buffer pointer and length in the control struct, installs a custom memory read callback, and starts header reading.
0x00E714C0106png__image_begin_read_from_stdiolibpng: Begins reading a PNG image from an open FILE* (stdio). Validates state and non-null FILE, sets FILE as the I/O pointer (without owning it), and starts header reading.
0x00E71530466png__image_finish_readlibpng: Completes reading a PNG image into user buffer. Validates parameters (buffer, stride, overflow), determines colormap vs direct mode, dispatches to appropriate colormap or direct read processor, then frees the image control. Returns 1 on success.
0x00E7171066png__image_get_format_flagslibpng: Gets the image format flags from the PNG struct. Bit 0: alpha channel present, bit 1: color (not grayscale), bit 2: 16-bit depth, bit 3: interlaced. Checks color type, tRNS presence, bit depth, and interlace flag.
0x00E7176097png__image_memory_read_callbacklibpng: Custom read callback for memory-based PNG reading. Copies requested bytes from the memory buffer, advancing the pointer and decreasing remaining length. Fatal error "read beyond end of data" if buffer exhausted or "invalid memory read" if I/O pointer is NULL.
0x00E717D0474png__image_read_colormap_to_indexedlibpng: Reads PNG rows and converts to colormap-indexed output. Handles different colormap encoding types (gray+alpha, gray+transparent, RGB, RGBA) with interlace support. Processes each pixel through quantization to find nearest colormap index for output.
0x00E71B701467png__image_read_direct_alpha_composelibpng: Reads PNG rows with alpha compositing for direct (non-colormap) output. Handles 8-bit and 16-bit grayscale with alpha, compositing against background color using sRGB lookup tables. Supports both transparent background and user-specified background with interlace handling.
0x00E72130301png__image_read_colormap_setuplibpng: Sets up colormaps for simplified API image reading. Handles all PNG color types (gray, palette, gray+alpha, RGB, RGBA) with optional transparency, background composition, and gamma correction. Creates appropriate colormap entries and configures read transforms. Very complex function handling all colormap generation cases.
0x00E72FF096png__image_read_colormap_processlibpng: Processes colormap-based PNG image reading. Validates the expected post-transform format, sets up row buffer, and either directly reads rows to output or dispatches to png__image_read_colormap_to_indexed for indexed conversion. Handles interlace passes and palette max calculation.
0x00E731D0642png__image_read_direct_alpha_blend_rowslibpng: Reads PNG rows with per-pixel alpha blending for direct output. Composites each pixel against background using sRGB linearization tables. Handles interlaced images, supports both gray+alpha and RGB+alpha color types. Used when alpha needs compositing but output is 8-bit sRGB.
0x00E734601207png__image_read_directlibpng: Main direct (non-colormap) image read function. Sets up all necessary transforms (color conversion, gamma, alpha handling, bit depth, interlace, swap), reads rows into user buffer. Dispatches to alpha blend/compose helpers when needed. Handles format flag mismatches with fatal errors.
0x00E73920166png__image_read_headerlibpng: Reads and processes the PNG header for the simplified API. Calls png_read_info, extracts width/height/format flags, detects sRGB colorspace capability, and determines maximum colormap size based on color type and bit depth. Stores results in the image control struct.
0x00E739D0203png__image_read_init_controllibpng: Initializes the internal control structure for the simplified PNG image read API. Creates read struct, info struct, and a 0x18-byte control block. Sets error/warning callbacks and links everything together. Returns 1 on success, 0 with error message on failure.
0x00E73AA039png__set_keep_unknown_chunkslibpng: Configures handling of unknown chunks. Sets default behavior to keep=1 (handle normally), then sets specific chunk types from a list of 6 chunks (at DAT_011bc338) to default handling (keep=0).
0x00E73AD0314png__read_destroylibpng: Destroys internal state of a PNG read struct. Frees gamma tables, IDAT buffer, row buffer, previous row, chunk list, palette (if owned), tRNS data (if owned), zlib stream, old row buffer, and all other allocated memory. Nullifies all pointers.
0x00E73C10833png__read_endlibpng: Reads remaining chunks after image data (IEND). Finishes IDAT processing, checks palette index warnings, then loops reading chunk headers and dispatching to appropriate handlers (IHDR, IEND, PLTE, bKGD, cHRM, eXIf, gAMA, hIST, oFFs, pCAL, sCAL, pHYs, sBIT, sRGB, iCCP, sPLT, tEXt, tIME, tRNS, zTXt, iTXt) until IEND is found.
0x00E73F60170png__read_imagelibpng: Reads the entire PNG image into an array of row pointers. Handles interlace by reading multiple passes. If interlace handling is not set up by the user, warns about it. Calls png_read_row for each row in each interlace pass.
0x00E74010810png__read_infolibpng: Reads PNG header and all chunks before image data. Reads signature, then loops reading chunk headers and dispatching to handlers until IDAT is found. Handles all standard chunk types (IHDR, PLTE, bKGD, cHRM, eXIf, gAMA, hIST, oFFs, pCAL, sCAL, pHYs, sBIT, sRGB, iCCP, sPLT, tEXt, tIME, tRNS, zTXt, iTXt). Returns with IDAT length stored for subsequent row reading.
0x00E74340456png__read_pnglibpng: High-level function to read an entire PNG. Reads header info, applies requested transforms (strip 16-bit, strip alpha, packing, expand, etc. based on flags), allocates row pointers, reads all image data, then reads post-IDAT chunks. The transform flags are standard libpng PNG_TRANSFORM_* values.
0x00E74510779png__read_rowlibpng: Reads and processes a single row of PNG image data. Handles interlace pass tracking, reads IDAT data, applies PNG row filter (sub/up/average/paeth), applies read transforms, handles interlace row expansion and combination with previous pass data. Calls the row callback if set.
0x00E74840141png__read_rowslibpng: Reads multiple rows of PNG image data. Iterates param_4 times calling png__read_row. Supports separate row and display row arrays (either can be NULL). Advances row pointers after each call.
0x00E748D055png__read_update_infolibpng: Updates the png_info struct to reflect the effect of applied transforms. Must be called after setting transforms but before reading rows. Starts the row processing if not already started, then updates the info struct fields. Warns if called after rows have already been read.
0x00E7491021png__set_strip_alpha_00e74910Sets the strip alpha flag on a PNG read structure. If param_1 is non-null, stores param_2 at offset 0x1C4 to configure alpha channel stripping behavior.
0x00E7493041png__start_read_imagelibpng: Starts PNG image row reading. If not already started (flag 0x40 not set), calls png_read_start_row to initialize. If already started, logs a warning or error based on mode flags.
0x00E7496091png__image_determine_encodinglibpng: Determines the encoding mode for simplified API image reading based on gamma. Mode 4: gamma insignificant (pass through), mode 3: gamma needs correction (computes reciprocal), mode 1: gamma below threshold (sRGB).
0x00E749C033png__app_warning_or_errorlibpng: Issues a warning if mode flag 0x400000 is set, otherwise issues a fatal error. Used when the application calls a function in an unexpected state (e.g., calling read_update_info after rows started).
0x00E749F033png__app_error_or_warninglibpng: Issues a warning if mode flag 0x200000 is set, otherwise issues a fatal error. Similar to png__app_warning_or_error but checks different flag bit.
0x00E74A2086png__chunk_benign_errorlibpng: Reports a benign chunk error. Behavior depends on mode flags: if 0x100000 set, issues warning (with chunk prefix if inside a chunk); otherwise issues fatal error (with chunk prefix if inside a chunk and flag 0x8000 is set).
0x00E74A8033png__chunk_error_or_warninglibpng: Reports a chunk error. If mode flag 0x100000 is set, issues a chunk warning; otherwise issues a fatal chunk error. Used for errors that may be non-fatal in some modes.
0x00E74AB056png__formatted_chunk_errorlibpng: Formats a chunk error message with the current chunk name prefix and issues a fatal error. Prepends the chunk tag to the error message using png__format_error_string.
0x00E74AF071png__chunk_reportlibpng: Reports a chunk-related issue at a given severity level. Level 0: error or warning (via app_error), level 1: warning or error (via app_warning), level 2+: chunk warning if inside chunk (flag 0x8000 set), otherwise chunk error.
0x00E74B4078png__formatted_chunk_warninglibpng: Formats a chunk warning message with the current chunk name prefix and issues a warning. Prepends the chunk tag to the message using png__format_error_string if png_ptr is valid.
0x00E74B9076png__default_error_handlerlibpng: Default error handler. Prints "libpng error: <message>" to stderr, calls abort via png_longjmp. Uses __debugbreak (int 3) as fallback if longjmp fails. Replaces NULL message with "undefined".
0x00E74BE056png__default_warning_handlerlibpng: Default warning handler. Prints "libpng warning: <message>" followed by a newline to stderr.
0x00E74C2037png__errorlibpng: Issues a fatal PNG error. Calls the user error handler if set (offset 0x4C), then falls through to the default error handler. This function never returns - it either longjmps or aborts.
0x00E74C50110png__fixed_point_overflow_errorlibpng: Issues a "fixed point overflow" fatal error with an appended context message. Copies the context string (up to 0xC3 chars) after the overflow prefix and calls png__error.
0x00E74CC0273png__format_error_stringlibpng: Formats an error/warning string with the current chunk name prefix. Converts the 4-byte chunk tag at offset 0x11C to printable form (non-alpha bytes shown as [XX]), appends ": " and the error message. Output buffer receives "XXXX: message".
0x00E74DE0297png__format_numberlibpng: Formats an unsigned integer into a string buffer (right-to-left). Supports decimal (mode 1-2), hexadecimal (mode 3-4), and fixed-point decimal with 5 fractional digits (mode 5). Modes 2,4 pad to minimum 2 characters. Returns pointer to the start of the formatted string.
0x00E74F20219png__formatted_warninglibpng: Formats a warning message with parameter substitution. '@1' through '@8' in the format string are replaced with 32-byte string parameters from the params array. Builds the result into a 192-byte buffer and calls png__warning.
0x00E75000136png__safe_execute_jmpbuf_cleanuplibpng: Cleans up the setjmp/longjmp error handling context. If a different jmp_buf was installed (not the struct itself), frees it via a temporary setjmp context. Clears the longjmp callback, jmp_buf pointer, and error return address.
0x00E7509017png__get_error_ptrlibpng: Returns the user-defined error pointer stored at offset 0x54 in the png_struct. Returns 0 if png_ptr is NULL.
0x00E750B041png__longjmplibpng: Performs a longjmp to exit the current PNG operation. Calls the longjmp function pointer at offset 0x40 with the jmp_buf at offset 0x44. If longjmp is not set up, calls ExitProcess(0) as fallback.
0x00E750E094png__image_error_callbacklibpng: Error callback for the simplified API. Gets the png_image from the error pointer, copies the error message, sets the error flag (bit 2), then longjmps back to the safe execute point. Aborts if longjmp fails, prepending "bad longjmp: " to the message.
0x00E75140143png__safe_executelibpng: Safely executes a callback function with error recovery. Sets up a setjmp point, installs it in the control struct, calls the callback. On error (longjmp), frees the image. Returns callback result on success, 0 on error.
0x00E751D042png__image_warning_callbacklibpng: Warning callback for the simplified API. Stores the first warning message in the image's message buffer (offset 0x20, max 0x40) and sets warning flag (bit 1). Ignores subsequent warnings if flags are already set.
0x00E7520061png__safe_strcpylibpng: Safe string copy with bounds checking. Copies from param_4 to param_1 starting at offset param_3, up to param_2-1 characters. Always null-terminates. Returns void but effectively acts as strlcpy into a buffer region.
0x00E7524030png__set_error_fnlibpng: Sets the error handling functions and user error pointer. Stores error_ptr at offset 0x54, error_fn at offset 0x4C, and warning_fn at offset 0x50 in the png_struct.
0x00E75260127png__set_longjmp_fnlibpng: Sets the longjmp function and allocates the jmp_buf. If jmp_buf not yet allocated and size > 0x40, allocates from heap; otherwise uses inline buffer at png_struct base. Validates size consistency on subsequent calls. Returns pointer to jmp_buf or 0 on failure.
0x00E752E090png__warninglibpng: Issues a PNG warning. If the message starts with '#', skips the numeric prefix (up to 15 chars before a space). Calls user warning handler if set (offset 0x50), otherwise calls the default warning handler.
0x00E7534043png__warning_parameter_setlibpng: Sets a string parameter for formatted warnings. param_2 (1-8) selects which of 8 parameter slots (each 32 bytes) to write the string value into.
0x00E7537098png__warning_parameter_signedlibpng: Sets a signed integer warning parameter. Formats the number using png__format_number, prepends '-' for negative values, and stores in the specified parameter slot.
0x00E753E068png__warning_parameter_unsignedlibpng: Sets an unsigned integer warning parameter. Formats the number using png__format_number and stores in the specified parameter slot.
0x00E75430122png__fixed_from_doublelibpng: Converts a double-precision gamma value to PNG fixed-point integer. If value is between 0 and a threshold, multiplies by 100000. Rounds with floor(x+0.5). Fatal "gamma value" overflow error if result exceeds int range.
0x00E754B092png__do_chop_16to8libpng: Chops 16-bit samples down to 8-bit by keeping only the high byte. Copies every other byte, then updates the row info to reflect 8-bit depth.
0x00E755104367png__do_read_transformations_backgroundlibpng: Applies background compositing and gamma correction during row read. Handles all color types (gray 1/2/4/8/16 bit, RGB 8/16 bit, gray+alpha 8/16, RGBA 8/16). Replaces transparent pixels with background color and applies gamma tables for correction. Very large function (~4.3KB) handling all pixel format combinations.
0x00E76670232png__do_encode_alphalibpng: Encodes/transforms alpha channel values through gamma table. For 8-bit: applies background gamma table lookup. For 16-bit: applies 16-bit gamma table lookup. Only processes color types with alpha (4, 6). Warns on unexpected call conditions.
0x00E767601067png__do_expand_tRNSlibpng: Expands transparency (tRNS) data into a full alpha channel. For grayscale: expands 1/2/4-bit to 8-bit first, then adds alpha. For RGB: adds alpha channel based on tRNS color match. Handles both 8-bit and 16-bit samples. Updates row info color type and channel count.
0x00E76B9075png__do_expand_16libpng: Expands 8-bit samples to 16-bit by duplicating each byte. Only applies to non-palette color types at 8-bit depth. Updates row info to reflect 16-bit depth.
0x00E76BE0621png__do_expand_palettelibpng: Expands palette-indexed pixels to RGB or RGBA. First unpacks sub-byte (1/2/4-bit) indices to 8-bit. Then looks up each index in the palette to get RGB values, optionally adding alpha from tRNS data. Updates color type to RGB(A) and adjusts row info.
0x00E76E50992png__do_gamma_correctionlibpng: Applies gamma correction to pixel data using precomputed gamma tables. Handles all color types (gray 2/4/8/16 bit, RGB 8/16, gray+alpha 8/16, RGBA 8/16). For sub-byte gray (2/4 bit), applies gamma per packed pixel. Uses 8-bit lookup table or 16-bit 2D table depending on depth.
0x00E77250435png__do_gray_to_rgblibpng: Converts grayscale pixels to RGB by triplicating each sample. Handles gray (type 0) and gray+alpha (type 4) for both 8-bit and 16-bit depths. Works right-to-left to expand in-place. Updates color type to include RGB flag.
0x00E77410366png__do_quantizelibpng: Quantizes RGB/RGBA pixels to palette indices. For RGB (type 2) and RGBA (type 6): looks up each pixel in a quantize table using (R&F8)<<5\|(G&F8)<<2\|(B>>3) as index. For palette (type 3): remaps indices through a translation table. Only works at 8-bit depth.
0x00E77580677png__do_read_fillerlibpng: Adds a filler byte/word to pixel data (e.g., adding alpha=0xFF to RGB to make RGBA). Handles gray and RGB at both 8-bit and 16-bit. The filler can be prepended (param_4 & 0x80) or appended based on flags. Expands in-place right-to-left. Updates channel count and row info.
0x00E77830145png__do_read_invert_alphalibpng: Inverts alpha channel values (alpha = ~alpha). Handles color types 6 (RGBA) and 4 (gray+alpha) at both 8-bit and 16-bit depth. Works backwards through the row data.
0x00E778D0264png__do_read_swap_alphalibpng: Swaps alpha channel position in pixel data. For RGBA: moves alpha from last to first position (RGBA -> ARGB). For gray+alpha: swaps GA -> AG. Handles both 8-bit and 16-bit. Works backwards through row.
0x00E779E01080png__do_read_transformationsApplies all configured PNG read transformations to a row of pixels. Checks transformation flags at offset 0x7C and applies in order: palette expansion, tRNS expansion, strip alpha, RGB to gray, gray to RGB, background compositing, gamma correction, scale 16-to-8, chop 16-to-8, quantize, expand 16, invert, swap alpha, shift, unpack, BGR swap, packswap, filler, swap bytes, and user transform callback. Updates row info after each applicable transformation.
0x00E77E201031png__do_rgb_to_grayConverts RGB pixel data to grayscale using configurable weights. Handles 8-bit and 16-bit color depths, with and without alpha channel. Uses red/green/blue weighting coefficients from the PNG struct (offsets 0x24E, 0x250). Supports both direct computation and gamma-corrected lookup table paths. Returns 1 if any non-gray pixels were found, 0 otherwise.
0x00E7823096png__do_scale_16to8libpng: Scales 16-bit samples down to 8-bit with proper rounding (not just truncation). Uses the formula: out = hi + ((lo - hi + 128) * 65535 >> 24). Updates row info to 8-bit depth.
0x00E78290359png__do_unpacklibpng: Unpacks sub-byte samples (1, 2, or 4-bit) to one sample per byte. Expands in-place right-to-left to avoid overwriting. For 1-bit: extracts each bit. For 2-bit: extracts 2-bit values. For 4-bit: extracts nibbles. Updates row info to 8-bit depth.
0x00E78400514png__do_shiftlibpng: Applies sBIT-based bit depth reduction by right-shifting samples. Computes shift amounts from the difference between actual bit depth and sBIT values for each channel. Handles 2/4/8/16-bit samples across all non-palette color types. Skips if no significant shift is needed.
0x00E7863059png__gamma_not_sRGBlibpng: Returns 1 if the product of two gamma values is significantly different from sRGB (i.e., the combined gamma correction is meaningful). Returns 0 if the result is close to unity or calculation overflows.
0x00E78670328png__init_read_transformationslibpng: Initializes read transform state. Processes tRNS data to determine alpha handling, sets up background color from palette if needed, and optionally inverts tRNS alpha data when both tRNS and background are active in non-alpha-strip mode. Handles the tRNS inversion in 64-byte blocks for performance.
0x00E787C02769png__init_gamma_and_backgroundlibpng: Main initialization of gamma correction and background compositing for read transforms. Sets up gamma tables, computes background gamma correction, handles palette gamma for indexed images, applies sBIT shift to palette, and configures all gamma-related transform flags. Called during png_read_start_row.
0x00E792A0214png__init_non_palette_transformslibpng: Initializes transform state for non-palette images. Clears alpha mode flags if no alpha channel, disables tRNS if not present. Expands background/transparent values for sub-8-bit gray (1/2/4 bit to 8-bit range) based on bit depth.
0x00E79380484png__read_transform_infolibpng: Updates png_info to reflect the effects of applied read transforms. Adjusts color type (expand palette to RGB/RGBA, strip alpha, add filler), bit depth (16->8, expand to 16), channel count, and pixel size. Updates background color, gamma, and row byte count. Called by png_read_update_info.
0x00E7957082png__set_transform_checklibpng: Validates that a read transform can be set. Errors if already past start_read_image (flag 0x40 set). If param_2 is nonzero, also requires IHDR to have been read (flag 0x01). Sets the "transform set" flag (0x4000). Returns 1 if valid to set, 0 otherwise.
0x00E795D041png__set_alpha_mode_doublelibpng: Sets alpha mode with gamma as a double. Converts double gamma to fixed-point via png__fixed_from_double, then calls png__set_alpha_mode_fixed.
0x00E79600286png__set_alpha_mode_fixedlibpng: Sets the alpha compositing mode and output gamma. Mode 0: default, mode 1: associated alpha (gamma=1.0), mode 2: premultiplied alpha with gamma encoding, mode 3: linear alpha. Validates gamma range (1000-10000000). Sets background to black for modes 1-2 and configures gamma transform flags.
0x00E7973052png__set_background_doublelibpng: Sets background color with gamma as a double. Converts double gamma to fixed-point, then calls png__set_background_fixed.
0x00E79770143png__set_background_fixedlibpng: Sets the background color for alpha compositing. Copies the background RGB values, stores gamma and background type. param_3 must be nonzero (known background). param_4 controls whether to expand 16-bit. Sets transform flags 0x80 (background) and related mode bits.
0x00E7980066png__set_crc_actionlibpng: Sets how CRC errors are handled for critical and ancillary chunks. For each, values 2=warn, 3=ignore CRC, 4=ignore CRC silently, 5=keep current. Critical chunks warn on attempt to discard. Controls flag bits 0x400/0x800 (critical) and 0x100/0x200 (ancillary).
0x00E798C032png__set_expandlibpng: Enables the expand transform. Sets transform flags 0x1000 (expand) and 0x2000000 (expand tRNS to alpha). This expands palette to RGB, grayscale to 8-bit, and adds alpha from tRNS.
0x00E798E032png__set_expand_gray_1_2_4_to_8libpng: Enables expand of 1/2/4-bit grayscale to 8-bit. Also sets the tRNS-to-alpha expansion flag (0x2000000). Sets transform flags 0x1200 \| 0x2000000.
0x00E7990032png__set_expand_palette_to_rgblibpng: Enables palette-to-RGB expansion. Sets transform flag 0x1000.
0x00E7992065png__set_gamma_doublelibpng: Sets screen and file gamma values from doubles. Converts both to fixed-point and calls png__set_gamma_fixed.
0x00E79970102png__set_gamma_fixedlibpng: Sets screen gamma and file gamma for gamma correction. Validates both values (file gamma > 0, screen gamma > 0). Stores file gamma at offset 0x2C8, screen gamma at 0x18C. Sets the gamma-initialized flag (bit 1 at offset 0x312).
0x00E799E041png__set_gray_to_rgblibpng: Enables grayscale-to-RGB conversion. Also enables palette expansion (0x1000). Sets transform flag 0x4000 for the actual gray-to-RGB conversion.
0x00E79A1032png__set_tRNS_to_alphalibpng: Enables tRNS transparency to alpha channel expansion. Sets transform flags 0x1000 (expand) and 0x2000000 (tRNS to alpha).
0x00E79A301887png__set_quantizelibpng: Sets up color quantization (palette reduction). If no histogram provided, uses a median-cut algorithm to reduce palette from param_3 to param_4 entries. If histogram provided, sorts by frequency and remaps. Builds a 32K-entry quantize lookup table mapping 15-bit RGB to palette index. Sets transform flag 0x40.
0x00E7A19021png__set_read_user_chunk_fnlibpng: Sets a user callback for handling unknown chunks. Sets flag 0x100000 in mode word and stores callback pointer at offset 0x64.
0x00E7A1B078png__set_rgb_to_gray_doublelibpng: Sets RGB-to-gray conversion with double-precision coefficients. Converts the red and green coefficients to fixed-point, then calls png__set_rgb_to_gray_fixed.
0x00E7A200240png__set_rgb_to_gray_fixedlibpng: Sets up RGB-to-grayscale conversion with fixed-point coefficients. Error action: 1=error+no output, 2=only flag, 3=no error. Red/green coefficients must sum to <= 100000 (1.0). Stores coefficients as fixed-point at offsets 0x24E/0x250. Defaults to ITU-R 601 (0x1B38/0x5B8A) if both zero. Also enables palette expansion for indexed images.
0x00E7A30032png__set_strip_16libpng: Enables stripping 16-bit channels down to 8-bit. Sets transform flag 0x4000000.
0x00E7A32032png__set_strip_alphalibpng: Enables stripping the alpha channel from output. Sets transform flag 0x400.
0x00E7A34032png__set_strip_alpha_no_fillerlibpng: Strips alpha without adding filler. Sets transform flag 0x40000.
0x00E7A36032png__set_expand_with_tRNSlibpng: Enables expand with tRNS to alpha. Sets flags 0x1000 (expand) and 0x2000000 (tRNS to alpha).
0x00E7A38078png__resolve_gamma_constantlibpng: Resolves symbolic gamma constants to fixed-point values. -1/-100000 = sRGB (45455 or 220000), -2/-50000 = Mac (65909 or 153132). Sets sRGB flag for sRGB constants.
0x00E7A3D0214png__do_bgrSwaps RGB byte order to BGR (and vice versa) for PNG pixel data. Handles both 8-bit and 16-bit depths, with and without alpha channel. For 8-bit: swaps bytes 0 and 2 in each pixel. For 16-bit: swaps byte pairs 0-1 and 4-5 in each pixel.
0x00E7A4B0354png__do_check_palette_indexeslibpng: Scans row data for palette index values exceeding palette size. Tracks maximum index at offset 0x148. Only checks palette (type 3) images with 1/2/4/8-bit depth when palette count is less than max for bit depth.
0x00E7A640197png__do_invertlibpng: Bitwise inverts pixel data. For gray (type 0): inverts all bytes with 64-byte loop unrolling. For gray+alpha (type 4): inverts only the gray channel bytes (8-bit or 16-bit), leaving alpha unchanged.
0x00E7A710102png__do_packswaplibpng: Reverses bit order within bytes for sub-byte pixel packing (1/2/4-bit). Uses lookup tables to swap MSB-first to LSB-first ordering and vice versa.
0x00E7A780399png__do_strip_channellibpng: Strips a channel from pixel data (removes alpha or filler). For 2-channel gray+alpha and 4-channel RGBA, removes the specified channel. param_3 controls which channel to remove (0=first, nonzero=last). Updates color type, channels, and row bytes.
0x00E7A91054png__do_swap_byteslibpng: Swaps byte order for 16-bit samples (big-endian to little-endian). Iterates through all sample bytes swapping adjacent pairs.
0x00E7A95022png__get_interlace_typeReturns the interlace type from a PNG info struct at offset 0x151. Returns 8 if the struct pointer is null.
0x00E7A97023png__get_user_chunk_ptrlibpng: Returns the user chunk callback pointer from offset 0x118 in the png_struct. Returns -1 (0xFFFFFFFF) if the struct pointer is null. Note: this is NOT the I/O pointer (which is at offset 0x60).
0x00E7A99017png__get_user_dataReturns user data pointer from PNG struct at offset 0x6C. Returns 0 if struct is null.
0x00E7A9B047png__set_add_alphaConfigures PNG to add an alpha channel filler. Calls png__set_filler, then if filler flag (0x8000) is already set, also sets the alpha expansion flag (0x1000000).
0x00E7A9E016png__set_bgrEnables BGR byte order transformation by setting flag 0x1 in the transformation flags at offset 0x7C.
0x00E7A9F0146png__set_fillerConfigures PNG filler byte for expanding grayscale or RGB data. Validates color type (must be grayscale or RGB, not paletted). Sets filler value at offset 0x15E, enables filler transformation flag (0x8000), and configures filler position (before=0x80 flag set, after=cleared) based on param_3.
0x00E7AA9037png__set_interlace_handlingEnables interlace handling for PNG reading. If interlaced (field 0x150 != 0), sets interlace flag (0x2) and returns 7 (number of Adam7 passes). Returns 1 for non-interlaced images.
0x00E7AAC019png__set_invert_alphaEnables alpha channel inversion by setting flag 0x80000 in the transformation flags at offset 0x7C.
0x00E7AAE016png__set_invert_monoEnables monochrome inversion by setting flag 0x20 in the transformation flags at offset 0x7C.
0x00E7AAF032png__set_packingEnables pixel packing transformation. If bit depth < 8, sets packing flag (0x4) and overrides bit depth to 8 at offset 0x155.
0x00E7AB1028png__set_packswapEnables pack swap transformation for sub-byte pixels (bit depth < 8). Sets flag 0x10000 in transformation flags at offset 0x7C.
0x00E7AB3036png__set_shiftEnables bit shifting transformation. Sets shift flag (0x8) and copies 5-byte shift data (sBIT structure) from param_2 to offset 0x1AD in the PNG struct.
0x00E7AB6025png__set_swapEnables byte swap transformation for 16-bit depth images. Sets flag 0x10 in transformation flags at offset 0x7C, only if bit depth is 16.
0x00E7AB8019png__set_swap_alphaEnables alpha channel swap (RGBA to ARGB) by setting flag 0x20000 in the transformation flags at offset 0x7C.
0x00E7ABA061png__set_user_transform_infoSets user-defined transform info on the PNG struct. Stores user data at 0x6C, user depth at 0x70, user channels at 0x71. Warns if called after read has started (filler flag 0x8000 set and flag 0x40 set).
0x00E7ABE049png__default_read_data_fileDefault file-based PNG read callback. Reads param_3 bytes into param_2 from the FILE* at offset 0x60 in the PNG struct. Triggers a PNG error ("Read Error") if the read count doesn't match the requested size.
0x00E7AC2030png__default_read_dataDefault PNG read data callback. Calls the read function pointer at offset 0x5C. If the function pointer is null, triggers a PNG error with "Call to NULL read function".
0x00E7AC4073png__set_read_fnSets the PNG read function callback. Stores I/O pointer at offset 0x60, read function at 0x5C (defaults to png__default_read_data if null). Clears write function at 0x58 with a warning if it was set. Clears progressive read flag at 0x17C.
0x00E7AC9026png__pixels_to_inches_fixedlibpng: Converts pixels-per-meter to a fixed-point representation related to inches. Computes (param_2 * 500) / 127, which equals param_2 * 3.937 (the meters-to-inches conversion factor * 100). Delegates to png__muldiv_warn for overflow-safe computation.
0x00E7ACB0166png_get_IHDRlibpng: png_get_IHDR - extracts image header info (width, height, bit_depth, color_type, interlace, compression, filter) from png_info struct. Calls FUN_00e6dee0 to validate/process the values. Returns 1 on success, 0 if png_ptr or info_ptr is NULL.
0x00E7AD6054png_get_oFFslibpng: png_get_oFFs - retrieves image offset (x_offset, y_offset, unit_type) from png_info. Checks flag bit 0x8. Returns 8 on success, 0 if not available.
0x00E7ADA047png_get_sCAL_slibpng: png_get_sCAL_s - retrieves sCAL chunk data as string pointer from png_info. Checks flag bit 0x20. Returns pointer to scale data at info+0xaa. Returns 0x20 on success.
0x00E7ADD025png_get_channelslibpng: png_get_channels - returns the number of channels from png_info at offset 0x18. Returns 0 if either pointer is NULL.
0x00E7ADF0245png_get_cHRMlibpng: png_get_cHRM - retrieves chromaticity values (white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y) as doubles from png_info. Checks sBIT flag (bit 2). Multiplies raw ints by DAT_011bc300 scale factor. Returns 4 on success.
0x00E7AEF0269png_get_cHRM_XYZlibpng: png_get_cHRM_XYZ - retrieves CIE XYZ chromaticity values (9 doubles: red_X/Y/Z, green_X/Y/Z, blue_X/Y/Z) from png_info. Checks sBIT flag (bit 2). Multiplies raw ints by DAT_011bc300. Returns 4 on success.
0x00E7B000145png_get_cHRM_XYZ_fixedlibpng: png_get_cHRM_XYZ_fixed - retrieves CIE XYZ chromaticity values as fixed-point integers (9 values: red_X/Y/Z, green_X/Y/Z, blue_X/Y/Z) from png_info offsets 0x4c-0x6c. Checks sBIT flag (bit 2). Returns 4 on success.
0x00E7B0A0129png_get_cHRM_fixedlibpng: png_get_cHRM_fixed - retrieves chromaticity values as fixed-point integers (white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y) from png_info offsets 0x44,0x48,0x2c-0x40. Checks sBIT flag (bit 2). Returns 4 on success.
0x00E7B13025png_get_filter_typelibpng: png_get_filter_type - returns the filter type byte from png_info at offset 0x1d. Returns 0 if pointers are NULL.
0x00E7B15022png_get_header_verlibpng: png_get_header_ver - returns the PNG header version string pointer from png_struct at offset 0x284. Returns 0/NULL if png_ptr is NULL.
0x00E7B17022png_get_header_versionlibpng: png_get_header_version - returns the PNG header version string pointer from png_struct at offset 0x288. Returns 0/NULL if png_ptr is NULL.
0x00E7B19025png_get_color_typelibpng: png_get_color_type - returns the color type byte from png_info at offset 0x19. Returns 0 if pointers are NULL.
0x00E7B1B037png_get_rowbyteslibpng: png_get_rowbytes - returns the number of bytes per row. If flag 0x8000 is set, reads from png_struct+0x2ac (transformed rowbytes), otherwise from png_struct+0xc0. Returns 0 if png_ptr is NULL.
0x00E7B1E025png_get_compression_typelibpng: png_get_compression_type - returns the compression type byte from png_info at offset 0x1a. Returns 0 if pointers are NULL.
0x00E7B20023png_get_eXIf_deprecatedlibpng: png_get_eXIf (deprecated) - warns that png_get_eXIf does not work and to use png_get_eXIf_1 instead. Always returns 0.
0x00E7B22065png_get_eXIf_1libpng: png_get_eXIf_1 - retrieves eXIf (EXIF) chunk data from png_info. Checks flag bit 0x10000. Returns num_exif and exif data pointer. Returns 0x10000 on success.
0x00E7B27025png_get_interlace_typelibpng: png_get_interlace_type - returns the interlace type byte from png_info at offset 0x1b. Returns 0 if pointers are NULL.
0x00E7B29061png_get_gAMAlibpng: png_get_gAMA - retrieves gamma value as double from png_info. Checks flag bit 0x1 (gAMA present). Multiplies fixed-point int at offset 0x28 by DAT_011bc300. Returns 1 on success.
0x00E7B2D045png_get_gAMA_fixedlibpng: png_get_gAMA_fixed - retrieves gamma value as fixed-point integer from png_info at offset 0x28. Checks flag bit 0x1 (gAMA present). Returns 1 on success.
0x00E7B30048png_get_pHYslibpng: png_get_pHYs - retrieves physical pixel dimensions (res_x) from png_info at offset 0xd8. Checks flag bit 0x40. Returns 0x40 on success, 0 if not available.
0x00E7B330118png_get_iCCPlibpng: png_get_iCCP - retrieves ICC color profile data from png_info. Checks flag bit 0x1000 (iCCP present). Returns profile name count at offset 0x74, profile data pointer at 0x78, and first 4 bytes of profile data. param_4 (compression) always set to 0. Returns 0x1000 on success, 0 if not available.
0x00E7B3B025png_get_image_heightlibpng: png_get_image_height - returns the image height from png_info at offset 0x4. Returns 0 if pointers are NULL.
0x00E7B3D024png_get_image_widthlibpng: png_get_image_width - returns the image width from png_info at offset 0x0. Returns 0 if pointers are NULL.
0x00E7B3F025png_get_bit_depthlibpng: png_get_bit_depth - returns the bit depth byte from png_info at offset 0x1c. Returns 0 if pointers are NULL.
0x00E7B41014png_get_io_ptrlibpng: png_get_io_ptr - returns the I/O pointer from png_struct at offset 0x11c. Used to retrieve custom I/O state.
0x00E7B42014png_get_user_chunk_ptrlibpng: png_get_user_chunk_ptr - returns the user chunk data pointer from png_struct at offset 0x2b0.
0x00E7B43088png_get_tRNSlibpng: png_get_tRNS - retrieves transparency data (num_trans, trans_alpha, trans_color) from png_info. Checks flag bit 0x100. Returns 0x100 on success.
0x00E7B490166png_get_sPLTlibpng: png_get_sPLT - retrieves suggested palette data (7 fields: name, depth, entries, nentries, etc.) from png_info. Checks flag bit 0x400. Returns 0x400 on success.
0x00E7B54086png_get_pHYs_00e7b540libpng: png_get_pHYs - retrieves physical pixel dimensions (x_ppu, y_ppu, unit_type) from png_info. Checks flag bit 0x80 (PNG_INFO_pHYs). Returns 0x80 on success. Was misnamed png_get_tIME.
0x00E7B5A0225png_get_pHYs_dpilibpng: Extended pHYs retrieval - gets x_ppu, y_ppu, unit_type from png_info. When unit_type==1 (meters), recalculates x/y PPU using DPI conversion. Was misnamed png_get_tIME_with_defaults.
0x00E7B69029png_get_chunk_malloc_maxlibpng: Returns the chunk malloc max limit from png_struct at offset 0x148. Returns -1 (0xFFFFFFFF) if png_ptr or info_ptr is NULL. Was misnamed png_get_unknown_chunks (that function reads from info_ptr, not png_struct).
0x00E7B6B0102png_get_pixel_aspect_ratiolibpng: png_get_pixel_aspect_ratio - calculates pixel aspect ratio as float from pHYs data (y_ppu/x_ppu). Checks flag bit 0x80 and validates x_ppu != 0. Returns 0.0 if not available.
0x00E7B72089png_get_pixel_aspect_ratio_fixedlibpng: png_get_pixel_aspect_ratio_fixed - calculates pixel aspect ratio as fixed-point from pHYs data. Uses FUN_00e701c0 for fixed-point division (y_ppu * 100000 / x_ppu). Returns 0 if not available.
0x00E7B78025png_get_pixels_per_inchlibpng: png_get_pixels_per_inch - returns pixels per inch by calling png_get_pixels_per_meter then converting via png_ppi_from_ppm. Was misnamed png_get_pixels_per_meter.
0x00E7B7A049png_get_pixels_per_meterlibpng: png_get_pixels_per_meter - returns pixels per meter only when x_ppu == y_ppu and unit_type==1 (meters). Returns x_ppu value. Was misnamed png_get_x_pixels_per_meter.
0x00E7B7E022png_get_interlace_passlibpng: png_get_interlace_pass - returns current interlace pass number from png_struct at offset 0x24c. Returns 0 if png_ptr is NULL.
0x00E7B80025png_get_palette_maxlibpng: png_get_palette_max - returns the max palette index from png_info at offset 0xc. Returns 0 if pointers are NULL.
0x00E7B82028png_get_num_textlibpng: png_get_num_text - returns the number of text chunks from png_info at offset 0x114. Returns 0 if pointers are NULL.
0x00E7B84047png_get_sBITlibpng: png_get_sBIT - retrieves significant bits info pointer from png_info at offset 0x94. Checks flag bit 0x2. Returns 2 on success.
0x00E7B87086png_get_sCALlibpng: png_get_sCAL - retrieves physical scale data (unit, width, height as doubles via atof) from png_info. Checks flag bit 0x4000. Returns 0x4000 on success.
0x00E7B8D0123png_get_sCAL_fixedlibpng: png_get_sCAL_fixed - retrieves physical scale data as fixed-point values. Converts width/height strings via atof then png__float_to_fixed_point. Checks flag bit 0x4000. Returns 0x4000 on success.
0x00E7B95070png_get_sCAL_s_00e7b950libpng: png_get_sCAL_s - retrieves sCAL unit type and raw string pointers for width/height from png_info. Checks flag bit 0x4000. Returns 0x4000 on success. Was png_get_sCAL_s_raw.
0x00E7B9A043png_get_unknown_chunkslibpng: png_get_unknown_chunks - retrieves unknown chunk list pointer (offset 0x100) and count (offset 0x104) from png_info. Was misnamed png_get_unknown_chunk_data.
0x00E7B9D049png_get_num_palettelibpng: png_get_num_palette - returns the number of palette entries from png_info at offset 0x70 (ushort). Checks flag bit 0x800. Returns 0x800 on success.
0x00E7BA1025png_get_signaturelibpng: png_get_signature - returns pointer to PNG signature bytes at png_info + 0x20. Returns NULL if pointers are NULL.
0x00E7BA3050png_get_bKGDlibpng: png_get_bKGD - retrieves background color pointer from png_info at offset 0x8c. Checks flag bit 0x200. Returns 0x200 on success.
0x00E7BA70130png_get_PLTElibpng: png_get_PLTE - retrieves palette data from png_info. For color_type 3: returns palette pointer at 0x9c and palette color at 0xa0. For others: returns palette color at 0xa0. Sets num_palette from offset 0x16. Checks flag bit 0x10. Returns 0x10 on success.
0x00E7BB0071png_get_textlibpng: png_get_text - retrieves text chunk array from png_info. Returns text_ptr at 0x88 and num_text from 0x80. Returns count on success, 0 if none.
0x00E7BB5043png_get_hISTlibpng: png_get_hIST - retrieves histogram data pointer and count from png_info at offsets 0xf8/0xfc. Returns count on success, 0 if not available.
0x00E7BB8022png_get_compression_buffer_sizelibpng: png_get_compression_buffer_size - returns the compression buffer size from png_struct at offset 0x238. Returns 0 if png_ptr is NULL.
0x00E7BBA022png_get_palette_countlibpng: Returns the palette entry count from png_info struct at offset 0x280. Returns 0 if struct is null. Fixed from png__get_palette_count (wrong double-underscore).
0x00E7BBC022png_get_user_width_maxlibpng: png_get_user_width_max - returns the maximum user width from png_struct at offset 0x27c. Returns 0 if png_ptr is NULL.
0x00E7BBE028png_get_validlibpng: png_get_valid - tests if specific chunk flags are set in png_info valid field at offset 0x8. Returns the masked flag bits, 0 if pointers are NULL.
0x00E7BC0050png_get_x_offset_incheslibpng: png_get_x_offset_inches - returns x offset in inches as float by converting fixed-point microns via png_get_x_offset_microns and multiplying by scale factor DAT_011bd4a0.
0x00E7BC4026png_get_x_offset_inches_fixedlibpng: png_get_x_offset_inches_fixed - returns x offset in inches as fixed-point by calling png_get_x_offset_microns and converting via FUN_00e7ac90.
0x00E7BC6046png_get_x_offset_micronslibpng: png_get_x_offset_microns - returns x offset in microns from tRNS data if unit_type==1 (microns). Checks flag bit 0x100, reads offset 0xb4. Returns 0 if not micron type.
0x00E7BC9046png_get_x_offset_pixelslibpng: png_get_x_offset_pixels - returns x offset in pixels if unit_type==0 (pixels). Checks flag bit 0x100, reads offset 0xb4. Returns 0 if not pixel type.
0x00E7BCC025png_get_x_pixels_per_inchlibpng: png_get_x_pixels_per_inch - returns x DPI by calling png_get_x_ppu_meter and converting via FUN_00e7be20 (meters to inches).
0x00E7BCE043png_get_x_pixels_per_meterlibpng: png_get_x_pixels_per_meter - returns x pixels per unit when unit_type==1 (meters). Reads pHYs x_ppu at offset 0xc0. Was misnamed png_get_x_ppu_meter.
0x00E7BD1050png_get_y_offset_incheslibpng: png_get_y_offset_inches - returns y offset in inches as float by converting fixed-point microns via png_get_y_offset_microns and multiplying by scale factor.
0x00E7BD5026png_get_y_offset_inches_fixedlibpng: png_get_y_offset_inches_fixed - returns y offset in inches as fixed-point by calling png_get_y_offset_microns and converting.
0x00E7BD7046png_get_y_offset_micronslibpng: png_get_y_offset_microns - returns y offset in microns from tRNS data if unit_type==1. Checks flag bit 0x100, reads offset 0xb8. Returns 0 if not micron type.
0x00E7BDA046png_get_y_offset_pixelslibpng: png_get_y_offset_pixels - returns y offset in pixels if unit_type==0 (pixels). Checks flag bit 0x100, reads offset 0xb8. Returns 0 if not pixel type.
0x00E7BDD025png_get_y_pixels_per_inchlibpng: png_get_y_pixels_per_inch - returns y DPI by calling png_get_y_ppu_meter and converting to inches.
0x00E7BDF043png_get_y_pixels_per_meterlibpng: png_get_y_pixels_per_meter - returns y pixels per unit when unit_type==1 (meters). Reads pHYs y_ppu at offset 0xc4. Was misnamed png_get_y_ppu_meter.
0x00E7BE2046png_ppi_from_ppmlibpng: png_ppi_from_ppm - converts pixels per meter to pixels per inch using fixed-point multiplication (ppm * 127 / 5000). Returns 0 on overflow or failure.
0x00E7BE6075png_image_write_to_memory_appendlibpng: png_image_write_to_memory_append - appends data to an in-memory write buffer. Checks for overflow, copies data via memcpy. Aborts via png error on buffer overflow.
0x00E7BEB059png_convert_from_struct_tmlibpng: png_convert_from_struct_tm - converts a C struct tm to png_time format. Maps year (+1900), month (+1), day, hour, minute, second fields.
0x00E7BEF026png_convert_from_time_tlibpng: png_convert_from_time_t - converts time_t to png_time by calling _gmtime64 then png_convert_from_struct_tm.
0x00E7BF1031png_create_read_structlibpng: png_create_read_struct - simplified wrapper that calls png_create_read_struct_2 with NULL mem alloc/free functions.
0x00E7BF30180png_create_read_struct_2libpng: png_create_read_struct_2 - creates and initializes a png_structp for reading. Sets mode flags, default buffer size 0x2000, zlib compression params (level=-1, method=8, window=15, mem=8, strategy=0). Calls png__create_read_struct and FUN_00e87520.
0x00E7BFF052png_destroy_read_structlibpng: png_destroy_read_struct - destroys a read png_struct. Frees info struct, cleans up internal state via FUN_00e7d130, and frees memory via FUN_00e7e090.
0x00E7C030210png_image_write_filter_sublibpng: png_image_write_filter_sub - applies sub-filter to PNG image row data during writing. Handles both 8-bit and 16-bit color types (RGB and RGBA). Subtracts previous pixel channel values for filtering.
0x00E7C110996png_image_write_colormaplibpng: png_image_write_colormap - converts a color-mapped image palette to PNG PLTE and optional tRNS chunks. Handles 16-bit to 8-bit conversion with gamma correction via lookup tables. Processes alpha channel for transparency.
0x00E7C5B0158png_image_write_initlibpng: png_image_write_init - initializes PNG write structures. Creates read struct, info struct, allocates control block (6 ints), sets up error/warning handlers. Returns 1 on success, error message on failure.
0x00E7C650909png_image_write_mainlibpng: png_image_write_main - core PNG write implementation. Sets up IHDR with proper color type/bit depth, applies sRGB/gamma/chromaticity settings, handles color-mapped images, writes rows, and finalizes with png_write_end. Manages interlacing, alpha, and color swapping transforms.
0x00E7C9E041png_image_write_to_memory_callbacklibpng: png_image_write_to_memory_callback - callback for writing PNG to memory. Sets up custom write function (png_image_write_to_memory_append) then delegates to png_image_write_main.
0x00E7CA10293png_image_write_to_filelibpng: png_image_write_to_file - writes a PNG image to a file. Opens file with fopen, calls png_image_write_to_stdio, handles errors (fflush/ferror/fclose). Removes file on failure.
0x00E7CB40242png_image_write_to_memorylibpng: png_image_write_to_memory - writes PNG to a memory buffer. Validates params, initializes write structures, calls write callback. Sets output size in param_3. Returns 0 if buffer too small.
0x00E7CC40192png_image_write_to_stdiolibpng: png_image_write_to_stdio - writes PNG image to a FILE* stream. Validates params, initializes write structures, sets file pointer, calls png_image_write_main. Frees image on completion.
0x00E7CD0021png_set_compression_levellibpng: png_set_compression_level - sets the zlib compression level in png_struct at offset 0xc4. No-op if png_ptr is NULL.
0x00E7CD2021png_set_compression_mem_levellibpng: png_set_compression_mem_level - sets zlib memory level in png_struct at offset 0xd0.
0x00E7CD4044png_set_compression_methodlibpng: png_set_compression_method - sets compression method in png_struct at offset 0xc8. Warns if method != 8 (deflate). Only method 8 is supported.
0x00E7CD7025png_set_compression_strategylibpng: png_set_compression_strategy - sets zlib compression strategy in png_struct at offset 0xd4. Also sets flag bit 0x1 in mode field at 0x78.
0x00E7CD9080png_set_compression_window_bitslibpng: png_set_compression_window_bits - sets zlib window bits in png_struct at offset 0xcc. Clamps to range [8, 15] with warnings.
0x00E7CDE0355png_set_filterlibpng: png_set_filter - sets PNG row filter method and filter selection flags. Validates filter method (0 or 0x40). Allocates filter buffers if needed. Supports SUB(0x10), UP(0x20), AVG(0x40), PAETH(0x80), NONE(0x08) filters.
0x00E7CF9028png_set_flushlibpng: png_set_flush - sets the number of rows between flushes in png_struct at offset 0x180. Clamps negative values to 0.
0x00E7CFB021png_set_text_compression_levellibpng: png_set_text_compression_level - sets text compression level in png_struct at offset 0xd8.
0x00E7CFD021png_set_text_compression_mem_levellibpng: png_set_text_compression_mem_level - sets text compression memory level in png_struct at offset 0xe4.
0x00E7CFF044png_set_text_compression_methodlibpng: png_set_text_compression_method - sets text compression method in png_struct at offset 0xdc. Warns if not 8 (deflate).
0x00E7D02021png_set_text_compression_strategylibpng: png_set_text_compression_strategy - sets text compression strategy in png_struct at offset 0xe8.
0x00E7D04080png_set_text_compression_window_bitslibpng: png_set_text_compression_window_bits - sets text compression window bits in png_struct at offset 0xe0. Clamps to range [8, 15].
0x00E7D09021png_set_write_user_transform_fnlibpng: png_set_write_user_transform_fn - sets user write transform callback in png_struct at offset 0x1c8.
0x00E7D0B025png_set_write_fn_00e7d0b0libpng: png_set_write_fn - sets custom write function pointer in png_struct at offset 0x68. Sets flag bit 0x100000 in mode at 0x7c to indicate write mode.
0x00E7D0D096png_gamma_correct_16_to_8libpng: png_gamma_correct_16_to_8 - converts a 16-bit color value to 8-bit with gamma correction. Uses pre-multiplied alpha (param_3) and gamma lookup table at DAT_011bb5b8/DAT_011bb1b8. Returns 0xff if value >= max.
0x00E7D130157png_write_destroylibpng: png_write_destroy - cleans up internal write state. Frees zlib stream, row buffers (0x124, 0x120, 0x12c, 0x130), previous row (0x248). Resets pointers to 0.
0x00E7D1D0355png_write_endlibpng: png_write_end - finishes writing a PNG file. Verifies IDATs were written, checks palette index bounds. Writes trailing chunks (bKGD, text, eXIf, unknown chunks). Writes IEND chunk and flushes output.
0x00E7D34059png_write_flush_rowslibpng: png_write_flush_rows - flushes buffered row data to output. Calls FUN_00e7e400 with sync flush (mode=2), resets row counter at 0x184, and calls png_write_flush.
0x00E7D38089png_write_imagelibpng: png_write_image - writes all rows of a PNG image. Iterates through interlace passes (via png_set_interlace_handling), writing each row via png_write_row.
0x00E7D3E0338png_image_write_rows_16bitlibpng: png_image_write_rows_16bit - writes 16-bit per channel image rows. Handles alpha pre-multiplication for RGBA/GA. Processes rows by converting alpha-premultiplied data and writing via png_write_row. Called from png_image_write_main for linear (16-bit) format.
0x00E7D540455png_image_write_rows_sRGBlibpng: png_image_write_rows_sRGB - writes sRGB (8-bit) image rows with gamma correction. Handles alpha pre-multiplication and 16-to-8 bit conversion via gamma lookup tables. Processes RGBA/GA and RGB/Gray separately.
0x00E7D710847png_write_info_before_PLTElibpng: png_write_info_before_PLTE - writes all PNG info chunks that come before PLTE. Handles IHDR, oFFs, palette (with optional inversion), sCAL, eXIf, pHYs, tRNS, sPLT, sCAL, tIME, bKGD, unknown chunks, and text. Also calls png_write_info for remaining chunks.
0x00E7DA60326png_write_infolibpng: png_write_info - writes PNG header info chunks (IHDR, sRGB/iCCP, gAMA, cHRM, sBIT). Checks for MNG features and writes sigBit, cHRM data. Delegates to png_write_info_before_PLTE for pre-PLTE chunks. Sets 0x400 flag when done.
0x00E7DBB0290png_write_pnglibpng: png_write_png - high-level function that writes a complete PNG file. Applies requested transforms (interlace, packing, shift, BGR, swap_alpha, filler_strip, invert_alpha, swap, invert), then calls png_write_image + png_write_end.
0x00E7DCE0635png_write_rowlibpng: png_write_row - writes a single row of PNG data. Handles interlacing (Adam7), applies write transforms, sub-filtering for MNG, palette index tracking. Copies row data, applies filters, and compresses via FUN_00e7ff60.
0x00E7DF8047png_write_rowslibpng: png_write_rows - writes multiple rows of PNG data by iterating and calling png_write_row for each row pointer in the array.
0x00E7DFB0163png_write_unknown_chunkslibpng: png_write_unknown_chunks - iterates over unknown chunks in png_info and writes them. Checks chunk filter flags and safe-to-copy bit. Warns if writing zero-length chunks.
0x00E7E06043png_calloclibpng: png_calloc - allocates and zero-initializes memory. Calls png_malloc then memset to zero. Returns NULL on allocation failure.
0x00E7E090102png_destroy_structlibpng: png_destroy_struct - safely destroys a png_struct. Copies struct to stack, zeros original, then frees it. This prevents use-after-free by clearing before calling the free function.
0x00E7E10050png_freelibpng: png_free - frees memory allocated by png. If a custom free function is set at png_struct+0x264, calls it; otherwise calls png_free_default (which uses C free).
0x00E7E14027png_free_defaultlibpng: png_free_default - default memory free function. Calls C free() if both png_ptr and ptr are non-NULL.
0x00E7E16020png_get_mem_ptrlibpng: png_get_mem_ptr - returns the memory allocation context pointer from png_struct at offset 0x25c. Returns 0 if png_ptr is NULL.
0x00E7E18043png_malloclibpng: png_malloc - allocates memory. Calls png_malloc_warn and aborts with png_error("Out of memory") on failure.
0x00E7E1B042png_malloc_arraylibpng: png_malloc_array - allocates an array. Validates count > 0 and element_size != 0, then delegates to png_malloc_array_checked. Aborts on invalid params.
0x00E7E1E040png_malloc_array_checkedlibpng: png_malloc_array_checked - allocates count * element_size bytes with overflow check. Returns NULL on overflow or allocation failure.
0x00E7E21051png_malloc_warnlibpng: png_malloc_warn - allocates memory. If custom allocator is set at png_struct+0x260, uses it; otherwise falls back to C malloc. Returns NULL on failure instead of aborting.
0x00E7E25043png_malloc_baselibpng: png_malloc_base - allocates memory with a slightly different error message ("Out of Memory" with capital M). Calls png_malloc_warn(NULL, size), aborts on failure.
0x00E7E28046png_malloc_warn_with_warninglibpng: png_malloc_warn_with_warning - allocates memory via png_malloc_warn but issues a warning instead of aborting on failure. Returns 0 on failure.
0x00E7E2B0144png_realloc_arraylibpng: png_realloc_array - reallocates an array with new additional elements. Copies old_count * element_size bytes, zeros new elements. Validates params and checks for overflow. Returns NULL on failure.
0x00E7E35039png_set_mem_fnlibpng: png_set_mem_fn - sets custom memory allocation/free functions and context pointer in png_struct at offsets 0x25c (mem_ptr), 0x260 (malloc_fn), 0x264 (free_fn).
0x00E7E380119png_zlib_window_adjustlibpng: png_zlib_window_adjust - adjusts the zlib window size in the header bytes to match the actual data size. Reduces window size if data is smaller than current window, then fixes the checksum modulo 31.
0x00E7E400525png_compress_IDATlibpng: png_compress_IDAT - compresses and writes IDAT chunk data. Manages zlib deflate stream, allocates output buffer on first call. Writes IDAT chunks when buffer is full. Handles flush modes and adjusts zlib window size on first chunk.
0x00E7E610585png_zlib_deflate_initlibpng: png_zlib_deflate_init - initializes or resets the zlib deflate stream for a given chunk type. Configures compression params from png_struct (level, method, window, mem_level, strategy). For non-IDAT, uses text compression settings. Adjusts window size for small data.
0x00E7E860565png_do_write_interlacelibpng: png_do_write_interlace - extracts pixels for the current Adam7 interlace pass. Handles 1, 2, 4 bit depths (packing into bytes) and 8+ bit depths (memcpy). Updates row width and rowbytes for the extracted pass.
0x00E7EAA045png_free_buffer_listlibpng: png_free_buffer_list - frees a linked list of buffers. Walks the list following next pointers and calls png_free on each node. Sets the head pointer to NULL.
0x00E7EAD0339png_estimate_image_data_sizelibpng: png_estimate_image_data_size - estimates uncompressed IDAT data size for zlib window optimization. Handles interlaced images by calculating per-pass sizes. Returns -1 if dimensions exceed 0x8000.
0x00E7EC3021png_save_uint_16libpng: png_save_uint_16 - writes a 16-bit value in big-endian byte order to a buffer.
0x00E7EC5037png_save_uint_32libpng: png_save_uint_32 - writes a 32-bit value in big-endian byte order to a buffer.
0x00E7EC80219png_write_filter_avglibpng: png_write_filter_avg - applies the Average filter (type 3) to a row. For first bpp bytes, averages with previous row only. For remaining bytes, averages current with left and above. Returns sum of absolute differences for filter selection.
0x00E7ED60505png_write_filter_avg_sselibpng: png_write_filter_avg_sse - SSE-optimized version of the Average filter (type 3). Processes 8 bytes at a time using SSE instructions (pshuflw, pshufhw). Falls back to scalar for remaining bytes.
0x00E7EF60293png_write_filter_paethlibpng: png_write_filter_paeth - applies the Paeth filter (type 4) to a row. Predicts each byte using the Paeth predictor (left, above, upper-left). Returns sum of absolute differences for filter selection. Exits early if sum exceeds threshold.
0x00E7F090358png_write_filter_paeth_optimizedlibpng: png_write_filter_paeth_optimized - unrolled/optimized version of Paeth filter application. Processes 64 bytes at a time for the initial bpp portion, then uses scalar Paeth prediction for remaining bytes.
0x00E7F200151png_write_filter_sublibpng: png_write_filter_sub - applies Sub filter (type 1) to a row and returns sum of absolute differences. First bpp bytes are copied as-is; remaining bytes subtract left neighbor. Returns early if sum exceeds threshold.
0x00E7F2A0279png_write_filter_sub_optimizedlibpng: png_write_filter_sub_optimized - unrolled/optimized version of Sub filter application. Processes 64 bytes at a time for initial bpp, then scalar for remaining. Does not compute sum (void return).
0x00E7F3C0105png_write_filter_uplibpng: png_write_filter_up - applies Up filter (type 2) and returns sum of absolute differences. Each byte is subtracted from the byte directly above it in the previous row. Returns early if sum exceeds threshold.
0x00E7F430215png_write_filter_up_optimizedlibpng: png_write_filter_up_optimized - unrolled/optimized version of Up filter. Processes 64 bytes at a time. Does not compute sum (void return).
0x00E7F510389png_text_compresslibpng: png_text_compress - compresses text data using zlib deflate. Manages buffer linked list for output. Initializes deflate stream, feeds data, handles buffer overflow by allocating more buffers. Used for tEXt/zTXt/iTXt chunks.
0x00E7F6A026png_text_compress_initlibpng: png_text_compress_init - initializes a text compression structure with input data pointer and length. Resets output size to 0.
0x00E7F6C032png_write_IENDlibpng: png_write_IEND - writes the IEND chunk (0x49454e44) with 0 data bytes. Sets flag 0x10 in mode to mark end of image.
0x00E7F6E0645png_write_IHDRlibpng: png_write_IHDR - writes the IHDR chunk. Validates width, height, bit_depth, color_type, compression, filter, interlace params. Sets internal struct fields (channels, pixel_depth, rowbytes). Writes 13-byte IHDR data. Sets default filter mask.
0x00E7F9B0194png_write_PLTElibpng: png_write_PLTE - writes the PLTE chunk. Validates palette size (max 2^bit_depth, max 256). Writes 3 bytes per entry (R,G,B). Sets flag 0x2 in mode. Warns for non-palette color types.
0x00E7FA80338png_write_bKGDlibpng: png_write_bKGD - writes the bKGD (background color) chunk. Handles palette index (1 byte), grayscale (2 bytes), and RGB (6 bytes) background formats. Validates values against bit depth.
0x00E7FBE0158png_write_cHRM_fixedlibpng: png_write_cHRM_fixed - writes the cHRM chunk with 8 fixed-point chromaticity values (white_x/y, red_x/y, green_x/y, blue_x/y) as big-endian 32-bit integers. 32 bytes total.
0x00E7FC8045png_write_complete_chunklibpng: png_write_complete_chunk - wrapper that writes a complete PNG chunk (header + data + CRC) by calling png_write_chunk_internal.
0x00E7FCB051png_write_chunk_datalibpng: png_write_chunk_data - writes chunk data bytes and updates the running CRC. Validates all pointers and length are non-null/non-zero.
0x00E7FCF054png_write_chunk_endlibpng: png_write_chunk_end - finalizes a PNG chunk by writing the 4-byte CRC. Sets state to 0x82 and writes CRC from png_struct+0x13c as big-endian.
0x00E7FD30125png_write_chunk_headerlibpng: png_write_chunk_header - writes chunk header (4-byte length + 4-byte type). Sets state to 0x22, resets CRC, updates CRC with chunk type. Stores chunk type at png_struct+0x11c. Sets state to 0x42.
0x00E7FDB045png_write_chunk_startlibpng: png_write_chunk_start - wrapper for png_write_chunk_header. Begins writing a new chunk.
0x00E7FDE067png_write_chunklibpng: png_write_chunk - writes a complete PNG chunk (header + data + CRC). Validates length < 0x7FFFFFFF. Calls png_write_chunk_header, png_write_chunk_data, png_write_chunk_end.
0x00E7FE3096png_write_compressed_datalibpng: png_write_compressed_data - writes compressed chunk data from a linked buffer list. Iterates through buffers writing 0x400-byte blocks, then remaining data from overflow buffers. Aborts if data remains after all buffers consumed.
0x00E7FEA076png_write_eXIflibpng: png_write_eXIf - writes the eXIf chunk (0x65584966). Writes chunk header, then each byte individually via png_write_chunk_data, then the CRC trailer.
0x00E7FEF0100png__write_rowWrites a single row of PNG image data. Compresses the row via png_compress_IDAT, swaps row buffers if needed, finishes the row, increments row counter, and flushes if the flush interval has been reached.
0x00E7FF60540png_write_find_filterlibpng: png_write_find_filter - selects the best PNG row filter by comparing None, Sub, Up, Average, and Paeth filters. Computes sum of absolute differences for each enabled filter and picks the one with the lowest sum. Uses optimized versions when only one filter is selected.
0x00E80180315png_write_finish_rowlibpng: png_write_finish_row - completes writing a row. Increments row counter, advances interlace pass if needed (Adam7). Calculates new pass dimensions. When all passes complete, finalizes IDAT compression with Z_FINISH.
0x00E802C042png_write_gAMA_fixedlibpng: png_write_gAMA_fixed - writes the gAMA chunk with a fixed-point gamma value as a 4-byte big-endian integer.
0x00E802F0116png_write_hISTlibpng: png_write_hIST - writes the hIST chunk with histogram data. Validates entry count against palette size. Writes each 16-bit frequency value in big-endian order.
0x00E80370305png_write_iCCPlibpng: png_write_iCCP - writes the iCCP chunk with an ICC color profile. Validates profile length (min 0x84) and version. Compresses profile data using zlib. Writes keyword + null + compression_method + compressed_profile.
0x00E804B0601png__write_iTXtWrites a PNG iTXt (international text) chunk. Validates keyword via FUN_00e81310, handles compression modes (0/2=compressed, -1/1=uncompressed), writes keyword, language tag, translated keyword, and text content. For compressed mode, uses zlib deflate via png_text_compress. Outputs chunk header, data segments, and chunk end.
0x00E80720106png_write_oFFslibpng: png_write_oFFs - writes the oFFs chunk with image offset data (x_offset, y_offset as signed 32-bit big-endian + unit_type byte). Warns if unit_type > 1.
0x00E80790408png__write_pCALWrites a PNG pCAL (calibration of pixel values) chunk. Validates equation type (0-3) and keyword, computes total chunk size from keyword, units string, and parameter strings. Writes chunk header, keyword, min/max as big-endian int32, equation type, parameter count, units, and parameter values.
0x00E80930106png__write_pHYsWrites a PNG pHYs (physical pixel dimensions) chunk. Stores X and Y pixels-per-unit as big-endian uint32, plus unit type byte. Warns if unit type > 1.
0x00E809A0204png__write_sBITWrites a PNG sBIT (significant bits) chunk. For grayscale (param_3 & 2 == 0): writes 1 byte. For RGB (param_3 & 2): writes 3 bytes (R, G, B). If alpha (param_3 & 4): appends alpha significant bits. Validates all bit depths are > 0 and <= image bit depth.
0x00E80A70189png__write_sCALWrites a PNG sCAL (physical scale of image subject) chunk. Writes unit type byte, followed by width string and height string separated by null. Warns if combined data exceeds 0x40 bytes buffer.
0x00E80B30337png__write_sPLTWrites a PNG sPLT (suggested palette) chunk. Validates keyword, writes chunk header with computed size. For 8-bit palettes: writes 6 bytes per entry (RGBA + freq). For 16-bit: writes 10 bytes per entry (RGBA as uint16 + freq as uint16). Each entry has R, G, B, A components and a frequency value.
0x00E80C9056png_write_sRGBlibpng: png_write_sRGB - writes the sRGB chunk with rendering intent (1 byte). Warns if intent > 3.
0x00E80CD0105png_write_siglibpng: png_write_sig - writes the 8-byte PNG file signature (89 50 4E 47 0D 0A 1A 0A). Accounts for already-written signature bytes. Sets PNG mode flag 0x1000 if less than 3 bytes were skipped.
0x00E80D40326png__write_start_rowInitializes PNG row writing state. Computes row bytes from bit depth and channels, allocates row buffer, sets up filter buffers based on filter mode flags, allocates previous row buffer for multi-row filters. Adjusts dimensions for interlaced images if interlace handling is not enabled.
0x00E80E90187png__write_tEXtWrites a PNG tEXt (uncompressed text) chunk. Validates keyword, computes text length, checks total size doesn't overflow. Writes chunk header, keyword + null terminator, then text data. Errors on invalid keyword or text too long.
0x00E80F50164png_write_tIMElibpng: png_write_tIME - writes the tIME chunk with last modification time (7 bytes: year, month, day, hour, minute, second). Validates ranges before writing.
0x00E81000319png__write_tRNSWrites a PNG tRNS (transparency) chunk. For palette images (type 3): writes palette transparency entries. For grayscale (type 0): writes 2-byte gray value. For RGB (type 2): writes 6 bytes (R, G, B as uint16). Validates values against bit depth and palette size. Errors for images with alpha channel.
0x00E81140287png__write_zTXtWrites a PNG zTXt (compressed text) chunk. For compression type -1, delegates to png__write_tEXt. For type 0 (zlib deflate): validates keyword, compresses text, writes keyword + compression byte + compressed data. Errors on invalid compression type or keyword.
0x00E8126067png__check_chunk_name_entrySearches a list of 5-byte chunk name entries for a matching 4-byte name. If found, updates the flags byte. If not found and param_4 is non-zero, appends a new entry. Returns updated count.
0x00E812B093png__check_locationValidates and normalizes a chunk location mask. Masks to valid bits (0xB), validates against current state, and extracts lowest set bit if multiple location flags are set. Errors if no valid location.
0x00E81310306png__check_keywordValidates and sanitizes a PNG text keyword. Copies valid characters (0x21-0x7E, 0xA1+) to output, collapses multiple spaces, strips leading/trailing whitespace. Truncates at 79 chars with warning. Warns about bad characters. Returns keyword length, 0 on failure.
0x00E8145028png__set_rgb_to_gray_modeSets the RGB-to-gray conversion error action mode. Masks param_2 to valid bits (0x5) and stores at offset 0x254. Returns the stored value. Returns 0 if PNG struct is null.
0x00E81470192png__set_IHDRSets PNG IHDR (image header) parameters in the info struct. Stores width, height, bit depth, color type, interlace, compression, filter method. Validates via png__validate_IHDR. Computes channels (1 for grayscale/palette, 3 for RGB) + alpha, pixel depth, and row bytes.
0x00E81530227png__set_PLTE_impllibpng: Sets PLTE (palette) data in info/png struct. Validates palette size against color type limits (2^bit_depth for palette type, 256 max). Allocates 768-byte (256*3) palette buffer, copies entries, sets palette count at offsets 0x10/0x14 and 0x140/0x144.
0x00E8162052png__set_gAMA_fixedLibpng png_set_gAMA_fixed: sets the gamma value in the PNG info structure using fixed-point representation.
0x00E8166034png__set_invalid_chunk_handlerLibpng png_set_invalid_chunk_handler: sets the callback for handling invalid or unknown PNG chunks.
0x00E81690246png__set_cHRM_doublelibpng: Sets cHRM (primary chromaticities and white point) from double-precision xy coordinates. Converts 8 doubles (white X/Y, red X/Y, green X/Y, blue X/Y) to fixed-point via png__float_to_fixed_point, then delegates to png__set_cHRM_fixed_impl.
0x00E81790274png__set_cHRM_XYZ_doublelibpng: Sets cHRM from double-precision XYZ (tristimulus) coordinates. Converts 9 doubles (red/green/blue X/Y/Z) to fixed-point, then delegates to png__set_cHRM_XYZ_fixed.
0x00E818B0140png__set_cHRM_XYZ_fixedlibpng: Sets cHRM from fixed-point XYZ (tristimulus) endpoints. Calls png__colorspace_set_endpoints with the 9 fixed-point values and sets chromaticity valid flag 0x10 on info struct.
0x00E81940134png__set_cHRM_fixed_impllibpng: Sets cHRM from fixed-point xy chromaticity coordinates. Calls png__colorspace_set_chromaticities_from_xy with 8 fixed-point values (white/red/green/blue x/y) and sets chromaticity valid flag 0x10.
0x00E819D023png__permit_mng_features_impllibpng: png_permit_mng_features. Sets MNG features permitted flag at offset 0x148. If param_2 > 0, enables (sets 0), otherwise disables (sets -1/0xFFFFFFFF).
0x00E819F021png__set_num_palette_entriesPNG library setter. Sets num_palette field (offset 0x284) on png_info struct. Null-checks the struct pointer.
0x00E81A1021png__set_num_transPNG library setter. Sets num_trans field (offset 0x288) on png_info struct. Null-checks the struct pointer before writing.
0x00E81A30141png__set_compression_buffer_sizelibpng: Sets the compression buffer size. For write structs (flag 0x8000), sets at offset 0x2AC. For read structs, validates minimum of 6 bytes, frees existing buffer list, and stores new size at offset 0xC0. Errors on 0 or >0x7FFFFFFF.
0x00E81AC021png__warn_set_eXIf_deprecatedPNG library function. Emits warning that png_set_eXIf is deprecated, should use png_set_eXIf_1 instead. Wrapper around png__warning with a static message.
0x00E81AE0155png__set_eXIf_datalibpng: Sets eXIf (Exif metadata) chunk data. Allocates buffer and copies raw Exif data. Stores length at offset 0xCC, data pointer at 0xD0. Sets free flag 0x8000 and valid flag 0x10000.
0x00E81B8046png__set_gAMA_doublelibpng: Sets gAMA (gamma) from a double-precision value. Converts to fixed-point via png__float_to_fixed_point (with "png_set_gAMA" context string), then delegates to png__set_gAMA_fixed_impl.
0x00E81BB046png__set_gAMA_fixed_impllibpng: Sets gAMA (gamma) from a fixed-point value. Calls png__colorspace_set_gamma on the info struct's colorspace, then updates colorspace flags.
0x00E81BE0168png__set_hISTLibpng png_set_hIST: sets the histogram data for palette-based PNG images in the info structure.
0x00E81C90302png__set_iCCP_impllibpng: Sets iCCP (embedded ICC color profile) chunk data. Validates compression method, sets chromaticities from profile, stores profile name and compressed data at offsets 0x74-0x7C. Sets info flags 0x10 (free mask) and 0x1000 (valid).
0x00E81DC026png__clear_info_flag_bitsPNG library function. Clears specific flag bits in a png_info struct's flags field (offset 8). Takes png_ptr, info_ptr, and bitmask. AND-NOTs the mask against the flags.
0x00E81DE0407png__set_keep_unknown_chunks_impllibpng: Internal implementation of png_set_keep_unknown_chunks. Manages the list of chunk names with keep/discard disposition at offsets 0x240 (default), 0x244 (count), 0x248 (list). Handles add, remove, and compact operations.
0x00E81F8052png__set_sCAL_sLibpng png_set_sCAL_s: sets the physical scale (sCAL chunk) for the PNG image using string representations.
0x00E81FC0616png__set_pCALlibpng: Sets pCAL (calibration of pixel values) chunk data in info struct. Validates equation type (0-3), parameter count (0-255), and numeric string format. Stores purpose string, X0/X1 ranges, equation type, parameter count, units string, and parameter strings at offsets 0xDC-0xF4.
0x00E8223052png__set_oFFslibpng: Sets oFFs (image offset) chunk data. Stores X offset at 0xC0, Y offset at 0xC4, and unit type at 0xC8 on info struct. Sets PNG_INFO_oFFs flag (0x80).
0x00E8227030png__set_image_dimensionsPNG library function. Sets image width (offset 0x238) and height (offset 0x23c) on a PNG struct. Null-checks the struct pointer first.
0x00E8229071png__set_rowslibpng: Sets row pointers in info struct. Stores pointer at offset 0x114, frees old data if different. Sets PNG_INFO flag 0x8000 when data is present.
0x00E822E046png_set_sCAL_s_paramslibpng: Sets sCAL chunk parameters (unit and dimensions) on png_info struct. Sets flag bit 0x2 in valid flags.
0x00E82310194png_set_sCAL_floatlibpng: png_set_sCAL with float width/height. Converts doubles to strings then calls png_set_sCAL_string.
0x00E823E0162png_set_sCAL_fixedlibpng: png_set_sCAL with fixed-point integer width/height. Converts to strings then calls png_set_sCAL_string.
0x00E82490370png_set_sCAL_stringlibpng: Sets sCAL chunk from string width/height. Validates unit (1=meter, 2=radian), checks non-negative values, allocates and copies strings to info struct.
0x00E82610367png_set_sPLTlibpng: Sets sPLT (suggested palette) entries. Grows array, copies name/entries/depth for each sPLT entry. Sets valid flag 0x2000.
0x00E8278046png_set_sRGBlibpng: Sets sRGB rendering intent on png_info. Calls colorspace check and update functions.
0x00E827B058png_set_sRGB_gAMA_and_cHRMlibpng: Sets sRGB intent and also updates gAMA and cHRM chunks. Sets flag bits 0x18 on info if colorspace check succeeds.
0x00E827F0120png_set_tIMElibpng: Sets tIME (last modification time) chunk. Validates month (1-12), day (1-31), hour (0-23), minute (0-59), second (0-60). Sets valid flag 0x200.
0x00E82870260png_set_tRNSlibpng: Sets tRNS (transparency) chunk. Handles palette transparency (alpha bytes), grayscale trans color, and RGB trans color. Validates sample range against bit depth. Sets valid flag 0x10.
0x00E8298042png_set_textlibpng: Public png_set_text wrapper. Calls png_set_text_internal and errors on OOM.
0x00E829B0768png_set_text_internallibpng: Internal text chunk setter. Grows text array, copies key/lang/lang_key/text for each text entry. Handles compressed and uncompressed text. Sets valid flag on info.
0x00E82CB0104png_set_unknown_chunk_locationlibpng: Sets the location of an unknown chunk by index. Validates chunk index and location flags.
0x00E82D20284png_set_unknown_chunkslibpng: Sets unknown chunk entries. Grows array, copies name/data/size/location for each chunk. Sets valid flag 0x200.
0x00E82E4030png_set_read_user_chunk_fnlibpng: Sets the user chunk read callback function and data pointer on the png_struct.
0x00E82E60237png_handle_unknown_chunklibpng: Handles reading of an unknown PNG chunk. Stores chunk name, allocates buffer for data, reads data, and finishes CRC. Manages memory limits.
0x00E82F50184png_check_chunk_lengthlibpng: Validates chunk data length. For IDAT chunks, calculates expected max size from image dimensions and compression overhead. Errors if chunk exceeds memory limit.
0x00E8301062png_check_chunk_namelibpng: Validates a 4-byte chunk type name. Each byte must be ASCII letter (A-Z or a-z). Errors on invalid chunk type.
0x00E830501138png_combine_rowlibpng: Combines a decoded row with the existing image row for interlaced images. Handles sub-byte pixel depths (1/2/4 bit) with masking, and byte-aligned depths with optimized copy loops. Preserves partial bytes at row end.
0x00E834D0140png_read_chunk_crclibpng: Reads and checks CRC for current chunk. Reads 4 bytes, byte-swaps to big-endian, compares with accumulated CRC. Returns true if CRC mismatch.
0x00E83560168png_crc_finishlibpng: Finishes reading a chunk by consuming remaining data and checking CRC. Reads data in 1024-byte blocks, then verifies CRC. Errors or warns on CRC mismatch.
0x00E8361041png_crc_readlibpng: Reads data from PNG stream and updates CRC. Calls read function then updates Adler32/CRC checksum.
0x00E83640558png_decompress_chunklibpng: Decompresses a PNG chunk's data (e.g., zTXt, iCCP). Checks memory limits, inflates data, allocates output buffer. Returns status code (-4=OOM, -7=error, 1=success).
0x00E838701113png_do_expand_pixel_rowlibpng: Expands pixel row by replication factor for interlaced image display. Handles 1-bit, 2-bit, 4-bit, and 8+ bit pixel depths. Works in-place from right to left to avoid overwriting source data.
0x00E83CD077png_get_fixed_point_from_buflibpng: Reads a 4-byte big-endian value from buffer as a PNG fixed-point number. Returns 0xFFFFFFFF and warns if value >= 0x80000000.
0x00E83D2058png_get_int_32libpng: Reads a 4-byte big-endian signed 32-bit integer from buffer. Handles two's complement for negative values.
0x00E83D6026png_get_uint_16libpng: Reads a 2-byte big-endian unsigned 16-bit integer from buffer.
0x00E83D8061png_get_uint_31libpng: Reads a 4-byte big-endian unsigned integer from buffer. Errors if value >= 0x80000000 (must fit in 31 bits).
0x00E83DC038png_get_uint_32libpng: Reads a 4-byte big-endian unsigned 32-bit integer from buffer. No range checking.
0x00E83DF071png_handle_IENDlibpng: Handles IEND (image end) chunk. Validates that IHDR and IDAT were seen. Finishes CRC, warns if IEND has data.
0x00E83E40356png_handle_IHDRlibpng: Handles IHDR (image header) chunk. Reads 13 bytes: width, height, bit_depth, color_type, compression, filter, interlace. Calculates pixel depth and row bytes. Must be exactly 13 bytes.
0x00E83FB0535png_handle_PLTElibpng: Handles PLTE (palette) chunk. Reads RGB triplets (max 256), validates against bit depth. Resets tRNS/hIST/bKGD if they precede PLTE.
0x00E841D0629png_handle_bKGDlibpng: Handles bKGD (background color) chunk. Reads palette index (color type 3) or gray/RGB values. Validates against bit depth and palette size.
0x00E84450501png_handle_cHRMlibpng: Handles cHRM (chromaticity) chunk. Reads 8 fixed-point values (white point and RGB primaries xy). Must be 32 bytes, before PLTE/IDAT.
0x00E84650349png_handle_eXIflibpng: Handles eXIf (EXIF metadata) chunk. Reads EXIF data, validates byte order marker (II or MM). Stores raw EXIF data on info struct.
0x00E847B0158png_handle_gAMAlibpng: Handles gAMA (gamma) chunk. Reads 4-byte fixed-point gamma value. Must be before PLTE/IDAT. Updates colorspace gamma and copies to info.
0x00E84850339png_handle_hISTlibpng: Handles hIST (histogram) chunk. Reads 16-bit frequency counts for each palette entry. Must appear after PLTE and before IDAT.
0x00E849B01396png_handle_iCCPlibpng: Handles iCCP (ICC color profile) chunk. Reads profile name, decompresses ICC profile data, validates and stores on info struct. Updates colorspace.
0x00E84F30539png_handle_iTXtlibpng: Handles iTXt (international text) chunk. Reads keyword, compression flag/method, language, translated keyword, and text. Supports compressed and uncompressed text.
0x00E85150390png_handle_oFFslibpng: Handles oFFs (image offset) chunk. Reads 9 bytes: two 32-bit signed offsets (x,y) and 1-byte unit type. Must be before IDAT.
0x00E852E0611png_handle_pCALlibpng: Handles pCAL (calibration of pixel values) chunk. Reads calibration name, x0/x1 min/max, equation type, parameter count, unit name, and parameter strings.
0x00E85550305png_handle_pHYslibpng: Handles pHYs (physical pixel dimensions) chunk. Reads 9 bytes: pixels per unit X, pixels per unit Y, unit type. Must be before IDAT.
0x00E85690365png_handle_sBITlibpng: Handles sBIT (significant bits) chunk. Reads per-channel significant bit counts. Validates values are non-zero and within bit depth range. Must be before PLTE/IDAT.
0x00E85800506png_handle_sCALlibpng: Handles sCAL (physical scale) chunk. Reads unit type (1=meter, 2=radian) and width/height as ASCII strings. Validates numeric format and positive values.
0x00E85A00660png_handle_sPLTlibpng: Handles sPLT (suggested palette) chunk. Reads palette name, sample depth (8 or 16), and RGBA+frequency entries. Supports 8-bit (6 bytes/entry) and 16-bit (10 bytes/entry) formats.
0x00E85CA0205png_handle_sRGBlibpng: Handles sRGB (standard RGB) chunk. Reads 1-byte rendering intent. Must be before PLTE/IDAT. Updates colorspace sRGB intent.
0x00E85D70309png_handle_tEXtlibpng: Handles tEXt (uncompressed text) chunk. Reads keyword and text string. Uses chunk cache limit for text chunks.
0x00E85EB0268png_handle_tIMElibpng: Handles tIME (timestamp) chunk. Reads 7 bytes: year (2 bytes big-endian), month, day, hour, minute, second. Can appear after IDAT.
0x00E85FC0518png_handle_tRNSlibpng: Handles tRNS (transparency) chunk. For palette images reads alpha bytes, for grayscale reads 2 bytes, for RGB reads 6 bytes. Sets transparent color values on png_struct.
0x00E861D0362png_handle_as_unknownlibpng: Handles unknown/unrecognized chunks. Calls user callback if set, otherwise stores chunk data. Manages chunk cache limits. Errors on unhandled critical chunks.
0x00E86340505png_handle_zTXtlibpng: Handles zTXt (compressed text) chunk. Reads keyword, compression method (must be 0), decompresses text. Can appear after IDAT.
0x00E86540331png__decompress_chunkPNG library: decompresses a chunk using zlib inflate. Manages zstream state at offsets 0x80-0x94. Loops calling png_zlib_inflate until complete. Handles both caller-provided and stack-local 1KB output buffers. Returns zlib error code.
0x00E86690295png_zlib_inflate_initlibpng: Initializes or resets zlib inflate stream. Closes previous stream if in use, then calls inflateInit2 or inflateReset. Sets up decompression for reading PNG data.
0x00E867C0256png_inflate_readlibpng: Reads and inflates compressed chunk data in a loop. Feeds input from CRC-read buffer, inflates into output buffer. Used by decompress_chunk for non-IDAT compressed data.
0x00E868C075png_init_filter_functionslibpng: Initializes row filter function pointers. Sets up sub, up, avg, and paeth filter handlers. Uses 1-byte paeth for 8-bit pixel depth, multi-byte paeth otherwise.
0x00E86910443png_read_IDAT_datalibpng: Reads and decompresses IDAT (image data) chunks. Chains consecutive IDAT chunks, inflates data into row buffer. Detects end of image data and validates completeness.
0x00E86AD0145png_read_bufferlibpng: Gets or allocates a read buffer of at least param_2 bytes. Reuses existing buffer if large enough, otherwise frees and reallocates. param_3: error level (0=fatal, 1=warning, 2=return null).
0x00E86B70160png_read_chunk_headerlibpng: Reads a PNG chunk header (8 bytes: 4-byte length + 4-byte type). Validates chunk name and length. Initializes CRC for the chunk. Returns chunk data length.
0x00E86C1062png_read_filter_rowlibpng: Dispatches row filter reversal based on filter type (1=sub, 2=up, 3=avg, 4=paeth). Initializes filter function pointers on first call.
0x00E86C5094png_read_filter_row_avglibpng: Reverses PNG Average filter. Each byte is predicted as floor((left + above)/2). First bpp bytes use above/2, remaining use (left+above)/2.
0x00E86CB0193png_read_filter_row_paeth_1bytelibpng: Reverses PNG Paeth filter for 1-byte-per-pixel. Implements Paeth predictor: chooses closest of left/above/upper-left neighbors based on absolute differences.
0x00E86D80238png_read_filter_row_paeth_multilibpng: Reverses PNG Paeth filter for multi-byte pixels. First bpp bytes use above row only, then applies full Paeth predictor with left/above/upper-left neighbors.
0x00E86E7055png_read_filter_row_sublibpng: Reverses PNG Sub filter. Each byte after the first bpp bytes has the value of the byte bpp positions to the left added to it.
0x00E86EB0153png_read_filter_row_uplibpng: Reverses PNG Up filter. Each byte has the corresponding byte from the previous row added to it. Unrolled to process 64 bytes at a time for performance.
0x00E86F50113png_read_finish_IDATlibpng: Finishes reading IDAT data. Consumes any remaining compressed data, closes the last IDAT chunk CRC. Called when all image rows have been read.
0x00E86FD0234png_push_have_rowlibpng: Advances to next row after a row is decoded. For interlaced images, cycles through Adam7 passes (0-6) updating row/col counts per pass. Finishes IDAT when all passes complete.
0x00E870C0158png_read_siglibpng: Reads and validates the 8-byte PNG signature. Checks for valid PNG magic bytes and detects ASCII conversion corruption.
0x00E87160748png_read_start_rowlibpng: Initializes row reading. Applies transforms to calculate final pixel depth, allocates row buffers (current + previous), sets up interlace pass dimensions. Initializes zlib inflate for IDAT.
0x00E8745077png_zlib_inflatelibpng: Calls zlib inflate(). Before first inflate, checks window size in zlib header. Returns zlib status code.
0x00E874A023png_default_flushlibpng: Default flush callback. Calls fflush on the output FILE*.
0x00E874C049png_default_write_datalibpng: Default write callback. Calls fwrite to output data. Errors on short write.
0x00E8750024png_write_flushlibpng: Calls the user-provided flush callback if set.
0x00E8752080png_set_write_fnlibpng: Sets write callback, flush callback, and IO pointer. Defaults to png_default_write_data and png_default_flush if NULL. Warns if read fn was set.
0x00E8757030png_write_datalibpng: Calls the user-provided write callback. Errors if write function is NULL.
0x00E87590346png_do_packlibpng: Packs expanded pixel data back to sub-byte bit depths (1, 2, 4 bit). Used during write when bit depth was expanded for processing. Only for 8-bit color type 1 channel.
0x00E876F0620png_do_shiftlibpng: Applies bit shift transformation during write. Shifts pixel values based on sBIT significant bits info. Handles sub-byte, 8-bit, and 16-bit depths per channel.
0x00E87960146png_do_invert_alphalibpng: Inverts alpha channel (255-alpha) for RGBA/GA color types. Handles 8-bit and 16-bit per channel.
0x00E87A00287png_do_swap_alphalibpng: Swaps alpha channel position (ARGB<->RGBA, AG<->GA) during write. Handles 8-bit and 16-bit per channel for color types 4 and 6.
0x00E87B20310png_do_write_transformationslibpng: Applies all write transformations in order: user transform, quantize, BGR swap, pack, shift, byte swap, bit packing, swap alpha, invert alpha, BGR swap, interlace handling.
0x00EAA1D0249ZipWriter__init_stateInitializes ZipWriter internal state. Sets up callback table pointers, compression parameters, and deflate state offsets. Configures entry list (0xf7c), output stream (0xf80), and deflate match parameters at large offsets (0x1af18+).
0x00EAA2D01495ZipWriter__add_entryAdds an entry to a zip archive. Handles 4 source types: (1) file handle, (2) open file by name, (3) memory buffer, (4) directory entry. Normalizes path separators, writes local file header, compresses/stores data, then appends entry to linked list. Uses ZipEntry/ZipFile helpers.
0x00EAA8B0211ZipWriter__write_central_directoryWrites the zip central directory. Iterates through all entries in the linked list, writes each central directory header, frees entry memory, then writes the end-of-central-directory record. Returns 0 on success, 0x400 on write error.
0x00EAA99023ZipWriter__set_total_size_if_newSets the total zip size at offset 0x6afa4 only if param_2 flag is zero (first time). Used to record final archive size for memory-based zip output.
0x00EAA9B095ZipWriter__finalize_and_closeFinalizes and closes the ZipWriter. Flushes the central directory if not already done, unmaps memory-mapped file view, closes file mapping handle and file handle. Returns accumulated error code.
0x00EAAA10106ZipWriter__close_and_freeCloses a zip handle and frees its memory. Validates state==2, calls ZipWriter__finalize_and_close, then frees the inner buffer (0x4078 bytes) and outer handle (8 bytes). Stores result in global DAT_0173eca0.
0x00EAAA80397ZipWriter__open_outputOpens a zip output destination. Supports 3 modes: (1) duplicate existing handle, (2) create new file via CreateFileA, (3) create memory-mapped file. Sets up file type detection and initial file position. Returns 0 on success.
0x00EAAC10170ZipWriter__create_handleCreates a new ZipWriter handle. Allocates a 0x4078-byte state buffer, initializes fields, opens the output via ZipWriter__open_output, then wraps in an 8-byte handle struct with state=2. Returns NULL on failure.
0x00EAB0B063ZipWriter__get_sizesGets zip archive sizes. Finalizes central directory if not done, then returns compressed size (offset 0x18) and total written size (offset 0x10) via output parameters. Returns 0x20000 if no data was written.
0x00EAB1F0207ZipWriter__add_file_entryAdds a file entry to the zip archive. Validates handle state, copies path to local buffer, then delegates to ZipWriter__add_entry. For mode 2 (file path), makes a local copy of the path string first. Stores result in global DAT_0173eca0.
0x00EAB2C092ZipWriter__get_memory_sizeGets the memory size of a completed zip archive. Validates handle, then calls ZipWriter__get_sizes to retrieve compressed and total sizes. Returns 0x10000 if handle is NULL, 0x80000 if not in valid state.
0x00EAB32075deflate__init_match_paramsInitializes deflate match parameters in the deflate state structure. Sets lookahead start, previous match, hash insert position, and clears match counters at offsets 0x1af54-0x1af6c.
0x00EAB37037deflate__bit_reverseReverses the bit order of a value. Takes a value and bit count, returns the value with bits reversed. Used in Huffman code generation (bi_reverse in zlib).
0x00EAB3A0220deflate__flush_bit_bufferFlushes the bit buffer (bi_windup in zlib). Writes remaining bits from the bit accumulator to the output buffer, handles byte alignment, and resets bit counters. Aligns total bits to next 8-bit boundary.
0x00EAB480239deflate__build_bl_treeBuilds the bit-length tree for encoding literal/distance tree headers (build_bl_tree in zlib). Scans bit length frequencies to determine optimal tree size. Returns max index of non-zero bit length codes. Updates total bit count.
0x00EAB570522deflate__build_huffman_treeBuilds optimal Huffman tree from frequency data (build_tree in zlib). Uses heap-based algorithm with pqdownheap to construct the tree, then calls gen_bitlen and gen_codes to generate optimal bit lengths and codes.
0x00EAB780352deflate__compress_blockCompresses a block using the given literal and distance Huffman trees (compress_block in zlib). Iterates through the match buffer, encoding literals and length/distance pairs. Writes END_BLOCK code at the end.
0x00EAB8E0328deflate__copy_stored_blockCopies a stored (uncompressed) block to the output (copy_block in zlib). Flushes bit buffer, writes block length and complement, then copies raw data via memcpy. Updates total bit count.
0x00EABA30240zlib_crc32Computes CRC32 checksum using a lookup table at DAT_011bf178. Processes data in 8-byte unrolled chunks for performance, then handles remaining bytes individually. Returns the CRC32 value.
0x00EABB20786deflate__init_treesInitializes static and dynamic Huffman trees for deflate compression (ct_init in zlib). Builds length/distance code lookup tables, initializes static literal tree (fixed 7/8/9 bit codes), static distance tree (fixed 5-bit codes), and calls init_block. Only runs once (guarded by static flag at offset 0xe7e).
0x00EABE40487deflate__tally_matchRecords a literal or length/distance match pair (ct_tally in zlib). If dist==0, records a literal byte. Otherwise records a match with distance and length, updating frequency counters for literal, length, and distance trees. Returns 1 if the block buffer is full and should be flushed.
0x00EAC030841deflate__lazy_matchDeflate compression with lazy matching strategy (deflate_slow in zlib). For compression levels >= 4, uses two-pass matching: first finds a match, then checks if the next position has a better match before committing. Emits literals or match pairs via tally, and flushes blocks when full. Falls back to deflate_fast for lower levels.
0x00EAC380590deflate__fast_matchDeflate compression with fast matching strategy (deflate_fast in zlib). For each position, finds the longest match and immediately emits it. Inserts hash entries for matched bytes. Flushes blocks when tally returns full. Simpler but less optimal than lazy matching.
0x00EAC6A0353deflate__fill_windowFills the sliding window buffer with input data (fill_window in zlib). When the window position exceeds 0x7efa, slides the window by copying the upper half to the lower half and adjusting hash chains. Reads more input data via the read callback until lookahead >= 262 bytes or EOF.
0x00EAC810441deflate__flush_blockFlushes a deflate block to the output (flush_block in zlib). Determines whether to emit a stored block, static Huffman block, or dynamic Huffman block based on which has the smallest output size. Builds trees, compresses the block, and returns the compressed size in bytes.
0x00EAC9D0518deflate__gen_bitlenGenerates optimal bit lengths for a Huffman tree (gen_bitlen in zlib). Enforces max code length constraint by redistributing bits from longer codes. Computes opt_len and static_len cost estimates for the tree.
0x00EACBE0170deflate__gen_codesGenerates Huffman codes from bit lengths (gen_codes in zlib). Computes starting code for each bit length, then assigns reversed bit codes to each symbol. Verifies total code count consistency.
0x00EACDC0148deflate__init_blockResets frequency counters for a new deflate block (init_block in zlib). Clears all 286 literal/length frequencies, 30 distance frequencies, and 19 bit-length frequencies. Resets opt_len, static_len, match/literal counts. Sets END_BLOCK frequency to 1.
0x00EACED0322deflate__set_compression_levelSets deflate compression level parameters (lm_init in zlib). Validates level 1-8, clears hash table, loads configuration (max_lazy, good_match, nice_match, max_chain) from a config table. Reads initial input into the window buffer and initializes the hash function.
0x00EAD020495deflate__longest_matchFinds the longest matching string in the hash chain (longest_match in zlib). Compares bytes at the current position with candidates from the hash chain, using 8-byte unrolled comparison. Follows hash chain up to max_chain_length links. Returns the match length (up to 258 bytes). Updates match position in the state.
0x00EAE020242deflate__scan_tree_frequenciesScans a Huffman tree and counts bit-length code frequencies (scan_tree in zlib). Processes the tree to count runs of equal bit lengths, zero-length codes, and repeated codes. Updates bit-length frequency counters for encoding the tree structure in the compressed output.
0x00EAE120215deflate__send_all_treesSends all three Huffman tree headers for a dynamic block (send_all_trees in zlib). Writes literal count, distance count, and bit-length count as 5/5/4 bit fields. Sends bit-length tree codes, then sends literal and distance trees using the bit-length tree.
0x00EAE200192deflate__send_bitsSends bits to the output buffer (send_bits in zlib). Accumulates bits in a 16-bit buffer, flushing 2 bytes to output when the buffer exceeds 16 bits. Validates bit length is 1-15. Updates total bit count.
0x00EAE2C0389deflate__send_treeSends a Huffman tree as a sequence of bit-length codes (send_tree in zlib). Encodes runs of equal lengths, zero-length codes (repeat counts 3-10 and 11-138), and consecutive equal codes (repeat count 3-6). Uses the bit-length tree for encoding.
0x00EAE450170deflate__set_data_typeDetermines if data is binary or text (set_data_type in zlib). Sums frequencies of control characters vs ASCII characters. If control character frequencies exceed 1/4 of ASCII frequencies, sets the data type flag to binary (1), else text (0).
0x00EAE50041deflate__flush_write_callbackDeflate output flush callback. If pending output bytes > 0, writes them to the output stream and resets the pending count to 0. Used as the flush callback in the deflate compression pipeline.
0x00EAE53021deflate__read_input_callbackDeflate input read callback. Thin wrapper that calls ZipEntry__read_data to read from the ZIP entry source. Passes through the buffer and returns bytes read.
0x00EAE55026deflate__write_output_callbackDeflate output write callback. If size > 0, writes data to the ZIP output stream via ZipEntry__write_data. Thin wrapper used in deflate compression pipeline.