{"type": "func", "start": 4298186056, "end": 4298186260, "name": "GameManager::init", "pseudocode": "// \n// GameManager::init from 0x100311d48 to 0x100311e14 (204 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x1007eec70\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 GameManager::init(GameManager *a1)\n{\n  cocos2d::CCArray *v2; // x0\n  int v3; // w20\n  float v4; // s0\n\n  std::string::assign((std::string *)&a1->m_fileName, \"CCGameManager.dat\");\n  *(_WORD *)&a1->m_unkBool2 = 0;\n  a1->m_googlePlaySignedIn = 0;\n  a1->m_adTimer = 0.0;\n  a1->m_unkDouble2 = 0.0;\n  v2 = (cocos2d::CCArray *)sub_10024A15C();\n  a1->m_gjLog = v2;\n  cocos2d::CCObject::retain(v2);\n  ((void (__fastcall *)(GameManager *))a1->setup)(a1);\n  GameManager::calculateBaseKeyForIcons(a1);\n  GameManager::setupGameAnimations(a1);\n  v3 = (int)(float)(floorf((float)(a1->m_playerUserID.random - a1->m_playerUserID.seed) / 10000.0)\n                  + (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000000.0));\n  v4 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  a1->m_chk.seed = (int)v4;\n  a1->m_chk.random = v3 + (int)v4;\n  return 1;\n}", "assembly": "; \n; GameManager::init from 0x100311d48 to 0x100311e14 (204 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x1007eec70\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, 0x100311d48\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100311d4c\nADD             X29, SP, #0x10                                         ; +0x8, 0x100311d50\nMOV             X19, X0                                                ; +0xc, 0x100311d54\nADRL            X1, aCcgamemanagerD; \"CCGameManager.dat\"               ; +0x10, 0x100311d58\nADD             X0, X0, #0x140; this                                   ; +0x18, 0x100311d60\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x1c, 0x100311d64\nADD             X8, X19, #0x18D                                        ; +0x20, 0x100311d68\nSTRH            WZR, [X8]                                              ; +0x24, 0x100311d6c\nSTRB            WZR, [X19,#0x1D1]                                      ; +0x28, 0x100311d70\nSTR             XZR, [X19,#0x1A8]                                      ; +0x2c, 0x100311d74\nSTR             XZR, [X19,#0x1C0]                                      ; +0x30, 0x100311d78\nBL              sub_10024A15C                                          ; +0x34, 0x100311d7c\nSTR             X0, [X19,#0x4A0]                                       ; +0x38, 0x100311d80\nBL              cocos2d__CCObject__retain                              ; +0x3c, 0x100311d84\nLDR             X8, [X19]                                              ; +0x40, 0x100311d88\nLDR             X8, [X8,#0x370]                                        ; +0x44, 0x100311d8c\nMOV             X0, X19                                                ; +0x48, 0x100311d90\nBLR             X8                                                     ; +0x4c, 0x100311d94\nMOV             X0, X19                                                ; +0x50, 0x100311d98\nBL              GameManager__calculateBaseKeyForIcons                  ; +0x54, 0x100311d9c\nMOV             X0, X19                                                ; +0x58, 0x100311da0\nBL              GameManager__setupGameAnimations                       ; +0x5c, 0x100311da4\nBL              _rand                                                  ; +0x60, 0x100311da8\nSCVTF           S0, W0, #0x1F                                          ; +0x64, 0x100311dac\nLDR             W8, [X19,#0x26C]                                       ; +0x68, 0x100311db0\nLDR             W9, [X19,#0x270]                                       ; +0x6c, 0x100311db4\nSUB             W8, W8, W9                                             ; +0x70, 0x100311db8\nSCVTF           S1, W8                                                 ; +0x74, 0x100311dbc\nADRP            X8, #dword_100639A54@PAGE                              ; +0x78, 0x100311dc0\nLDR             S2, [X8,#dword_100639A54@PAGEOFF]                      ; +0x7c, 0x100311dc4\nFDIV            S1, S1, S2                                             ; +0x80, 0x100311dc8\nFRINTM          S1, S1                                                 ; +0x84, 0x100311dcc\nADRP            X8, #dword_100638D60@PAGE                              ; +0x88, 0x100311dd0\nLDR             S2, [X8,#dword_100638D60@PAGEOFF]                      ; +0x8c, 0x100311dd4\nFMADD           S0, S0, S2, S1                                         ; +0x90, 0x100311dd8\nFCVTZS          W20, S0                                                ; +0x94, 0x100311ddc\nBL              _rand                                                  ; +0x98, 0x100311de0\nSCVTF           S0, W0, #0x1F                                          ; +0x9c, 0x100311de4\nMOV             W8, #0x447A0000                                        ; +0xa0, 0x100311de8\nFMOV            S1, W8                                                 ; +0xa4, 0x100311dec\nFMUL            S0, S0, S1                                             ; +0xa8, 0x100311df0\nFCVTZS          W8, S0                                                 ; +0xac, 0x100311df4\nSTR             W8, [X19,#0x35C]                                       ; +0xb0, 0x100311df8\nADD             W8, W20, W8                                            ; +0xb4, 0x100311dfc\nSTR             W8, [X19,#0x358]                                       ; +0xb8, 0x100311e00\nMOV             W0, #1                                                 ; +0xbc, 0x100311e04\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xc0, 0x100311e08\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xc4, 0x100311e0c\nRET                                                                    ; +0xc8, 0x100311e10", "xrefs": ["<???> @ 0x1007eec70"], "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"}