{"type": "func", "start": 5034384, "end": 5034528, "name": "ChallengeNode::onClaimReward", "pseudocode": "// \n// ChallengeNode::onClaimReward from 0x4cd190 to 0x4cd220 (144 bytes)\n// \n// 0 xrefs:\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 ChallengeNode::onClaimReward(ChallengeNode *a1, cocos2d::CCObject *a2)\n{\n  ChallengesPage *m_challengesPage; // r9\n  GJChallengeItem *m_challengeItem; // r8\n  const cocos2d::CCPoint *v6; // r0\n  FMODAudioEngine *v7; // r5\n  int v8; // r2\n  int v9; // r3\n  float v10; // [sp+0h] [bp-14h]\n  _BYTE v11[8]; // [sp+4h] [bp-10h] BYREF\n  cocos2d::CCPoint v12; // 0:kr00_8.8\n\n  m_challengesPage = a1->m_challengesPage;\n  m_challengeItem = a1->m_challengeItem;\n  v6 = a1->getPosition(a1);\n  cocos2d::CCPoint::operator+(v11, v6, &a1->m_unkPoint);\n  LODWORD(v12.x) = v11;\n  v12.y = v10;\n  ChallengesPage::claimItem(m_challengesPage, a1, m_challengeItem, v12);\n  v7 = FMODAudioEngine::sharedEngine();\n  sub_776584((int)v11, \"gold02.ogg\");\n  FMODAudioEngine::playEffect(v7, (int)v11, v8, v9);\n  sub_774008(v11);\n  ((void (__fastcall *)(cocos2d::CCObject *, _DWORD))a2->__vftable[4].~CCObject)(a2, 0);\n  a2->__vftable[13].copyWithZone(a2, nullptr);\n}", "assembly": "; \n; ChallengeNode::onClaimReward from 0x4cd190 to 0x4cd220 (144 bytes)\n; \n; 0 xrefs:\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\nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x4cd190\nSUB             SP, SP, #0x14                                          ; +0x4, 0x4cd194\nLDR             R6, =(__stack_chk_guard_ptr - 0x4CD1A4)                ; +0x6, 0x4cd196\nMOV             R5, R0                                                 ; +0x8, 0x4cd198\nMOV             R7, R1                                                 ; +0xa, 0x4cd19a\nLDR.W           R9, [R0,#0x108]                                        ; +0xc, 0x4cd19c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x4cd1a0\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x4cd1a2\nLDR.W           R8, [R0,#0x10C]                                        ; +0x14, 0x4cd1a4\nADD             R4, SP, #0x14+var_10                                   ; +0x18, 0x4cd1a8\nLDR             R3, [R6]                                               ; +0x1a, 0x4cd1aa\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x1c, 0x4cd1ac\nLDR             R3, [R0]                                               ; +0x1e, 0x4cd1ae\nLDR             R3, [R3,#0x60]                                         ; +0x20, 0x4cd1b0\nBLX             R3                                                     ; +0x22, 0x4cd1b2\nADD.W           R2, R5, #0x110                                         ; +0x24, 0x4cd1b4\nMOV             R1, R0                                                 ; +0x28, 0x4cd1b8\nMOV             R0, R4                                                 ; +0x2a, 0x4cd1ba\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x2c, 0x4cd1bc\nMOV             R1, R5                                                 ; +0x30, 0x4cd1c0\nMOV             R2, R8                                                 ; +0x32, 0x4cd1c2\nMOV             R3, R4                                                 ; +0x34, 0x4cd1c4\nMOV             R0, R9                                                 ; +0x36, 0x4cd1c6\nBL              _ZN14ChallengesPage9claimItemEP13ChallengeNodeP15GJChallengeItemN7cocos2d7CCPointE; ChallengesPage::claimItem(ChallengeNode *,GJChallengeItem *,cocos2d::CCPoint) ; +0x38, 0x4cd1c8\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x3c, 0x4cd1cc\nLDR             R1, =(aGold02Ogg - 0x4CD1D8); \"gold02.ogg\"             ; +0x40, 0x4cd1d0\nMOV             R2, SP                                                 ; +0x42, 0x4cd1d2\nADD             R1, PC; \"gold02.ogg\"                                   ; +0x44, 0x4cd1d4\nMOV             R5, R0                                                 ; +0x46, 0x4cd1d6\nMOV             R0, R4; int                                            ; +0x48, 0x4cd1d8\nBL              sub_776584                                             ; +0x4a, 0x4cd1da\nMOV             R0, R5                                                 ; +0x4e, 0x4cd1de\nMOV             R1, R4                                                 ; +0x50, 0x4cd1e0\nBL              _ZN15FMODAudioEngine10playEffectESs; FMODAudioEngine::playEffect(std::string) ; +0x52, 0x4cd1e2\nMOV             R0, R4                                                 ; +0x56, 0x4cd1e6\nBL              sub_774008                                             ; +0x58, 0x4cd1e8\nLDR             R3, [R7]                                               ; +0x5c, 0x4cd1ec\nMOV             R0, R7                                                 ; +0x5e, 0x4cd1ee\nMOVS            R1, #0                                                 ; +0x60, 0x4cd1f0\nLDR.W           R3, [R3,#0xA4]                                         ; +0x62, 0x4cd1f2\nBLX             R3                                                     ; +0x66, 0x4cd1f6\nLDR             R3, [R7]                                               ; +0x68, 0x4cd1f8\nMOV             R0, R7                                                 ; +0x6a, 0x4cd1fa\nMOVS            R1, #0                                                 ; +0x6c, 0x4cd1fc\nLDR.W           R3, [R3,#0x208]                                        ; +0x6e, 0x4cd1fe\nBLX             R3                                                     ; +0x72, 0x4cd202\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x74, 0x4cd204\nLDR             R3, [R6]                                               ; +0x76, 0x4cd206\nCMP             R2, R3                                                 ; +0x78, 0x4cd208\nBEQ             loc_4CD21A                                             ; +0x7a, 0x4cd20a\nBLX             __stack_chk_fail                                       ; +0x7c, 0x4cd20c\nMOV             R0, R4                                                 ; +0x80, 0x4cd210\nBL              sub_774008                                             ; +0x82, 0x4cd212\nBL              __cxa_end_cleanup                                      ; +0x86, 0x4cd216\nADD             SP, SP, #0x14                                          ; +0x8a, 0x4cd21a\nPOP.W           {R4-R9,PC}                                             ; +0x8c, 0x4cd21c", "xrefs": [], "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"}