{"type": "func", "start": 5656780, "end": 5656922, "name": "CharacterColorPage::offsetForIndex", "pseudocode": "// \n// CharacterColorPage::offsetForIndex from 0x5650cc to 0x56515a (142 bytes)\n// \n// 1 xrefs:\n// > CharacterColorPage::createColorMenu @ 0x5652ec\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(\n        cocos2d::CCPoint *__return_ptr retstr,\n        CharacterColorPage *a2,\n        int a3)\n{\n  float v5; // r2\n  unsigned int v6; // r3\n  bool v7; // cc\n  float v8; // r1\n\n  if ( (unsigned int)(a3 - 54) <= 0x51 )\n  {\n    v5 = -0.8;\n  }\n  else if ( a3 > 135 )\n  {\n    v5 = 0.4;\n  }\n  else\n  {\n    v5 = 0.0;\n  }\n  if ( a3 > 61 )\n  {\n    if ( a3 > 97 )\n    {\n      if ( a3 > 115 )\n      {\n        v7 = (unsigned int)(a3 - 136) > 6;\nLABEL_28:\n        if ( !v7 )\n          goto LABEL_29;\nLABEL_30:\n        v8 = 0.0;\n        goto LABEL_31;\n      }\n      if ( a3 < 112 )\n      {\n        v6 = a3 - 103;\n        goto LABEL_16;\n      }\n    }\n    else if ( a3 < 94 )\n    {\n      if ( a3 > 79 )\n      {\n        v6 = a3 - 85;\n        goto LABEL_16;\n      }\n      if ( a3 < 76 )\n      {\n        v6 = a3 - 67;\n        goto LABEL_16;\n      }\n    }\n  }\n  else if ( a3 < 58 )\n  {\n    if ( a3 > 25 )\n    {\n      if ( a3 > 43 )\n      {\n        v6 = a3 - 49;\n        goto LABEL_16;\n      }\n      if ( a3 < 40 )\n      {\n        v6 = a3 - 31;\n        goto LABEL_16;\n      }\n    }\n    else if ( a3 < 22 )\n    {\n      if ( a3 < 4 )\n        goto LABEL_30;\n      if ( a3 > 7 )\n      {\n        v6 = a3 - 13;\nLABEL_16:\n        v7 = v6 > 3;\n        goto LABEL_28;\n      }\n    }\n  }\nLABEL_29:\n  v8 = 1.0;\nLABEL_31:\n  cocos2d::CCPoint::CCPoint(retstr, v8, v5);\n  return retstr;\n}", "assembly": "; \n; CharacterColorPage::offsetForIndex from 0x5650cc to 0x56515a (142 bytes)\n; \n; 1 xrefs:\n; > CharacterColorPage::createColorMenu @ 0x5652ec\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             R3, R2                                                 ; +0x0, 0x5650cc\nSUBS            R2, #0x36 ; '6'                                        ; +0x2, 0x5650ce\nCMP             R2, #0x51 ; 'Q'                                        ; +0x4, 0x5650d0\nPUSH            {R4,LR}                                                ; +0x6, 0x5650d2\nMOV             R4, R0                                                 ; +0x8, 0x5650d4\nBLS             loc_5650EE                                             ; +0xa, 0x5650d6\nVLDR            S14, =0.0                                              ; +0xc, 0x5650d8\nCMP             R3, #0x87                                              ; +0x10, 0x5650dc\nVLDR            S15, =0.4                                              ; +0x12, 0x5650de\nITE LE                                                                 ; +0x16, 0x5650e2\nVMOVLE          R2, S14                                                ; +0x18, 0x5650e4\nVMOVGT          R2, S15                                                ; +0x1c, 0x5650e8\nB               loc_5650F0                                             ; +0x20, 0x5650ec\nLDR             R2, flt_565164; float                                  ; +0x22, 0x5650ee\nCMP             R3, #0x3D ; '='                                        ; +0x24, 0x5650f0\nBGT             loc_56511E                                             ; +0x26, 0x5650f2\nCMP             R3, #0x3A ; ':'                                        ; +0x28, 0x5650f4\nBGE             loc_565148                                             ; +0x2a, 0x5650f6\nCMP             R3, #0x19                                              ; +0x2c, 0x5650f8\nBGT             loc_56510C                                             ; +0x2e, 0x5650fa\nCMP             R3, #0x16                                              ; +0x30, 0x5650fc\nBGE             loc_565148                                             ; +0x32, 0x5650fe\nCMP             R3, #4                                                 ; +0x34, 0x565100\nBLT             loc_56514E                                             ; +0x36, 0x565102\nCMP             R3, #7                                                 ; +0x38, 0x565104\nBLE             loc_565148                                             ; +0x3a, 0x565106\nSUBS            R3, #0xD                                               ; +0x3c, 0x565108\nB               loc_565116                                             ; +0x3e, 0x56510a\nCMP             R3, #0x2B ; '+'                                        ; +0x40, 0x56510c\nBGT             loc_56511A                                             ; +0x42, 0x56510e\nCMP             R3, #0x28 ; '('                                        ; +0x44, 0x565110\nBGE             loc_565148                                             ; +0x46, 0x565112\nSUBS            R3, #0x1F                                              ; +0x48, 0x565114\nCMP             R3, #3                                                 ; +0x4a, 0x565116\nB               loc_565146                                             ; +0x4c, 0x565118\nSUBS            R3, #0x31 ; '1'                                        ; +0x4e, 0x56511a\nB               loc_565116                                             ; +0x50, 0x56511c\nCMP             R3, #0x61 ; 'a'                                        ; +0x52, 0x56511e\nBGT             loc_565136                                             ; +0x54, 0x565120\nCMP             R3, #0x5E ; '^'                                        ; +0x56, 0x565122\nBGE             loc_565148                                             ; +0x58, 0x565124\nCMP             R3, #0x4F ; 'O'                                        ; +0x5a, 0x565126\nBGT             loc_565132                                             ; +0x5c, 0x565128\nCMP             R3, #0x4C ; 'L'                                        ; +0x5e, 0x56512a\nBGE             loc_565148                                             ; +0x60, 0x56512c\nSUBS            R3, #0x43 ; 'C'                                        ; +0x62, 0x56512e\nB               loc_565116                                             ; +0x64, 0x565130\nSUBS            R3, #0x55 ; 'U'                                        ; +0x66, 0x565132\nB               loc_565116                                             ; +0x68, 0x565134\nCMP             R3, #0x73 ; 's'                                        ; +0x6a, 0x565136\nBGT             loc_565142                                             ; +0x6c, 0x565138\nCMP             R3, #0x70 ; 'p'                                        ; +0x6e, 0x56513a\nBGE             loc_565148                                             ; +0x70, 0x56513c\nSUBS            R3, #0x67 ; 'g'                                        ; +0x72, 0x56513e\nB               loc_565116                                             ; +0x74, 0x565140\nSUBS            R3, #0x88                                              ; +0x76, 0x565142\nCMP             R3, #6                                                 ; +0x78, 0x565144\nBHI             loc_56514E                                             ; +0x7a, 0x565146\nMOV.W           R1, #0x3F800000                                        ; +0x7c, 0x565148\nB               loc_565150                                             ; +0x80, 0x56514c\nMOVS            R1, #0; float                                          ; +0x82, 0x56514e\nMOV             R0, R4; this                                           ; +0x84, 0x565150\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x86, 0x565152\nMOV             R0, R4                                                 ; +0x8a, 0x565156\nPOP             {R4,PC}                                                ; +0x8c, 0x565158", "xrefs": ["CharacterColorPage::createColorMenu @ 0x5652ec"], "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"}