{"type": "func", "start": 4742596, "end": 4742748, "name": "EditorUI::showMaxCoinError", "pseudocode": "// \n// EditorUI::showMaxCoinError from 0x485dc4 to 0x485e5c (152 bytes)\n// \n// 1 xrefs:\n// > EditorUI::onCreate @ 0x487860\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:25 +0000\n// \n\nint __fastcall EditorUI::showMaxCoinError(int this, const char *a2)\n{\n  int v2; // r4\n  int v3; // r7\n  cocos2d::CCString *v4; // r0\n  const char *CString; // r8\n  size_t v6; // r0\n  int *v7; // r4\n  int v8[3]; // [sp+8h] [bp-10h] BYREF\n\n  v2 = *(unsigned __int8 *)(this + 464);\n  v3 = this;\n  if ( !*(_BYTE *)(this + 464) )\n  {\n    *(_BYTE *)(this + 464) = 1;\n    v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"You cannot add more than <cy>3</c> <cg>coins</c> in a single level.\",\n                                a2);\n    v8[0] = v2;\n    v8[1] = v2;\n    v8[2] = v2;\n    CString = (const char *)cocos2d::CCString::getCString(v4);\n    v6 = strlen(CString);\n    std::string::__init(v8, CString, v6);\n    v7 = FLAlertLayer::create(\n           v3 + 316,\n           (cocos2d::CCLabelBMFont *)\"Max Coins\",\n           (int)v8,\n           (ButtonSprite *)\"OK\",\n           (ButtonSprite *)v2,\n           300.0);\n    std::string::~string((int)v8);\n    (*(void (__fastcall **)(int *, int))(*v7 + 36))(v7, 122);\n    return (*(int (__fastcall **)(int *))(*v7 + 656))(v7);\n  }\n  return this;\n}", "assembly": "; \n; EditorUI::showMaxCoinError from 0x485dc4 to 0x485e5c (152 bytes)\n; \n; 1 xrefs:\n; > EditorUI::onCreate @ 0x487860\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:25 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x485DCE)                ; +0x0, 0x485dc4\nPUSH.W          {R4-R8,LR}                                             ; +0x2, 0x485dc6\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x485dca\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x485dcc\nLDRB.W          R4, [R0,#0x1D0]                                        ; +0xa, 0x485dce\nSUB             SP, SP, #0x18                                          ; +0xe, 0x485dd2\nLDR             R2, [R3]                                               ; +0x10, 0x485dd4\nMOV             R7, R0                                                 ; +0x12, 0x485dd6\nMOV             R6, R3                                                 ; +0x14, 0x485dd8\nSTR             R2, [SP,#0x18+var_4]                                   ; +0x16, 0x485dda\nCMP             R4, #0                                                 ; +0x18, 0x485ddc\nBNE             loc_485E4A                                             ; +0x1a, 0x485dde\nMOVS            R3, #1                                                 ; +0x1c, 0x485de0\nSTRB.W          R3, [R0,#0x1D0]                                        ; +0x1e, 0x485de2\nLDR             R0, =(aYouCannotAddMo - 0x485DEE); \"You cannot add more than <cy>3</c> <cg>\"... ; +0x22, 0x485de6\nADD             R5, SP, #0x18+var_10                                   ; +0x24, 0x485de8\nADD             R0, PC; \"You cannot add more than <cy>3</c> <cg>\"...   ; +0x26, 0x485dea\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x28, 0x485dec\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x2c, 0x485df0\nSTR             R4, [SP,#0x18+var_10]                                  ; +0x30, 0x485df4\nSTR             R4, [SP,#0x18+var_C]                                   ; +0x32, 0x485df6\nSTR             R4, [SP,#0x18+var_8]                                   ; +0x34, 0x485df8\nMOV             R8, R0                                                 ; +0x36, 0x485dfa\nBLX             strlen                                                 ; +0x38, 0x485dfc\nMOV             R1, R8                                                 ; +0x3c, 0x485e00\nMOV             R2, R0                                                 ; +0x3e, 0x485e02\nMOV             R0, R5                                                 ; +0x40, 0x485e04\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x42, 0x485e06\nLDR             R3, flt_485E5C                                         ; +0x46, 0x485e0a\nLDR             R1, =(aMaxCoins_0 - 0x485E1C); \"Max Coins\"             ; +0x48, 0x485e0c\nADD.W           R0, R7, #0x13C; int                                    ; +0x4a, 0x485e0e\nSTR             R4, [SP,#0x18+var_18]; int                             ; +0x4e, 0x485e12\nMOV             R2, R5; int                                            ; +0x50, 0x485e14\nSTR             R3, [SP,#0x18+var_14]; float                           ; +0x52, 0x485e16\nADD             R1, PC; \"Max Coins\"                                    ; +0x54, 0x485e18\nLDR             R3, =(aOk - 0x485E20); \"OK\"                            ; +0x56, 0x485e1a\nADD             R3, PC; \"OK\"                                           ; +0x58, 0x485e1c\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x5a, 0x485e1e\nMOV             R4, R0                                                 ; +0x5e, 0x485e22\nMOV             R0, R5                                                 ; +0x60, 0x485e24\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x62, 0x485e26\nLDR             R3, [R4]                                               ; +0x66, 0x485e2a\nMOV             R0, R4                                                 ; +0x68, 0x485e2c\nMOVS            R1, #0x7A ; 'z'                                        ; +0x6a, 0x485e2e\nLDR             R3, [R3,#0x24]                                         ; +0x6c, 0x485e30\nBLX             R3                                                     ; +0x6e, 0x485e32\nLDR             R3, [R4]                                               ; +0x70, 0x485e34\nMOV             R0, R4                                                 ; +0x72, 0x485e36\nLDR.W           R3, [R3,#0x290]                                        ; +0x74, 0x485e38\nBLX             R3                                                     ; +0x78, 0x485e3c\nB               loc_485E4A                                             ; +0x7a, 0x485e3e\nMOV             R0, R5                                                 ; +0x7c, 0x485e40\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x7e, 0x485e42\nBL              __cxa_end_cleanup                                      ; +0x82, 0x485e46\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x86, 0x485e4a\nLDR             R3, [R6]                                               ; +0x88, 0x485e4c\nCMP             R2, R3                                                 ; +0x8a, 0x485e4e\nBEQ             loc_485E56                                             ; +0x8c, 0x485e50\nBLX             __stack_chk_fail                                       ; +0x8e, 0x485e52\nADD             SP, SP, #0x18                                          ; +0x92, 0x485e56\nPOP.W           {R4-R8,PC}                                             ; +0x94, 0x485e58", "xrefs": ["EditorUI::onCreate @ 0x487860"], "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"}