{"type": "func", "start": 4724396, "end": 4724556, "name": "EditorUI::getSimpleButton", "pseudocode": "// \n// EditorUI::getSimpleButton from 0x4816ac to 0x48174c (160 bytes)\n// \n// 0 xrefs:\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:49:22 +0000\n// \n\nint __fastcall EditorUI::getSimpleButton(int a1, int a2, int a3, int a4, int a5)\n{\n  cocos2d::CCSprite *v6; // r0\n  int v7; // r4\n  void (__fastcall *v8)(int, _DWORD); // r7\n  float v9; // s17\n  int v10; // r0\n  int (__fastcall *v11)(int); // r3\n  float v12; // s15\n  int v13; // r4\n\n  if ( (*(_BYTE *)a2 & 1) != 0 )\n    v6 = *(cocos2d::CCSprite **)(a2 + 8);\n  else\n    v6 = (cocos2d::CCSprite *)(a2 + 1);\n  v7 = cocos2d::CCSprite::createWithSpriteFrameName(v6, (const char *)a2);\n  v8 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v7 + 80);\n  v9 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7);\n  v10 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7);\n  v11 = *(int (__fastcall **)(int))(*(_DWORD *)v7 + 164);\n  if ( (float)(18.0 / v9) <= (float)(18.0 / *(float *)(v10 + 4)) )\n    v12 = *(float *)v11(v7);\n  else\n    v12 = *(float *)(v11(v7) + 4);\n  v8(v7, 18.0 / v12);\n  v13 = CCMenuItemSpriteExtra::create(v7, 0, a1, a3, a4);\n  if ( a5 )\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)a5 + 228))(a5, v13);\n  return v13;\n}", "assembly": "; \n; EditorUI::getSimpleButton from 0x4816ac to 0x48174c (160 bytes)\n; \n; 0 xrefs:\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:49:22 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x4816ac\nMOV             R6, R0                                                 ; +0x2, 0x4816ae\nVPUSH           {D8}                                                   ; +0x4, 0x4816b0\nVMOV.F32        S16, #18.0                                             ; +0x8, 0x4816b4\nSUB             SP, SP, #0x14                                          ; +0xc, 0x4816b8\nADD             R0, SP, #0x14+var_4                                    ; +0xe, 0x4816ba\nLDR             R5, [SP,#0x14+arg_0]                                   ; +0x10, 0x4816bc\nSTMDB.W         R0, {R2,R3}                                            ; +0x12, 0x4816be\nLDRB            R3, [R1]                                               ; +0x16, 0x4816c2\nLSLS            R3, R3, #0x1F                                          ; +0x18, 0x4816c4\nITE PL                                                                 ; +0x1a, 0x4816c6\nADDPL           R0, R1, #1                                             ; +0x1c, 0x4816c8\nLDRMI           R0, [R1,#8]; this                                      ; +0x1e, 0x4816ca\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x20, 0x4816cc\nLDR             R3, [R0]                                               ; +0x24, 0x4816d0\nMOV             R4, R0                                                 ; +0x26, 0x4816d2\nLDR             R7, [R3,#0x50]                                         ; +0x28, 0x4816d4\nLDR.W           R3, [R3,#0xA4]                                         ; +0x2a, 0x4816d6\nBLX             R3                                                     ; +0x2e, 0x4816da\nLDR             R3, [R4]                                               ; +0x30, 0x4816dc\nLDR.W           R3, [R3,#0xA4]                                         ; +0x32, 0x4816de\nVLDR            S17, [R0]                                              ; +0x36, 0x4816e2\nMOV             R0, R4                                                 ; +0x3a, 0x4816e6\nBLX             R3                                                     ; +0x3c, 0x4816e8\nLDR             R3, [R4]                                               ; +0x3e, 0x4816ea\nVDIV.F32        S17, S16, S17                                          ; +0x40, 0x4816ec\nLDR.W           R3, [R3,#0xA4]                                         ; +0x44, 0x4816f0\nVLDR            S15, [R0,#4]                                           ; +0x48, 0x4816f4\nMOV             R0, R4                                                 ; +0x4c, 0x4816f8\nVDIV.F32        S15, S16, S15                                          ; +0x4e, 0x4816fa\nVCMPE.F32       S17, S15                                               ; +0x52, 0x4816fe\nVMRS            APSR_nzcv, FPSCR                                       ; +0x56, 0x481702\nBLE             loc_481710                                             ; +0x5a, 0x481706\nBLX             R3                                                     ; +0x5c, 0x481708\nVLDR            S15, [R0,#4]                                           ; +0x5e, 0x48170a\nB               loc_481716                                             ; +0x62, 0x48170e\nBLX             R3                                                     ; +0x64, 0x481710\nVLDR            S15, [R0]                                              ; +0x66, 0x481712\nMOV             R0, R4                                                 ; +0x6a, 0x481716\nVDIV.F32        S16, S16, S15                                          ; +0x6c, 0x481718\nVMOV            R1, S16                                                ; +0x70, 0x48171c\nBLX             R7                                                     ; +0x74, 0x481720\nLDR             R3, [SP,#0x14+var_8]                                   ; +0x76, 0x481722\nMOV             R0, R4                                                 ; +0x78, 0x481724\nMOVS            R1, #0                                                 ; +0x7a, 0x481726\nMOV             R2, R6                                                 ; +0x7c, 0x481728\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x7e, 0x48172a\nLDR             R3, [SP,#0x14+var_C]                                   ; +0x80, 0x48172c\nBL              _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x82, 0x48172e\nMOV             R4, R0                                                 ; +0x86, 0x481732\nCBZ             R5, loc_481742                                         ; +0x88, 0x481734\nLDR             R3, [R5]                                               ; +0x8a, 0x481736\nMOV             R0, R5                                                 ; +0x8c, 0x481738\nMOV             R1, R4                                                 ; +0x8e, 0x48173a\nLDR.W           R3, [R3,#0xE4]                                         ; +0x90, 0x48173c\nBLX             R3                                                     ; +0x94, 0x481740\nMOV             R0, R4                                                 ; +0x96, 0x481742\nADD             SP, SP, #0x14                                          ; +0x98, 0x481744\nVPOP            {D8}                                                   ; +0x9a, 0x481746\nPOP             {R4-R7,PC}                                             ; +0x9e, 0x48174a", "xrefs": [], "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"}