{"type": "func", "start": 5048420, "end": 5048548, "name": "CurrencyRewardLayer::incrementDiamondsCount", "pseudocode": "// \n// CurrencyRewardLayer::incrementDiamondsCount from 0x4d0864 to 0x4d08e4 (128 bytes)\n// \n// 1 xrefs:\n// > CurrencyRewardLayer::update @ 0x4d0d34\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\nvoid CurrencyRewardLayer::incrementDiamondsCount(CurrencyRewardLayer *a1, int a2)\n{\n  int m_diamonds; // r1\n  cocos2d::CCLabelBMFont *m_diamondsLabel; // r5\n  void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r7\n  int v6; // r0\n  unsigned int v7[3]; // [sp+4h] [bp-208h] BYREF\n  char v8; // [sp+10h] [bp-1FCh] BYREF\n\n  if ( a1->m_diamondsLabel )\n  {\n    a1->m_diamonds += a2;\n    CurrencyRewardLayer::pulseSprite(a1, a1->m_diamondsSprite);\n    m_diamonds = a1->m_diamonds;\n    v7[0] = 0;\n    v7[1] = 500;\n    v7[2] = (unsigned int)&v8;\n    fmt::BasicWriter<char>::operator<<(v7, m_diamonds);\n    m_diamondsLabel = a1->m_diamondsLabel;\n    setString = m_diamondsLabel->setString;\n    v6 = fmt::BasicWriter<char>::c_str((int *)v7);\n    setString(m_diamondsLabel, (const unsigned __int8 *)v6);\n    fmt::internal::Array<char,500u>::free((int)v7);\n  }\n}", "assembly": "; \n; CurrencyRewardLayer::incrementDiamondsCount from 0x4d0864 to 0x4d08e4 (128 bytes)\n; \n; 1 xrefs:\n; > CurrencyRewardLayer::update @ 0x4d0d34\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x4D086C)                ; +0x0, 0x4d0864\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x4d0866\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x4d0868\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x4d086a\nSUB.W           SP, SP, #0x20C                                         ; +0x8, 0x4d086c\nMOV             R5, R0                                                 ; +0xc, 0x4d0870\nLDR             R2, [R3]                                               ; +0xe, 0x4d0872\nMOV             R6, R3                                                 ; +0x10, 0x4d0874\nSTR             R2, [SP,#0x20C+var_8]                                  ; +0x12, 0x4d0876\nLDR.W           R2, [R0,#0x150]                                        ; +0x14, 0x4d0878\nCBZ             R2, loc_4D08D2                                         ; +0x18, 0x4d087c\nLDR.W           R3, [R0,#0x188]                                        ; +0x1a, 0x4d087e\nADD             R4, SP, #0x20C+var_208                                 ; +0x1e, 0x4d0882\nADD             R1, R3                                                 ; +0x20, 0x4d0884\nSTR.W           R1, [R0,#0x188]                                        ; +0x22, 0x4d0886\nLDR.W           R1, [R0,#0x168]; cocos2d::CCSprite *                   ; +0x26, 0x4d088a\nBL              _ZN19CurrencyRewardLayer11pulseSpriteEPN7cocos2d8CCSpriteE; CurrencyRewardLayer::pulseSprite(cocos2d::CCSprite *) ; +0x2a, 0x4d088e\nMOV             R0, R4                                                 ; +0x2e, 0x4d0892\nLDR.W           R1, [R5,#0x188]                                        ; +0x30, 0x4d0894\nMOV.W           R3, #0x1F4                                             ; +0x34, 0x4d0898\nMOVS            R2, #0                                                 ; +0x38, 0x4d089c\nSTM.W           R4, {R2,R3}                                            ; +0x3a, 0x4d089e\nADD             R3, SP, #0x20C+var_1FC                                 ; +0x3e, 0x4d08a2\nSTR             R3, [R4,#8]                                            ; +0x40, 0x4d08a4\nBL              _ZN3fmt11BasicWriterIcElsEi; fmt::BasicWriter<char>::operator<<(int) ; +0x42, 0x4d08a6\nLDR.W           R5, [R5,#0x150]                                        ; +0x46, 0x4d08aa\nMOV             R0, R4                                                 ; +0x4a, 0x4d08ae\nLDR             R3, [R5]                                               ; +0x4c, 0x4d08b0\nLDR.W           R7, [R3,#0x1C8]                                        ; +0x4e, 0x4d08b2\nBL              _ZNK3fmt11BasicWriterIcE5c_strEv; fmt::BasicWriter<char>::c_str(void) ; +0x52, 0x4d08b6\nMOV             R1, R0                                                 ; +0x56, 0x4d08ba\nMOV             R0, R5                                                 ; +0x58, 0x4d08bc\nBLX             R7                                                     ; +0x5a, 0x4d08be\nMOV             R0, R4                                                 ; +0x5c, 0x4d08c0\nBL              _ZN3fmt8internal5ArrayIcLj500EE4freeEv; fmt::internal::Array<char,500u>::free(void) ; +0x5e, 0x4d08c2\nB               loc_4D08D2                                             ; +0x62, 0x4d08c6\nMOV             R0, R4                                                 ; +0x64, 0x4d08c8\nBL              _ZN3fmt8internal5ArrayIcLj500EE4freeEv; fmt::internal::Array<char,500u>::free(void) ; +0x66, 0x4d08ca\nBL              __cxa_end_cleanup                                      ; +0x6a, 0x4d08ce\nLDR             R2, [SP,#0x20C+var_8]                                  ; +0x6e, 0x4d08d2\nLDR             R3, [R6]                                               ; +0x70, 0x4d08d4\nCMP             R2, R3                                                 ; +0x72, 0x4d08d6\nBEQ             loc_4D08DE                                             ; +0x74, 0x4d08d8\nBLX             __stack_chk_fail                                       ; +0x76, 0x4d08da\nADD.W           SP, SP, #0x20C                                         ; +0x7a, 0x4d08de\nPOP             {R4-R7,PC}                                             ; +0x7e, 0x4d08e2", "xrefs": ["CurrencyRewardLayer::update @ 0x4d0d34"], "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"}