Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
reverse_prep_step2_hypotheses.md
File editor
# Reverse-Prep Step 2 — Hub Function Hypotheses Status note: this is the next-pass output from the call-graph/statistics sweep and decompilation sampling. Next-step action: top-3 names for the first renaming batch have been applied to function index manifests. Checkpoint update: - Third batch applied across both function indices (`wp_exe_functions_pass15.txt`, `wp_exe_functions_pass16.txt`) and decomp output (`decompiled_wp_pass17.c`): - `FUN_1000_19fb` → `set_mode_or_status_bits` - `FUN_4000_0869` → `return_param2_passthrough` - `FUN_4000_2054` → `low_confidence_wrapper_cluster` - `FUN_4000_3871` → `output_or_format_char_loop` - `thunk_FUN_4000_0869` → `thunk_passthrough_0869` (all thunk aliases) Current status: all of: `0afd`, `19fb`, `1e78`, `2447`, `48b3`, `74b4`, `464d`, `2054`, `3871`, and `0869` are now readable by semantic (or at-least-hypothesis) names in the primary artifacts. Step 4 follow-on checkpoint: - Added low-risk buffer helper names: - `0b5c` → `append_byte_to_buffer` - `0b86` → `append_word_to_buffer` - `0ba7` → `prepend_byte_to_buffer` - `0bc7` → `prepend_word_to_buffer` - `0bea` → `copy_words_between_pointers` - `0c76` → `reverse_copy_bytes_or_words` - Updated xref-stat name maps to reflect the renaming: - [wp_exe_func_xref_stats_pass15.txt](/home/arduino/wordperfect/rev/wp_exe_func_xref_stats_pass15.txt) - [wp_exe_func_xref_stats_pass16.txt](/home/arduino/wordperfect/rev/wp_exe_func_xref_stats_pass16.txt) Purpose: produce high-confidence names to drive manual renaming before deeper semantic recovery. ## Priority naming candidates (high call activity / coherent role signals) 1. `FUN_1000_0afd` → `consume_next_input_byte` - Role: minimal helper that advances a pointer/state and returns next byte/char. - Evidence: tiny function; called by parser/dispatcher chain. - Confidence: High. 2. `FUN_1000_2447` → `classify_or_handle_token_step` - Role: token/char classifier with per-branch transitions/state flags. - Evidence: many branches and state updates; used by input + parser hubs. - Confidence: High. 3. `FUN_1000_1e78` → `dispatch_input_sequence` - Role: central stateful input/state machine dispatch function. - Evidence: highest call count; called from multiple UI/input and command paths. - Confidence: Very High. 4. `FUN_1000_48b3` → `parse_next_command_or_word` - Role: parser-like function that loops, checks char classes, calls `FUN_1000_2447`/`FUN_1000_0afd`. - Evidence: parser-shaped control flow and call-site clustering. - Confidence: High. 5. `FUN_1000_74b4` → `handle_escape_or_subcommand` - Role: sub-dispatch loop that repeatedly consumes input and eventually calls `FUN_1000_1e78`. - Evidence: structure resembles command prefix/escape handling. - Confidence: High. 6. `FUN_1000_464d` → `validate_or_adjust_parser_state` - Role: range/flag validator with many bounds/bit checks, then dispatch. - Evidence: repeated validation branches and transitions, plus downstream parser calls. - Confidence: Medium. 7. `FUN_1000_19fb` → `set_mode_or_status_bits` - Role: sets/clears execution status flags and delegates to `FUN_1000_0d5d` / `FUN_1000_14ac`. - Confidence: Medium. 8. `FUN_4000_3871` → `output_or_format_char_loop` - Role: small null-terminated traversal calling output helper (`FUN_45f2_1cb7`). - Confidence: Low-Medium. 9. `FUN_4000_2054` → `low_confidence_wrapper_cluster` - Role: large function with decompiler control-flow noise and many internal calls. - Confidence: Low. 10. `thunk_FUN_4000_0869` → `thunk_passthrough_0869` - Note: real implementation `FUN_4000_0869` appears to just return `param_2`. - Action: do not treat as non-return/abort despite decompiler warning. - Confidence: High. ## Next-step validation checks (before renaming) 1. Confirm each candidate signature from decompilation (arg widths/types) before applying final names. 2. Verify callsites around `216f`, `195e`, `7650` for cohesive command-loop boundaries. 3. Compare candidate outputs with nearby strings in `wp_exe_strings_pass15.txt` for immediate semantic anchors. 4. Run one-pass rename pass only for top three (`0afd`, `2447`, `1e78`) and re-run decompilation to observe stability.
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history