{"type": "func", "start": 10637020, "end": 10637164, "name": "CharacterColorPage::offsetForIndex", "pseudocode": "// \n// CharacterColorPage::offsetForIndex from 0xa24edc to 0xa24f6c (144 bytes)\n// \n// 2 xrefs:\n// > CharacterColorPage::createColorMenu @ 0xa251cc\n// > <???> @ 0xaf290\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\ncocos2d::CCPoint CharacterColorPage::offsetForIndex(CharacterColorPage *a1, int a2)\n{\n  cocos2d::CCPoint *v2; // x8\n  float v3; // s1\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  if ( (unsigned int)(a2 - 54) <= 0x51 )\n  {\n    v3 = -0.8;\n  }\n  else\n  {\n    v3 = 0.0;\n    if ( a2 > 135 )\n      v3 = 0.4;\n  }\n  switch ( a2 )\n  {\n    case 4:\n    case 5:\n    case 6:\n    case 7:\n    case 13:\n    case 14:\n    case 15:\n    case 16:\n    case 22:\n    case 23:\n    case 24:\n    case 25:\n    case 31:\n    case 32:\n    case 33:\n    case 34:\n    case 40:\n    case 41:\n    case 42:\n    case 43:\n    case 49:\n    case 50:\n    case 51:\n    case 52:\n    case 58:\n    case 59:\n    case 60:\n    case 61:\n    case 67:\n    case 68:\n    case 69:\n    case 70:\n    case 76:\n    case 77:\n    case 78:\n    case 79:\n    case 85:\n    case 86:\n    case 87:\n    case 88:\n    case 94:\n    case 95:\n    case 96:\n    case 97:\n    case 103:\n    case 104:\n    case 105:\n    case 106:\n    case 112:\n    case 113:\n    case 114:\n    case 115:\n    case 136:\n    case 137:\n    case 138:\n    case 139:\n    case 140:\n    case 141:\n    case 142:\n      cocos2d::CCPoint::CCPoint(v2, 1.0, v3);\n      break;\n    default:\n      cocos2d::CCPoint::CCPoint(v2, 0.0, v3);\n      break;\n  }\n  return result;\n}", "assembly": "; \n; CharacterColorPage::offsetForIndex from 0xa24edc to 0xa24f6c (144 bytes)\n; \n; 2 xrefs:\n; > CharacterColorPage::createColorMenu @ 0xa251cc\n; > <???> @ 0xaf290\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\nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0xa24edc\nSUB             W0, W1, #0x36 ; '6'                                    ; +0x4, 0xa24ee0\nCMP             W0, #0x51 ; 'Q'                                        ; +0x8, 0xa24ee4\nMOV             X29, SP                                                ; +0xc, 0xa24ee8\nB.LS            loc_A24F64                                             ; +0x10, 0xa24eec\nCMP             W1, #0x87                                              ; +0x14, 0xa24ef0\nFMOV            S1, WZR                                                ; +0x18, 0xa24ef4\nB.LE            loc_A24F00                                             ; +0x1c, 0xa24ef8\nLDR             S1, flt_A24F70; float                                  ; +0x20, 0xa24efc\nSUB             W1, W1, #4; switch 139 cases                           ; +0x24, 0xa24f00\nCMP             W1, #0x8A                                              ; +0x28, 0xa24f04\nB.LS            loc_A24F2C                                             ; +0x2c, 0xa24f08\nFMOV            S0, WZR; jumptable 0000000000A24F40 default case, cases 8-12,17-21,26-30,35-39,44-48,53-57,62-66,71-75,80-84,89-93,98-102,107-111,116-135 ; +0x30, 0xa24f0c\nMOV             X0, X8; this                                           ; +0x34, 0xa24f10\nSTR             X8, [X29,#0x20+var_8]                                  ; +0x38, 0xa24f14\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x3c, 0xa24f18\nLDR             X8, [X29,#0x20+var_8]                                  ; +0x40, 0xa24f1c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x44, 0xa24f20\nMOV             X0, X8                                                 ; +0x48, 0xa24f24\nRET                                                                    ; +0x4c, 0xa24f28\nADRL            X0, jpt_A24F40                                         ; +0x50, 0xa24f2c\nLDRB            W0, [X0,W1,UXTW]                                       ; +0x58, 0xa24f34\nADR             X1, loc_A24F44; jumptable 0000000000A24F40 cases 4-7,13-16,22-25,31-34,40-43,49-52,58-61,67-70,76-79,85-88,94-97,103-106,112-115,136-142 ; +0x5c, 0xa24f38\nADD             X0, X1, W0,SXTB#2                                      ; +0x60, 0xa24f3c\nBR              X0; switch jump                                        ; +0x64, 0xa24f40\nMOV             X0, X8; jumptable 0000000000A24F40 cases 4-7,13-16,22-25,31-34,40-43,49-52,58-61,67-70,76-79,85-88,94-97,103-106,112-115,136-142 ; +0x68, 0xa24f44\nSTR             X8, [X29,#0x20+var_8]                                  ; +0x6c, 0xa24f48\nFMOV            S0, #1.0; float                                        ; +0x70, 0xa24f4c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x74, 0xa24f50\nLDR             X8, [X29,#0x20+var_8]                                  ; +0x78, 0xa24f54\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x7c, 0xa24f58\nMOV             X0, X8                                                 ; +0x80, 0xa24f5c\nRET                                                                    ; +0x84, 0xa24f60\nLDR             S1, =0xBF4CCCCD                                        ; +0x88, 0xa24f64\nB               loc_A24F00                                             ; +0x8c, 0xa24f68", "xrefs": ["CharacterColorPage::createColorMenu @ 0xa251cc", "<???> @ 0xaf290"], "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"}