{"type": "func", "start": 4296336892, "end": 4296337052, "name": "AnimatedShopKeeper::init", "pseudocode": "// \n// AnimatedShopKeeper::init from 0x10014e5fc to 0x10014e69c (160 bytes)\n// \n// 1 xrefs:\n// > AnimatedShopKeeper::create @ 0x10014ba9c\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\nbool __fastcall AnimatedShopKeeper::init(AnimatedShopKeeper *a1, ShopType a2)\n{\n  const char *v3; // x1\n  _BOOL4 v4; // w20\n\n  a1->m_type = a2;\n  if ( (unsigned int)(a2 - 1) > 3 )\n    v3 = \"GJShopKeeper\";\n  else\n    v3 = off_100799B60[a2 - 1];\n  v4 = CCAnimatedSprite::initWithType(a1, v3, nullptr, 0);\n  if ( v4 )\n  {\n    a1->m_idleInt2 = (int)(float)((float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 5.0) + 10.0);\n    a1->m_idleInt1 = (int)(float)((float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 2.0) + 1.0);\n    SpriteAnimationManager::stopAnimations(a1->m_animationManager);\n  }\n  return v4;\n}", "assembly": "; \n; AnimatedShopKeeper::init from 0x10014e5fc to 0x10014e69c (160 bytes)\n; \n; 1 xrefs:\n; > AnimatedShopKeeper::create @ 0x10014ba9c\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\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x10014e5fc\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x10014e600\nADD             X29, SP, #0x10                                         ; +0x8, 0x10014e604\nMOV             X19, X0                                                ; +0xc, 0x10014e608\nSTR             W1, [X0,#0x2D0]                                        ; +0x10, 0x10014e60c\nSUB             W8, W1, #1                                             ; +0x14, 0x10014e610\nCMP             W8, #3                                                 ; +0x18, 0x10014e614\nB.HI            loc_10014E62C                                          ; +0x1c, 0x10014e618\nADRL            X9, off_100799B60; \"GJShopKeeper2\"                     ; +0x20, 0x10014e61c\nLDR             X1, [X9,W8,UXTW#3]                                     ; +0x28, 0x10014e624\nB               loc_10014E634                                          ; +0x2c, 0x10014e628\nADRL            X1, aGjshopkeeper; \"GJShopKeeper\"                      ; +0x30, 0x10014e62c\nMOV             X0, X19                                                ; +0x38, 0x10014e634\nMOV             X2, #0                                                 ; +0x3c, 0x10014e638\nMOV             W3, #0                                                 ; +0x40, 0x10014e63c\nBL              CCAnimatedSprite__initWithType                         ; +0x44, 0x10014e640\nMOV             X20, X0                                                ; +0x48, 0x10014e644\nCBZ             W0, loc_10014E68C                                      ; +0x4c, 0x10014e648\nBL              _rand                                                  ; +0x50, 0x10014e64c\nSCVTF           S0, W0, #0x1F                                          ; +0x54, 0x10014e650\nFMOV            S1, #10.0                                              ; +0x58, 0x10014e654\nFMOV            S2, #5.0                                               ; +0x5c, 0x10014e658\nFMADD           S0, S0, S2, S1                                         ; +0x60, 0x10014e65c\nFCVTZS          W8, S0                                                 ; +0x64, 0x10014e660\nSTR             W8, [X19,#0x2D8]                                       ; +0x68, 0x10014e664\nBL              _rand                                                  ; +0x6c, 0x10014e668\nSCVTF           S0, W0, #0x1F                                          ; +0x70, 0x10014e66c\nFMOV            S1, #1.0                                               ; +0x74, 0x10014e670\nFMOV            S2, #2.0                                               ; +0x78, 0x10014e674\nFMADD           S0, S0, S2, S1                                         ; +0x7c, 0x10014e678\nFCVTZS          W8, S0                                                 ; +0x80, 0x10014e67c\nSTR             W8, [X19,#0x2D4]                                       ; +0x84, 0x10014e680\nLDR             X0, [X19,#0x288]                                       ; +0x88, 0x10014e684\nBL              SpriteAnimationManager__stopAnimations                 ; +0x8c, 0x10014e688\nMOV             X0, X20                                                ; +0x90, 0x10014e68c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x94, 0x10014e690\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x98, 0x10014e694\nRET                                                                    ; +0x9c, 0x10014e698", "xrefs": ["AnimatedShopKeeper::create @ 0x10014ba9c"], "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"}