Hangul
CHangulComposer, CHangulContext, CHangulWordBreaker, CIMEManager, CTrie/CFst, SCSK
| Address | Size | Name | Description |
|---|---|---|---|
| 0x00AC3D90 | 128 | CTrie__destroy | Destroys a CTrie structure. Frees compiled data at offset 4 (1 byte), recursively destroys child/sibling subtrees from root, frees root node (0xC bytes), then frees the 300-byte trie object itself. |
| 0x00AC3E30 | 110 | CTrie__clear | Clears a CTrie in place without freeing the outer object. Frees compiled data and recursively destroys all nodes in the tree. |
| 0x00AC3EB0 | 260 | CTrie__insert | Inserts a string (param_2, length param_3) into a trie. Creates root node on first insert. Traverses existing nodes matching characters, creating new 0xC-byte nodes as needed (byte 0=char, byte 1=terminal flag, offset 4=sibling, offset 8=child). Returns 1 if new word, 0 if duplicate. |
| 0x00AC3FC0 | 35 | CTrie__get_unique_prefix_length | Gets unique prefix length in the trie. Traverses child chain (offset 8) counting nodes that have no siblings (offset 4 == 0). Returns count of unique prefix characters. |
| 0x00AC3FF0 | 49 | CTrie__destroy_subtree | Recursively destroys a trie subtree. Post-order traversal: destroys child (offset 8), then sibling (offset 4), then frees this 0xC-byte node. |
| 0x00AC4030 | 28 | CTrie__count_sibling_chain | Counts the number of nodes in a sibling chain (linked via offset 4). Simple traversal counter. |
| 0x00AC4050 | 2187 | CHangulWordBreaker__segment_text | Korean word breaker. Segments input text (param_2, length param_3) into word break positions stored in param_4 (max param_5 breaks). Initializes dictionary/FST on first call, then processes each byte using character class tables, FST dictionary lookups, and hangul_should_break_word rules. param_6 flags control break behavior. Returns number of segments. |
| 0x00AC48E0 | 307 | CFst__match_string | Matches a string against a compiled finite state transducer (FST). Traverses the packed state table following transitions for each input byte. Handles compressed state encoding with branch/terminal flags. Returns longest match length (or 1000 for empty input). Used for Korean word segmentation. |
| 0x00AC4A40 | 261 | CHangulDictionary__init | Initializes the Hangul dictionary. Destroys existing trie if present, allocates new 300-byte CRsmFileData, loads dictionary from ftwrk.lex file via FUN_00ac4fa0. Copies 0x400 bytes of default table from DAT_013486a8. |
| 0x00AC4B50 | 19 | CHangulDictionary__copy_default_table | Copies 0x180 bytes (96 dwords) of default Hangul character classification table from DAT_01348528 into the destination buffer. |
| 0x00AC4B70 | 137 | CFst__compile_sibling_chain | Compiles a trie sibling chain into FST byte array at param_1's compiled buffer (offset 0x10). Writes character bytes and terminal flags. Recursively compiles child subtrees via CFst__compile_trie_node. |
| 0x00AC4C20 | 51 | CTrie__compile_to_fst | Compiles a trie into an FST (finite state transducer) byte array. Allocates buffer (node_count * 10), then calls CFst__compile_trie_node to build the packed state table. Stores compiled size at offset 3. |
| 0x00AC4C60 | 188 | CFst__lookup_word | Looks up a null-terminated string in the compiled FST. Traverses packed state transitions matching each byte. Returns 1 if found (terminal state reached), 0 otherwise. Uses 22-bit addresses for state pointers. |
| 0x00AC4D40 | 331 | CFst__compile_trie_node | Compiles a trie node and its children into FST packed byte format. Writes 3-byte state pointers for siblings, then character sequences for chains without branches. Handles terminal flags and recursive compilation. Core of the trie-to-FST compilation. |
| 0x00AC4FA0 | 447 | CHangulDictionary__load_from_file | Loads Hangul dictionary from a .lex file. Opens via CFileStream, reads 0x118-byte header, validates word/node counts, allocates and reads FST data. Sets loaded flag at offset 0x128. Cleans up on failure. |
| 0x00AC5160 | 176 | CHangulDictionary__save_to_file | Saves Hangul dictionary to a file. Populates header fields from runtime data. Opens file with fopen("wb"), writes 0x118-byte header then FST data. Returns 1 on success, 0 on failure. |
| 0x00AFAF00 | 231 | SCSK__init_keyboard_security | Initializes SCSK keyboard security. Loads SCSKAppLink.dll, gets proc addresses for LoadSCSK, StartSCSK, StopSCSK, GetRealAscii. Calls LoadSCSK to initialize. Sets global DAT_016d5768 on success. Only runs when param_2==0xF and not already initialized. |
| 0x00AFAFF0 | 131 | SCSK__stop_keyboard_security | Stops SCSK keyboard security by calling StopSCSK function pointer. Only runs when initialized (magic 0xF) and currently active. Outputs debug string on success/failure. |
| 0x00AFB080 | 54 | SCSK__get_real_ascii | Gets real ASCII keycode from SCSK keyboard security module. Only works when magic is 0xF, module is loaded, and input key is '*' (0x2A, the masked character). Calls GetRealAscii function pointer to decrypt the real key. |
| 0x00AFB0C0 | 225 | SCSK__load_library | Loads SCSK keyboard security library. Same as SCSK__init_keyboard_security but returns 1/0 success/failure and doesn't set the global pointer. Loads SCSKAppLink.dll, resolves LoadSCSK/StartSCSK/StopSCSK/GetRealAscii. |
| 0x00AFB1B0 | 100 | SCSK__start_keyboard_security | Starts SCSK keyboard security. Calls StartSCSK(param_2) function pointer when module is loaded but not yet started. Outputs debug string on success/failure. Returns handle on success, 0 on failure. |
| 0x00AFB220 | 82 | SCSK__stop_and_report | Stops SCSK keyboard security and reports status. Calls StopSCSK function when module is active. Returns handle on success, 0 on failure. Outputs debug strings. |
| 0x00AFB2A0 | 135 | IME_helper_cleanup | Cleans up IME helper (IMESCHLP.dll). Loads the library, calls QueryIMEHelper with command 0x9000F004, then calls the returned function, gets module handle, and frees the library. |
| 0x00AFB410 | 446 | IME_helper_init_and_login | Initializes and logs in to IME helper (IMESCHLP.dll). Loads the library, calls QueryIMEHelper for login (0x9000F002), then authenticates (0x9000F001). On failure, shows warning dialog. On specific error (-0x7FFF1FFF), shows dialog box and calls IME_helper_show_window. Version string: '5.01.2600.1832'. |
| 0x00AFB5D0 | 60 | IME_helper_show_window | Shows the IME helper window. Loads IMESCHLP.dll, calls QueryIMEHelper with command 0x9000F003, then calls the returned function with the main window handle. |
| 0x00AFB610 | 111 | IME_helper_error_callback | IME helper error callback. Maps error codes (0x8000E001-0x8000E006) to string resource IDs (0x416-0x41A) and shows a dialog box. Then shows IME helper window and triggers game quit via CGameMode__on_quit. |
| 0x00AFB740 | 30 | CIMEManager__ctor | Constructor for CIMEManager. Stores HWND handle, zeroes internal state fields: context pointer, composition state, and character buffer. |
| 0x00AFB790 | 22 | CIMEManager__get_candidate_list | Gets the IME candidate list. Returns result from internal function if context (offset 4) exists, otherwise returns 0. |
| 0x00AFB7B0 | 72 | CIMEManager__send_ime_char | Sends an IME character to the window. Uses WM_USER+0x64 (0x464) message. If currently composing (offset 0x11), sends reset first. Sends char as WPARAM, updates stored character at offset 0x10. |
| 0x00AFB800 | 72 | CIMEManager__send_ime_char_00afb800 | Duplicate of CIMEManager__send_ime_char. Sends IME character via message 0x464, resets composition state first if active. |
| 0x00AFB850 | 30 | CIMEManager__destroy_context | Destroys the IME context. Calls cleanup function then frees the 0x34-byte context structure at offset 4. |
| 0x00AFB870 | 241 | CIMEManager__process_ime_key | Processes an IME key event. Calls internal composition handler, then based on result code (0x3E9=compose, 0x3EA=commit, 0x3EB=direct), sends appropriate messages via SendMessageA(0x464). Manages composition state and character buffer. |
| 0x00AFB970 | 163 | CIMEManager__init_and_compose | Initializes IME and processes composition. Stores HWND, allocates 0x34-byte context if mode is 0x66 (Korean), initializes context, then calls composition handler. Returns composition result or 0 if no context. |
| 0x00AFBA20 | 73 | CIMEManager__handle_char_input | Handles character input through IME manager. If context (offset 0xC) exists, tries composition first. If composition fails, falls through to direct send via SendMessageA(0x464). Returns 1 if composed, 0 for direct send. |
| 0x00AFBA70 | 36 | CIMEManager__send_raw_char | Sends a raw character directly to the window via SendMessageA with message 0x464. Updates the stored last character at offset 0x10. No IME processing. |
| 0x00AFBAA0 | 38 | CIMEManager__on_key_down | Handles key down events for IME. Tracks VK_CONTROL (0x11) and VK_MENU/ALT (0x12) modifier key state at offsets 0x14 and 0x18. |
| 0x00AFBAD0 | 57 | CIMEManager__on_key_up | Handles key up events for IME. When both Ctrl+Alt are released simultaneously, toggles IME mode (offset 0xC). Clears modifier tracking for VK_CONTROL (0x11) and VK_MENU (0x12). |
| 0x00AFBB20 | 27 | CHangulComposer__ctor | Constructor for CHangulComposer (2-set Hangul input). Sets vtable, initializes last consonant to 0x7F, resets composition indices to -1. |
| 0x00AFBB40 | 308 | CHangulComposer__compose_char | Hangul character composition engine. Handles Korean jamo (consonant/vowel) input, composing syllables from individual keystrokes. Manages consonant/vowel state machine with rules for double consonants, vowel combinations (w+e, w+y etc.), and syllable completion. Returns syllable index or 1000 for reset, -1 for rejection. |
| 0x00AFBC80 | 84 | CHangulComposer__validate_continuation | Validates whether a character can continue the current Hangul composition. Returns 0 if invalid (triggers reset via vtable call), 1 if valid. Checks against vowel table (DAT_0134C42C) and specific consonant rules. |
| 0x00AFBD00 | 48 | CHangulContext__init | Initializes a Hangul input context structure (0x34 bytes). Zeroes all composition state, input buffer, and syllable tracking. Sets initial state to 0x3E9 (ready for input). |
| 0x00AFBD30 | 18 | CHangulContext__set_mode | Sets the Hangul input mode at offset 0x2C if different from current value. |
| 0x00AFBD50 | 200 | CHangulContext__set_input_method | Sets the Hangul input method (0=3-set, 1=2-set). Frees existing composer if present, creates new 0x10-byte composer object. Method 0 creates CHangulComposer3Set, method 1 creates CHangulComposer (2-set). Returns true if composer created. |
| 0x00AFBE20 | 23 | CHangulContext__free_composer | Frees the Hangul composer object (0x10 bytes) if allocated. Always returns 1. |
| 0x00AFBE40 | 359 | CHangulContext__process_key | Processes a key through the Hangul composition engine. Manages three states: 0x3E9 (initial), 0x3EA (awaiting vowel after initial consonant), 0x3EB (composing syllable). Maps input chars to jamo indices, handles vowel selection (A/E/I/O/U/Y/D), manages syllable buffer with rollover at 10 entries. Returns state code. |
| 0x00AFC010 | 180 | CHangulContext__create_composer | Creates a Hangul composer object based on input method type. Frees existing composer, then creates CHangulComposer3Set (type 0) or CHangulComposer (type 1, 2-set). Returns true if creation succeeded. |
| 0x00AFC0D0 | 194 | CHangulContext__check_and_compose | Checks if a character can be composed in the current Hangul context. In state 0x3EB (composing), validates via composer. Resets state if validation fails. For vowel chars (A/E/I/O/U/Y/D), transitions to state 0x3EA (awaiting composition). Returns 1 if composed, 0 if not. |
| 0x00AFC1A0 | 71 | CHangulContext__reset | Resets the Hangul input context. Optionally calls composer's reset method (vtable offset 8). Clears all composition state, buffers, and sets state back to 0x3E9 (ready). |
| 0x00AFC1F0 | 27 | CHangulComposer3Set__ctor | Constructor for CHangulComposer3Set (3-set/Sebulshik input). Sets vtable to 0x0115A850, initializes last char to 0x7F, resets indices to -1. |
| 0x00AFC210 | 64 | CHangulComposer3Set__compose_char | 3-set Hangul composition engine. Maps digit keys 1-9 to jamo components. Handles double consonants (key 6 after vowel), vowel combinations (key 7 after O/U), complex finals (key 8 after A). Key 9+D produces special syllable 0x49. Returns syllable index, 1000 for reset, -1 for rejection. |
| 0x00AFC380 | 32 | CHangulComposer3Set__validate_continuation | Validates continuation for 3-set Hangul input. Returns 1 if the character is a digit 1-9 (valid jamo key), 0 otherwise (triggers composer reset). |
| 0x0108F680 | 10 | thunk_to_CTrie__destroy | Thunk that calls CTrie__destroy to destroy a global trie structure. |
No function here matches that. Search all 47,061 functions instead.