{"type": "func", "start": 7299116, "end": 7299440, "name": "EditorUI::menuItemFromObjectString", "pseudocode": "// \n// EditorUI::menuItemFromObjectString from 0x6f602c to 0x6f6170 (324 bytes)\n// \n// 1 xrefs:\n// > EditorUI::createCustomItems @ 0x6f6670\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:57:39 +0000\n// \n\ncocos2d::CCObject *__fastcall EditorUI::menuItemFromObjectString(int a1, int a2, int a3)\n{\n  ButtonSprite *v4; // r4\n  float v5; // s16\n  int v6; // r0\n  int (__fastcall *v7)(ButtonSprite *); // r3\n  float v8; // s15\n  ButtonSprite *v9; // r0\n  int v10; // r11\n  int v11; // r8\n  cocos2d::CCObject *v12; // r0\n  cocos2d::CCObject *v13; // r4\n  float v15; // [sp+14h] [bp-30h]\n  void (__fastcall *v17)(ButtonSprite *, _DWORD *); // [sp+1Ch] [bp-28h]\n  _BYTE v18[8]; // [sp+20h] [bp-24h] BYREF\n  _DWORD v19[2]; // [sp+28h] [bp-1Ch] BYREF\n  int v20[3]; // [sp+30h] [bp-14h] BYREF\n\n  std::string::basic_string(v20, a2);\n  v4 = EditorUI::spriteFromObjectString((int *)a1, (unsigned __int8 *)v20, 1, 0, 100, nullptr, nullptr, 0);\n  std::string::~string((int)v20);\n  v5 = *(float *)(*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 164))(v4);\n  v6 = (*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 164))(v4);\n  v7 = *(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 164);\n  if ( v5 <= *(float *)(v6 + 4) )\n    v8 = *(float *)(v7(v4) + 4);\n  else\n    v8 = *(float *)v7(v4);\n  (*(void (__fastcall **)(ButtonSprite *, _DWORD))(*(_DWORD *)v4 + 80))(v4, 40.0 / v8);\n  v9 = ButtonSprite::create(v4, (cocos2d::CCSprite *)&dword_20, 0, 32.0, 1.0, 1, \"GJ_button_04.png\", nullptr, 0.0, v15);\n  v17 = *(void (__fastcall **)(ButtonSprite *, _DWORD *))(*(_DWORD *)v4 + 92);\n  v10 = (int)v9;\n  v11 = (*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v4 + 96))(v4);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, -1.0);\n  cocos2d::CCPoint::operator+(v19, v11, v18);\n  v17(v4, v19);\n  v19[0] = EditorUI::onCreateButton;\n  v19[1] = 0;\n  v12 = (cocos2d::CCObject *)CreateMenuItem::create(v10, 0, a1, (int)EditorUI::onCreateButton, 0);\n  *((_DWORD *)v12 + 101) = a3;\n  v13 = v12;\n  (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v12 + 80))(v12, 1063675494);\n  *((_DWORD *)v13 + 79) = 1063675494;\n  cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 900), v13);\n  return v13;\n}", "assembly": "; \n; EditorUI::menuItemFromObjectString from 0x6f602c to 0x6f6170 (324 bytes)\n; \n; 1 xrefs:\n; > EditorUI::createCustomItems @ 0x6f6670\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:57:39 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x6f602c\nMOV             R7, R0                                                 ; +0x4, 0x6f6030\nVPUSH           {D8}                                                   ; +0x6, 0x6f6032\nLDR             R5, =(__stack_chk_guard_ptr - 0x6F603C)                ; +0xa, 0x6f6036\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xc, 0x6f6038\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xe, 0x6f603a\nSUB             SP, SP, #0x44                                          ; +0x10, 0x6f603c\nLDR             R3, [R5]                                               ; +0x12, 0x6f603e\nADD             R6, SP, #0x44+var_14                                   ; +0x14, 0x6f6040\nSTR             R2, [SP,#0x44+var_2C]                                  ; +0x16, 0x6f6042\nMOV             R0, R6                                                 ; +0x18, 0x6f6044\nSTR             R3, [SP,#0x44+var_8]                                   ; +0x1a, 0x6f6046\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x1c, 0x6f6048\nMOVS            R3, #0x64 ; 'd'                                        ; +0x20, 0x6f604c\nMOV             R0, R7                                                 ; +0x22, 0x6f604e\nSTR             R3, [SP,#0x44+var_44]                                  ; +0x24, 0x6f6050\nMOV             R1, R6                                                 ; +0x26, 0x6f6052\nMOVS            R3, #0                                                 ; +0x28, 0x6f6054\nMOVS            R2, #1                                                 ; +0x2a, 0x6f6056\nSTR             R3, [SP,#0x44+var_40]                                  ; +0x2c, 0x6f6058\nSTR             R3, [SP,#0x44+var_3C]                                  ; +0x2e, 0x6f605a\nSTR             R3, [SP,#0x44+var_38]                                  ; +0x30, 0x6f605c\nBL              _ZN8EditorUI22spriteFromObjectStringENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEbbiPN7cocos2d7CCArrayES9_P10GameObject; EditorUI::spriteFromObjectString(std::string,bool,bool,int,cocos2d::CCArray *,cocos2d::CCArray *,GameObject *) ; +0x32, 0x6f605e\nMOV             R4, R0                                                 ; +0x36, 0x6f6062\nMOV             R0, R6                                                 ; +0x38, 0x6f6064\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x3a, 0x6f6066\nLDR             R3, [R4]                                               ; +0x3e, 0x6f606a\nMOV             R0, R4                                                 ; +0x40, 0x6f606c\nLDR.W           R3, [R3,#0xA4]                                         ; +0x42, 0x6f606e\nBLX             R3                                                     ; +0x46, 0x6f6072\nLDR             R3, [R4]                                               ; +0x48, 0x6f6074\nLDR.W           R3, [R3,#0xA4]                                         ; +0x4a, 0x6f6076\nVLDR            S16, [R0]                                              ; +0x4e, 0x6f607a\nMOV             R0, R4                                                 ; +0x52, 0x6f607e\nBLX             R3                                                     ; +0x54, 0x6f6080\nLDR             R3, [R4]                                               ; +0x56, 0x6f6082\nLDR.W           R3, [R3,#0xA4]                                         ; +0x58, 0x6f6084\nVLDR            S15, [R0,#4]                                           ; +0x5c, 0x6f6088\nMOV             R0, R4                                                 ; +0x60, 0x6f608c\nVCMPE.F32       S16, S15                                               ; +0x62, 0x6f608e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x66, 0x6f6092\nBLE             loc_6F60A0                                             ; +0x6a, 0x6f6096\nBLX             R3                                                     ; +0x6c, 0x6f6098\nVLDR            S15, [R0]                                              ; +0x6e, 0x6f609a\nB               loc_6F60A6                                             ; +0x72, 0x6f609e\nBLX             R3                                                     ; +0x74, 0x6f60a0\nVLDR            S15, [R0,#4]                                           ; +0x76, 0x6f60a2\nLDR             R3, [R4]                                               ; +0x7a, 0x6f60a6\nMOV             R0, R4                                                 ; +0x7c, 0x6f60a8\nMOVS            R6, #0                                                 ; +0x7e, 0x6f60aa\nMOV.W           R10, #0                                                ; +0x80, 0x6f60ac\nVLDR            S14, =40.0                                             ; +0x84, 0x6f60b0\nADD.W           R9, SP, #0x44+var_24                                   ; +0x88, 0x6f60b4\nLDR             R3, [R3,#0x50]                                         ; +0x8c, 0x6f60b8\nVDIV.F32        S15, S14, S15                                          ; +0x8e, 0x6f60ba\nVMOV            R1, S15                                                ; +0x92, 0x6f60be\nBLX             R3                                                     ; +0x96, 0x6f60c2\nMOV.W           R3, #0x3F800000                                        ; +0x98, 0x6f60c4\nSTR             R3, [SP,#0x44+var_44]; float                           ; +0x9c, 0x6f60c8\nMOVS            R3, #1                                                 ; +0x9e, 0x6f60ca\nSTR             R3, [SP,#0x44+var_40]; float                           ; +0xa0, 0x6f60cc\nMOVS            R1, #dword_20; cocos2d::CCSprite *                     ; +0xa2, 0x6f60ce\nLDR             R3, =(aGjButton04Png - 0x6F60DC); \"GJ_button_04.png\"   ; +0xa4, 0x6f60d0\nMOV             R2, R6; int                                            ; +0xa6, 0x6f60d2\nSTR             R6, [SP,#0x44+var_38]; char *                          ; +0xa8, 0x6f60d4\nMOV             R0, R4; this                                           ; +0xaa, 0x6f60d6\nADD             R3, PC; \"GJ_button_04.png\"                             ; +0xac, 0x6f60d8\nSTR.W           R10, [SP,#0x44+var_34]; float                          ; +0xae, 0x6f60da\nSTR             R3, [SP,#0x44+var_3C]; char *                          ; +0xb2, 0x6f60de\nMOV.W           R3, #0x42000000; int                                   ; +0xb4, 0x6f60e0\nBL              _ZN12ButtonSprite6createEPN7cocos2d8CCSpriteEiiffbPKcbf; ButtonSprite::create(cocos2d::CCSprite *,int,int,float,float,bool,char const*,bool,float) ; +0xb8, 0x6f60e4\nLDR             R2, [R4]                                               ; +0xbc, 0x6f60e8\nLDR             R3, [R2,#0x5C]                                         ; +0xbe, 0x6f60ea\nLDR             R2, [R2,#0x60]                                         ; +0xc0, 0x6f60ec\nSTR             R3, [SP,#0x44+var_28]                                  ; +0xc2, 0x6f60ee\nMOV             R11, R0                                                ; +0xc4, 0x6f60f0\nMOV             R0, R4                                                 ; +0xc6, 0x6f60f2\nBLX             R2                                                     ; +0xc8, 0x6f60f4\nMOV             R1, R10; float                                         ; +0xca, 0x6f60f6\nADD.W           R10, SP, #0x44+var_1C                                  ; +0xcc, 0x6f60f8\nLDR             R2, flt_6F6174; float                                  ; +0xd0, 0x6f60fc\nMOV             R8, R0                                                 ; +0xd2, 0x6f60fe\nMOV             R0, R9; this                                           ; +0xd4, 0x6f6100\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xd6, 0x6f6102\nMOV             R2, R9                                                 ; +0xda, 0x6f6106\nMOV             R0, R10                                                ; +0xdc, 0x6f6108\nMOV             R1, R8                                                 ; +0xde, 0x6f610a\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xe0, 0x6f610c\nMOV             R0, R4                                                 ; +0xe4, 0x6f6110\nMOV             R1, R10                                                ; +0xe6, 0x6f6112\nLDR             R3, [SP,#0x44+var_28]                                  ; +0xe8, 0x6f6114\nBLX             R3                                                     ; +0xea, 0x6f6116\nLDR             R3, =(_ZN8EditorUI14onCreateButtonEPN7cocos2d8CCObjectE_ptr - 0x6F6122) ; +0xec, 0x6f6118\nMOV             R2, R7                                                 ; +0xee, 0x6f611a\nMOV             R1, R6                                                 ; +0xf0, 0x6f611c\nADD             R3, PC; _ZN8EditorUI14onCreateButtonEPN7cocos2d8CCObjectE_ptr ; +0xf2, 0x6f611e\nLDR             R3, [R3]; EditorUI::onCreateButton(cocos2d::CCObject *) ; +0xf4, 0x6f6120\nSTR             R6, [SP,#0x44+var_44]                                  ; +0xf6, 0x6f6122\nMOV             R0, R11                                                ; +0xf8, 0x6f6124\nSTR             R3, [SP,#0x44+var_1C]                                  ; +0xfa, 0x6f6126\nSTR             R6, [SP,#0x44+var_18]                                  ; +0xfc, 0x6f6128\nBL              _ZN14CreateMenuItem6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CreateMenuItem::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0xfe, 0x6f612a\nLDR             R3, [SP,#0x44+var_2C]                                  ; +0x102, 0x6f612e\nLDR             R6, =0x3F666666                                        ; +0x104, 0x6f6130\nMOV             R1, R6                                                 ; +0x106, 0x6f6132\nSTR.W           R3, [R0,#0x194]                                        ; +0x108, 0x6f6134\nMOV             R4, R0                                                 ; +0x10c, 0x6f6138\nLDR             R3, [R0]                                               ; +0x10e, 0x6f613a\nLDR             R3, [R3,#0x50]                                         ; +0x110, 0x6f613c\nBLX             R3                                                     ; +0x112, 0x6f613e\nSTR.W           R6, [R4,#0x13C]                                        ; +0x114, 0x6f6140\nLDR.W           R0, [R7,#0x384]; this                                  ; +0x118, 0x6f6144\nMOV             R1, R4; cocos2d::CCObject *                            ; +0x11c, 0x6f6148\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x11e, 0x6f614a\nLDR             R2, [SP,#0x44+var_8]                                   ; +0x122, 0x6f614e\nLDR             R3, [R5]                                               ; +0x124, 0x6f6150\nMOV             R0, R4                                                 ; +0x126, 0x6f6152\nCMP             R2, R3                                                 ; +0x128, 0x6f6154\nBEQ             loc_6F6166                                             ; +0x12a, 0x6f6156\nBLX             __stack_chk_fail                                       ; +0x12c, 0x6f6158\nMOV             R0, R6                                                 ; +0x130, 0x6f615c\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x132, 0x6f615e\nBL              __cxa_end_cleanup                                      ; +0x136, 0x6f6162\nADD             SP, SP, #0x44 ; 'D'                                    ; +0x13a, 0x6f6166\nVPOP            {D8}                                                   ; +0x13c, 0x6f6168\nPOP.W           {R4-R11,PC}                                            ; +0x140, 0x6f616c", "xrefs": ["EditorUI::createCustomItems @ 0x6f6670"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}