{"type": "func", "start": 5123420, "end": 5123632, "name": "AnimatedShopKeeper::playReactAnimation", "pseudocode": "// \n// AnimatedShopKeeper::playReactAnimation from 0x4e2d5c to 0x4e2e30 (212 bytes)\n// \n// 1 xrefs:\n// > GJShopLayer::ccTouchBegan @ 0x4e2f50\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 AnimatedShopKeeper::playReactAnimation(AnimatedShopKeeper *a1)\n{\n  int v2; // r5\n  bool v3; // nf\n  cocos2d::CCString *v4; // r0\n  char *CString; // r0\n  FMODAudioEngine *v6; // r9\n  int v7; // r2\n  _BYTE v8[4]; // [sp+8h] [bp-14h] BYREF\n  _BYTE v9[4]; // [sp+Ch] [bp-10h] BYREF\n  _BYTE v10[4]; // [sp+10h] [bp-Ch] BYREF\n\n  if ( !a1->m_reacting )\n  {\n    v2 = a1->m_gruntIndex + 1;\n    v3 = a1->m_gruntIndex - 2 < 0;\n    if ( v2 <= 3 )\n      a1->m_gruntIndex = v2;\n    if ( !(v3 ^ __OFSUB__(v2, 3) | (v2 == 3)) )\n      a1->m_gruntIndex = 1;\n    v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"grunt0%i.ogg\",\n                                (const char *)a1->m_gruntIndex);\n    CString = (char *)cocos2d::CCString::getCString(v4);\n    sub_776584((int)v8, CString);\n    v6 = FMODAudioEngine::sharedEngine();\n    sub_775C20(v9);\n    FMODAudioEngine::playEffect(v6, (int)v9, 1.0, 0, 1059481190);\n    sub_774008(v9);\n    sub_776584((int)v10, \"react01\");\n    CCAnimatedSprite::runAnimationForced((int)a1, (int)v10, v7);\n    sub_774008(v10);\n    a1->m_reacting = 1;\n    ++a1->m_reactCount;\n    sub_774008(v8);\n  }\n}", "assembly": "; \n; AnimatedShopKeeper::playReactAnimation from 0x4e2d5c to 0x4e2e30 (212 bytes)\n; \n; 1 xrefs:\n; > GJShopLayer::ccTouchBegan @ 0x4e2f50\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 - 0x4E2D66)                ; +0x0, 0x4e2d5c\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x4e2d5e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x4e2d62\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x4e2d64\nSUB             SP, SP, #0x1C                                          ; +0xa, 0x4e2d66\nMOV             R4, R0                                                 ; +0xc, 0x4e2d68\nLDR             R2, [R3]                                               ; +0xe, 0x4e2d6a\nMOV             R8, R3                                                 ; +0x10, 0x4e2d6c\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x12, 0x4e2d6e\nLDRB.W          R2, [R0,#0x22D]                                        ; +0x14, 0x4e2d70\nCMP             R2, #0                                                 ; +0x18, 0x4e2d74\nBNE             loc_4E2E1C                                             ; +0x1a, 0x4e2d76\nLDR.W           R5, [R0,#0x234]                                        ; +0x1c, 0x4e2d78\nADD             R7, SP, #0x1C+var_14                                   ; +0x20, 0x4e2d7c\nADDS            R5, #1                                                 ; +0x22, 0x4e2d7e\nCMP             R5, #3                                                 ; +0x24, 0x4e2d80\nIT LE                                                                  ; +0x26, 0x4e2d82\nSTRLE.W         R5, [R0,#0x234]                                        ; +0x28, 0x4e2d84\nADD             R5, SP, #0x1C+var_C                                    ; +0x2c, 0x4e2d88\nITT GT                                                                 ; +0x2e, 0x4e2d8a\nMOVGT           R3, #1                                                 ; +0x30, 0x4e2d8c\nSTRGT.W         R3, [R0,#0x234]                                        ; +0x32, 0x4e2d8e\nLDR             R0, =(aGrunt0IOgg - 0x4E2D9C); \"grunt0%i.ogg\"          ; +0x36, 0x4e2d92\nLDR.W           R1, [R4,#0x234]; char *                                ; +0x38, 0x4e2d94\nADD             R0, PC; \"grunt0%i.ogg\"                                 ; +0x3c, 0x4e2d98\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x3e, 0x4e2d9a\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x42, 0x4e2d9e\nMOV             R2, R5                                                 ; +0x46, 0x4e2da2\nMOV             R1, R0; char *                                         ; +0x48, 0x4e2da4\nMOV             R0, R7; int                                            ; +0x4a, 0x4e2da6\nBL              sub_776584                                             ; +0x4c, 0x4e2da8\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x50, 0x4e2dac\nADD             R6, SP, #0x1C+var_10                                   ; +0x54, 0x4e2db0\nMOV             R9, R0                                                 ; +0x56, 0x4e2db2\nMOV             R1, R7                                                 ; +0x58, 0x4e2db4\nMOV             R0, R6                                                 ; +0x5a, 0x4e2db6\nBL              sub_775C20                                             ; +0x5c, 0x4e2db8\nLDR             R3, flt_4E2E30                                         ; +0x60, 0x4e2dbc\nMOV             R0, R9; int                                            ; +0x62, 0x4e2dbe\nMOV             R1, R6; int                                            ; +0x64, 0x4e2dc0\nMOV.W           R2, #0x3F800000; int                                   ; +0x66, 0x4e2dc2\nSTR             R3, [SP,#0x1C+var_1C]; float                           ; +0x6a, 0x4e2dc6\nMOVS            R3, #0; int                                            ; +0x6c, 0x4e2dc8\nBL              _ZN15FMODAudioEngine10playEffectESsfff; FMODAudioEngine::playEffect(std::string,float,float,float) ; +0x6e, 0x4e2dca\nMOV             R0, R6                                                 ; +0x72, 0x4e2dce\nBL              sub_774008                                             ; +0x74, 0x4e2dd0\nLDR             R1, =(aReact01 - 0x4E2DDE); \"react01\"                  ; +0x78, 0x4e2dd4\nMOV             R0, R5; int                                            ; +0x7a, 0x4e2dd6\nMOV             R2, R6                                                 ; +0x7c, 0x4e2dd8\nADD             R1, PC; \"react01\"                                      ; +0x7e, 0x4e2dda\nBL              sub_776584                                             ; +0x80, 0x4e2ddc\nMOV             R0, R4                                                 ; +0x84, 0x4e2de0\nMOV             R1, R5                                                 ; +0x86, 0x4e2de2\nBL              _ZN16CCAnimatedSprite18runAnimationForcedESs; CCAnimatedSprite::runAnimationForced(std::string) ; +0x88, 0x4e2de4\nMOV             R0, R5                                                 ; +0x8c, 0x4e2de8\nBL              sub_774008                                             ; +0x8e, 0x4e2dea\nMOVS            R3, #1                                                 ; +0x92, 0x4e2dee\nSTRB.W          R3, [R4,#0x22D]                                        ; +0x94, 0x4e2df0\nMOV             R0, R7                                                 ; +0x98, 0x4e2df4\nLDR.W           R3, [R4,#0x230]                                        ; +0x9a, 0x4e2df6\nADDS            R3, #1                                                 ; +0x9e, 0x4e2dfa\nSTR.W           R3, [R4,#0x230]                                        ; +0xa0, 0x4e2dfc\nBL              sub_774008                                             ; +0xa4, 0x4e2e00\nB               loc_4E2E1C                                             ; +0xa8, 0x4e2e04\nMOV             R0, R6                                                 ; +0xaa, 0x4e2e06\nB               loc_4E2E0C                                             ; +0xac, 0x4e2e08\nMOV             R0, R5                                                 ; +0xae, 0x4e2e0a\nBL              sub_774008                                             ; +0xb0, 0x4e2e0c\nB               loc_4E2E12                                             ; +0xb4, 0x4e2e10\nMOV             R0, R7                                                 ; +0xb6, 0x4e2e12\nBL              sub_774008                                             ; +0xb8, 0x4e2e14\nBL              __cxa_end_cleanup                                      ; +0xbc, 0x4e2e18\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xc0, 0x4e2e1c\nLDR.W           R3, [R8]                                               ; +0xc2, 0x4e2e1e\nCMP             R2, R3                                                 ; +0xc6, 0x4e2e22\nBEQ             loc_4E2E2A                                             ; +0xc8, 0x4e2e24\nBLX             __stack_chk_fail                                       ; +0xca, 0x4e2e26\nADD             SP, SP, #0x1C                                          ; +0xce, 0x4e2e2a\nPOP.W           {R4-R9,PC}                                             ; +0xd0, 0x4e2e2c", "xrefs": ["GJShopLayer::ccTouchBegan @ 0x4e2f50"], "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"}