CharMode
CCharMode character select, slot management, char creation/deletion
| Address | Size | Name | Description |
|---|---|---|---|
| 0x00D8CD40 | 26 | CCharMode__set_selected_char_id | Sets selected character ID at offset 0x6F28 from packet data. Transitions to state 0x18 (map server connect pending). Part of CCharMode class. |
| 0x00D8D960 | 121 | CCharMode__send_keepalive | Sends keepalive packet 0x187 with entity ID. Only sends in states 7/8/0xB/0x13 and when 12-second timer has elapsed. Part of CCharMode class. |
| 0x00D8D9E0 | 426 | CCharMode__clear_all_char_data | Clears all character select data. Destroys STL tree at offset 0x6144, resets counters (0x6148-0x6170). Iterates 0x2C-byte entries in vector at 0x6178, destroying inner string vectors. Part of CCharMode class. |
| 0x00D8E700 | 103 | CCharMode__get_max_char_priority | Iterates through character entries (0xAF bytes each, starting at offset 0x4068, max 0x44 entries). Returns the maximum priority byte value found at offset 0x8A within each entry. Returns -1 if null. Part of CCharMode class. |
| 0x00D8E7E0 | 422 | CCharMode__remove_char_entry_by_priority | Removes character entry matching DAT_017304da priority. Allocates temp buffer, copies non-matching entries, decrements count and DAT_01737ff4. Each entry is 0xAF bytes at offset 0x4068. Sets state to 7. Part of CCharMode class. |
| 0x00D8E990 | 169 | CCharMode__init_char_select_data | Initializes character select data from server packet. Stores slot/count/flags to globals, zeros 0x2E7C byte entry buffer at offset 0x4068. Copies 20-byte auth token from packet to offset 0x6EFC with htonl byte-swaps. Part of CCharMode class. |
| 0x00D8EAC0 | 519 | CCharMode__load_char_list | Loads character list from packet. Copies 20-byte auth token with htonl swaps. Calculates char count from (packet_size-0x1B)/0xAF. Validates size alignment, shows error if misaligned. Copies char data and translates map names. Part of CCharMode class. |
| 0x00D8ECD0 | 230 | CCharMode__add_char_entry | Adds single character entry (0xAF bytes) to global DAT_01730450 and to next slot in entry array at offset 0x4068. Translates map name. Increments char count and DAT_01737ff4. Sets state to 7. Part of CCharMode class. |
| 0x00D8F040 | 1300 | CCharMode__handle_char_list_page | Handles paginated character list packet. Validates 0xAF entry alignment, checks max 0x44 slots. Copies entries, stamps deletion timers, adjusts class gender codes. If not last page (count!=3), finalizes list and translates map names. Sets state 7. Part of CCharMode class. |
| 0x00D8F7C0 | 282 | CCharMode__load_char_list_with_auth | Loads character list with auth token. Copies 20-byte auth token with htonl swaps. Calculates char count from (packet_size-0x18)/0xAF. Copies char entry data to buffer at offset 0x4068. Sets state to 0x13. Part of CCharMode class. |
| 0x00D8F8E0 | 196 | CCharMode__load_char_list_simple | Simple character list load without auth token. Calculates char count from (packet_size-4)/0xAF, copies data to entry buffer at offset 0x4068. Sets state to 7. Part of CCharMode class. |
| 0x00D91790 | 1599 | CCharMode__handle_disconnect_reason | Handles disconnect reason codes for char mode. Large switch/jump table for codes <0xF5 (via jump table). For codes >=0xF5: 0x1393=msg 0x72F, 0x1394=format with param_3, 0x1395-0x13C8 various disconnect messages. Code 0x1397 opens Stove/member_gate8 URL in browser via ShellExecuteA (XOR-encrypted 'open' command). 0x14B4/0x14B5 use newer messages. Falls through to quit or return to state 3. |
| 0x00D929A0 | 440 | CCharMode__connect_to_char_server | Connects to character server. Stores map ID at DAT_01733c40. Sends init request via DAT_013495bc vtable (type 0x2719). Unregisters old char select window. Copies server name string, extracts IP via inet_ntoa, stores port and name to globals. Disconnects old session, transitions to state 0xC. |
| 0x00D92B80 | 526 | CCharMode__handle_char_select_input | Handles char select screen input events. For events 0x2D/0x2E/0x2F (char select actions), shows corresponding messages (0x873/0x874/0x875) in dialog, pushes event to action queue at offset 0x6F1C. If queue changed, repositions window within screen bounds. Returns 1 if action taken, 0 otherwise. |
| 0x00D97180 | 92 | CCharMode__cleanup_resources | Cleans up char mode resources. Runs anti-cheat counter update, releases all unreferenced resources from CResourceMgr, calls stub_0056fd70. Clears string at offset 0x6F50. |
| 0x00D97410 | 421 | CCharMode__init_state | Initializes char mode state. Computes anti-cheat session token. Sets 6 counters to 5, initializes connection state fields. Copies server name from PTR_DAT_01348f84. Resets memory (0x80 bytes at offset 0xB8), calls init vtable method. Sets DAT_01360084=3, DAT_01730634=1. Plays BGM if enabled. Resets town info, various subsystem states. |
| 0x00D975C0 | 438 | CCharMode__process_frame | Char mode frame processor. Handles network updates, packet processing, keepalive, crash reports, mouse input. Checks connection timeouts per state. Handles device reset, resource reload for texture changes. Renders UI, minimap, cursor, fade effects, screenshots. |
| 0x00D97780 | 868 | CCharMode__check_connection_timeout | Checks connection timeouts for various char mode states. State 4: 15s timeout (120s for kRO/jRO), sends 0x2725. State 5: 80s timeout, disconnect with message 1. State 6/0xC: 15s timeout, disconnect. State 0x26: 60s timeout for 2nd password, shows msg 0xD16 or 0xD70. |
| 0x00D97B30 | 507 | CCharMode__run_main_loop | Main loop for char mode. Processes pending state changes, handles quit detection with MessageBox error display (XOR-encrypted title), calls process_frame each iteration. Shows fade-out with logo on exit. Returns 1. |
| 0x00D97D30 | 447 | CCharMode__process_frame_game | Game variant of char mode frame processor. Similar to process_frame but also runs CUIEventManager__process_events, timer callbacks (1000ms), Steam callbacks (Base_RunCallback). Same rendering pipeline. |
| 0x00D98470 | 6222 | CCharMode__dispatch_network_packets | Dispatches network packets during char select mode. 6.2K bytes. Called by CCharMode__process_frame. Reads packets from network session, handles login server list, char create/delete, pincode, map connect, web auth tokens, second password, premium time, and disconnect reasons. |
| 0x00D9B210 | 1170 | CCharMode__send_login_packet | Builds and sends login packet (0x277). Copies auth data, session keys, encrypted fields. Gets MAC address via Netbios NCB (NCBRESET+NCBASTAT) and formats as string. Falls back to encrypted default on Netbios failure. Gets local IP via gethostbyname+inet_ntoa (fallback to encrypted default). Sends via CNetworkSession__send_data_timed. |
| 0x00D9B6B0 | 730 | CCharMode__send_udp_analytics | Sends UDP analytics packet. If string at 0x6F50 is set and DAT_01733c3c (entity ID) is non-zero, builds payload with entity ID + string data. Resolves encrypted analytics server hostname (XOR decrypted), creates UDP socket, sends to port 0x1771 (6001). Returns 1 on success. |
| 0x00D9B990 | 632 | CCharMode__handle_message | Main message handler for CCharMode. Massive switch handling 40+ message types (0x2711-0x2736). Handles server selection (0x2713), character selection, state transitions, string storage (names/passwords), server list operations, char slot operations. Message 0x2719 populates character stats to globals. Message 0x2723 handles service type 0x13 (Stove) login with encrypted config paths. |
| 0x00D9CE80 | 103 | CCharMode__set_loading_screen_path | Sets loading screen path string. If param_2 differs from existing string at offset 0x9C, copies via STL_lib_func_004fa8f0. Destroys temporary string. |
No function here matches that. Search all 47,061 functions instead.