{"type": "func", "start": 5371391280, "end": 5371391437, "name": "SelectFontLayer::onChangeFont", "pseudocode": "// \n// SelectFontLayer::onChangeFont from 0x14028ed30 to 0x14028edcd (157 bytes)\n// \n// 3 xrefs:\n// > SelectFontLayer::init @ 0x14028e9a5\n// > SelectFontLayer::init @ 0x14028ea61\n// > <???> @ 0x1406d18b0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid SelectFontLayer::onChangeFont(SelectFontLayer *a1, cocos2d::CCObject *a2)\n{\n  int m_fontIndex; // ebx\n  int v4; // esi\n  int v5; // esi\n  cocos2d::CCLabelBMFont *m_fontLabel; // rcx\n\n  m_fontIndex = a1->m_editorLayer->m_levelSettings->m_fontIndex;\n  v4 = 1;\n  if ( a2->getTag(a2) != 1 )\n    v4 = -1;\n  v5 = m_fontIndex + v4;\n  if ( v5 < 0 )\n    v5 = 0;\n  if ( v5 > 59 )\n    v5 = 59;\n  if ( v5 != a1->m_font )\n  {\n    m_fontLabel = a1->m_fontLabel;\n    if ( m_fontLabel )\n    {\n      m_fontLabel->removeFromParent(m_fontLabel);\n      a1->m_fontLabel = nullptr;\n    }\n    LevelEditorLayer::updateLevelFont(a1->m_editorLayer, v5);\n    SelectFontLayer::updateFontLabel(a1);\n  }\n}", "assembly": "; \n; SelectFontLayer::onChangeFont from 0x14028ed30 to 0x14028edcd (157 bytes)\n; \n; 3 xrefs:\n; > SelectFontLayer::init @ 0x14028e9a5\n; > SelectFontLayer::init @ 0x14028ea61\n; > <???> @ 0x1406d18b0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14028ed30\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x14028ed35\npush    rdi                                                            ; +0xa, 0x14028ed3a\nsub     rsp, 20h                                                       ; +0xb, 0x14028ed3b\nmov     rax, [rcx+280h]                                                ; +0xf, 0x14028ed3f\nmov     rdi, rcx                                                       ; +0x16, 0x14028ed46\nmov     rcx, rdx                                                       ; +0x19, 0x14028ed49\nmov     r8, [rax+0DB0h]                                                ; +0x1c, 0x14028ed4c\nmov     rax, [rdx]                                                     ; +0x23, 0x14028ed53\nmov     ebx, [r8+168h]                                                 ; +0x26, 0x14028ed56\ncall    qword ptr [rax+38h]                                            ; +0x2d, 0x14028ed5d\nmov     esi, 1                                                         ; +0x30, 0x14028ed60\nmov     ecx, 0FFFFFFFFh                                                ; +0x35, 0x14028ed65\ncmp     eax, esi                                                       ; +0x3a, 0x14028ed6a\nmov     eax, 3Bh ; ';'                                                 ; +0x3c, 0x14028ed6c\ncmovnz  esi, ecx                                                       ; +0x41, 0x14028ed71\nadd     esi, ebx                                                       ; +0x44, 0x14028ed74\nmov     ebx, 0                                                         ; +0x46, 0x14028ed76\ncmovs   esi, ebx                                                       ; +0x4b, 0x14028ed7b\ncmp     esi, eax                                                       ; +0x4e, 0x14028ed7e\ncmovg   esi, eax                                                       ; +0x50, 0x14028ed80\ncmp     esi, [rdi+278h]                                                ; +0x53, 0x14028ed83\njz      short loc_14028EDBD                                            ; +0x59, 0x14028ed89\nmov     rcx, [rdi+288h]                                                ; +0x5b, 0x14028ed8b\ntest    rcx, rcx                                                       ; +0x62, 0x14028ed92\njz      short loc_14028EDA7                                            ; +0x65, 0x14028ed95\nmov     rax, [rcx]                                                     ; +0x67, 0x14028ed97\ncall    qword ptr [rax+1F0h]                                           ; +0x6a, 0x14028ed9a\nmov     [rdi+288h], rbx                                                ; +0x70, 0x14028eda0\nmov     rcx, [rdi+280h]                                                ; +0x77, 0x14028eda7\nmov     edx, esi                                                       ; +0x7e, 0x14028edae\ncall    LevelEditorLayer__updateLevelFont                              ; +0x80, 0x14028edb0\nmov     rcx, rdi                                                       ; +0x85, 0x14028edb5\ncall    SelectFontLayer__updateFontLabel                               ; +0x88, 0x14028edb8\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8d, 0x14028edbd\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x92, 0x14028edc2\nadd     rsp, 20h                                                       ; +0x97, 0x14028edc7\npop     rdi                                                            ; +0x9b, 0x14028edcb\nretn                                                                   ; +0x9c, 0x14028edcc", "xrefs": ["SelectFontLayer::init @ 0x14028e9a5", "SelectFontLayer::init @ 0x14028ea61", "<???> @ 0x1406d18b0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}