{"type": "func", "start": 11868464, "end": 11868608, "name": "CharacterColorPage::offsetForIndex", "pseudocode": "// \n// CharacterColorPage::offsetForIndex from 0xb51930 to 0xb519c0 (144 bytes)\n// \n// 2 xrefs:\n// > CharacterColorPage::createColorMenu @ 0xb52230\n// > <???> @ 0xe5378\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:01:59 +0000\n// \n\ncocos2d::CCPoint *__usercall CharacterColorPage::offsetForIndex@<X0>(int a1@<W1>, cocos2d::CCPoint *a2@<X8>)\n{\n  float v3; // s1\n  cocos2d::CCPoint *result; // x0\n\n  if ( (unsigned int)(a1 - 54) <= 0x51 )\n  {\n    v3 = -0.8;\n  }\n  else\n  {\n    v3 = 0.0;\n    if ( a1 > 135 )\n      v3 = 0.4;\n  }\n  switch ( a1 )\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(a2, 1.0, v3);\n      result = a2;\n      break;\n    default:\n      cocos2d::CCPoint::CCPoint(a2, 0.0, v3);\n      result = a2;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; CharacterColorPage::offsetForIndex from 0xb51930 to 0xb519c0 (144 bytes)\n; \n; 2 xrefs:\n; > CharacterColorPage::createColorMenu @ 0xb52230\n; > <???> @ 0xe5378\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:01:59 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0xb51930\nSUB             W0, W1, #0x36 ; '6'                                    ; +0x4, 0xb51934\nCMP             W0, #0x51 ; 'Q'                                        ; +0x8, 0xb51938\nMOV             X29, SP                                                ; +0xc, 0xb5193c\nB.LS            loc_B519B8                                             ; +0x10, 0xb51940\nCMP             W1, #0x87                                              ; +0x14, 0xb51944\nFMOV            S1, WZR                                                ; +0x18, 0xb51948\nB.LE            loc_B51954                                             ; +0x1c, 0xb5194c\nLDR             S1, flt_B519C4; float                                  ; +0x20, 0xb51950\nSUB             W1, W1, #4; switch 139 cases                           ; +0x24, 0xb51954\nCMP             W1, #0x8A                                              ; +0x28, 0xb51958\nB.LS            loc_B51980                                             ; +0x2c, 0xb5195c\nFMOV            S0, WZR; jumptable 0000000000B51994 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, 0xb51960\nMOV             X0, X8; this                                           ; +0x34, 0xb51964\nSTR             X8, [X29,#0x20+var_8]                                  ; +0x38, 0xb51968\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x3c, 0xb5196c\nLDR             X8, [X29,#0x20+var_8]                                  ; +0x40, 0xb51970\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x44, 0xb51974\nMOV             X0, X8                                                 ; +0x48, 0xb51978\nRET                                                                    ; +0x4c, 0xb5197c\nADRL            X0, jpt_B51994                                         ; +0x50, 0xb51980\nLDRB            W0, [X0,W1,UXTW]                                       ; +0x58, 0xb51988\nADR             X1, loc_B51998; jumptable 0000000000B51994 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, 0xb5198c\nADD             X0, X1, W0,SXTB#2                                      ; +0x60, 0xb51990\nBR              X0; switch jump                                        ; +0x64, 0xb51994\nMOV             X0, X8; jumptable 0000000000B51994 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, 0xb51998\nSTR             X8, [X29,#0x20+var_8]                                  ; +0x6c, 0xb5199c\nFMOV            S0, #1.0; float                                        ; +0x70, 0xb519a0\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x74, 0xb519a4\nLDR             X8, [X29,#0x20+var_8]                                  ; +0x78, 0xb519a8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x7c, 0xb519ac\nMOV             X0, X8                                                 ; +0x80, 0xb519b0\nRET                                                                    ; +0x84, 0xb519b4\nLDR             S1, =0xBF4CCCCD                                        ; +0x88, 0xb519b8\nB               loc_B51954                                             ; +0x8c, 0xb519bc", "xrefs": ["CharacterColorPage::createColorMenu @ 0xb52230", "<???> @ 0xe5378"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}