{"type": "func", "start": 5369341216, "end": 5369341617, "name": "AudioEffectsLayer::init", "pseudocode": "// \n// AudioEffectsLayer::init from 0x14009a520 to 0x14009a6b1 (401 bytes)\n// \n// 2 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x140505160\n// > <???> @ 0x140912e78\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:26:04 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nchar __fastcall AudioEffectsLayer::init(cocos2d::CCLayerColor *a1, _QWORD *a2)\n{\n  _BYTE *v5; // rdx\n  size_t v6; // r8\n  void *v7; // rcx\n  cocos2d::CCTextureCache *v8; // rax\n  struct cocos2d::CCTexture2D *v9; // rax\n  struct cocos2d::CCSpriteBatchNode *v10; // rax\n  _QWORD v11[2]; // [rsp+30h] [rbp-48h] BYREF\n  void *Block[2]; // [rsp+40h] [rbp-38h] BYREF\n  __int128 v13; // [rsp+50h] [rbp-28h]\n\n  v11[1] = a2;\n  LODWORD(v11[0]) = 0;\n  if ( cocos2d::CCLayerColor::initWithColor(a1, (const struct cocos2d::_ccColor4B *)v11) )\n  {\n    v5 = a2;\n    if ( a2[3] > 0xFu )\n      v5 = (_BYTE *)*a2;\n    *(_OWORD *)Block = 0;\n    v13 = 0;\n    v6 = -1;\n    do\n      ++v6;\n    while ( v5[v6] );\n    sub_14003D230(Block, v5, v6);\n    *((_QWORD *)a1 + 69) = sub_14009A1D0((__int64 *)Block);\n    if ( *((_QWORD *)&v13 + 1) > 0xFu )\n    {\n      v7 = Block[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v13 + 1) + 1LL) >= 0x1000 )\n      {\n        v7 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v7);\n    }\n    cocos2d::CCObject::retain(*((cocos2d::CCObject **)a1 + 69));\n    AudioEffectsLayer::resetAudioVars(a1);\n    v8 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n    v9 = cocos2d::CCTextureCache::addImage(v8, \"GJ_GameSheet.png\", 0);\n    v10 = cocos2d::CCSpriteBatchNode::createWithTexture(v9);\n    *((_QWORD *)a1 + 68) = v10;\n    (*(void (__fastcall **)(cocos2d::CCLayerColor *, struct cocos2d::CCSpriteBatchNode *))(*(_QWORD *)a1 + 464LL))(\n      a1,\n      v10);\n    v11[0] = 0x100000302LL;\n    (**(void (__fastcall ***)(__int64, __int64))(*((_QWORD *)a1 + 68) + 320LL))(\n      *((_QWORD *)a1 + 68) + 320LL,\n      0x100000302LL);\n    *((_DWORD *)a1 + 145) = 1036831949;\n    sub_14003D310((__int64)a2);\n    return 1;\n  }\n  else\n  {\n    sub_14003D310((__int64)a2);\n    return 0;\n  }\n}", "assembly": "; \n; AudioEffectsLayer::init from 0x14009a520 to 0x14009a6b1 (401 bytes)\n; \n; 2 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x140505160\n; > <???> @ 0x140912e78\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:26:04 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14009a520\npush    rdi                                                            ; +0x5, 0x14009a525\nsub     rsp, 70h                                                       ; +0x6, 0x14009a526\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14009a52a\nxor     rax, rsp                                                       ; +0x11, 0x14009a531\nmov     [rsp+78h+var_18], rax                                          ; +0x14, 0x14009a534\nmov     rbx, rdx                                                       ; +0x19, 0x14009a539\nmov     rdi, rcx                                                       ; +0x1c, 0x14009a53c\nmov     [rsp+78h+var_40], rdx                                          ; +0x1f, 0x14009a53f\nmov     dword ptr [rsp+78h+var_48], 0                                  ; +0x24, 0x14009a544\nlea     rdx, [rsp+78h+var_48]                                          ; +0x2c, 0x14009a54c\ncall    cs:__imp_?initWithColor@CCLayerColor@cocos2d@@UEAA_NAEBU_ccColor4B@2@@Z; cocos2d::CCLayerColor::initWithColor(cocos2d::_ccColor4B const &) ; +0x31, 0x14009a551\ntest    al, al                                                         ; +0x37, 0x14009a557\njnz     short loc_14009A56A                                            ; +0x39, 0x14009a559\nmov     rcx, rbx                                                       ; +0x3b, 0x14009a55b\ncall    sub_14003D310                                                  ; +0x3e, 0x14009a55e\nxor     al, al                                                         ; +0x43, 0x14009a563\njmp     loc_14009A696                                                  ; +0x45, 0x14009a565\nmov     rdx, rbx                                                       ; +0x4a, 0x14009a56a\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x4d, 0x14009a56d\njbe     short loc_14009A577                                            ; +0x52, 0x14009a572\nmov     rdx, [rbx]                                                     ; +0x54, 0x14009a574\nxorps   xmm0, xmm0                                                     ; +0x57, 0x14009a577\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x5a, 0x14009a57a\nxorps   xmm1, xmm1                                                     ; +0x5f, 0x14009a57f\nmovdqu  [rsp+78h+var_28], xmm1                                         ; +0x62, 0x14009a582\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x68, 0x14009a588\nnop                                                                    ; +0x6f, 0x14009a58f\ninc     r8                                                             ; +0x70, 0x14009a590\ncmp     byte ptr [rdx+r8], 0                                           ; +0x73, 0x14009a593\njnz     short loc_14009A590                                            ; +0x78, 0x14009a598\nlea     rcx, [rsp+78h+Block]                                           ; +0x7a, 0x14009a59a\ncall    sub_14003D230                                                  ; +0x7f, 0x14009a59f\nnop                                                                    ; +0x84, 0x14009a5a4\nlea     rcx, [rsp+78h+Block]                                           ; +0x85, 0x14009a5a5\ncall    sub_14009A1D0                                                  ; +0x8a, 0x14009a5aa\nmov     [rdi+228h], rax                                                ; +0x8f, 0x14009a5af\nmov     rdx, qword ptr [rsp+78h+var_28+8]                              ; +0x96, 0x14009a5b6\ncmp     rdx, 0Fh                                                       ; +0x9b, 0x14009a5bb\njbe     short loc_14009A609                                            ; +0x9f, 0x14009a5bf\ninc     rdx                                                            ; +0xa1, 0x14009a5c1\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0xa4, 0x14009a5c4\nmov     rax, rcx                                                       ; +0xa9, 0x14009a5c9\ncmp     rdx, 1000h                                                     ; +0xac, 0x14009a5cc\njb      short loc_14009A604                                            ; +0xb3, 0x14009a5d3\nadd     rdx, 27h ; '''                                                 ; +0xb5, 0x14009a5d5\nmov     rcx, [rcx-8]                                                   ; +0xb9, 0x14009a5d9\nsub     rax, rcx                                                       ; +0xbd, 0x14009a5dd\nsub     rax, 8                                                         ; +0xc0, 0x14009a5e0\ncmp     rax, 1Fh                                                       ; +0xc4, 0x14009a5e4\njbe     short loc_14009A604                                            ; +0xc8, 0x14009a5e8\nmov     [rsp+78h+Reserved], 0; Reserved                                ; +0xca, 0x14009a5ea\nxor     r9d, r9d; LineNo                                               ; +0xd3, 0x14009a5f3\nxor     r8d, r8d; FileName                                             ; +0xd6, 0x14009a5f6\nxor     edx, edx; FunctionName                                         ; +0xd9, 0x14009a5f9\nxor     ecx, ecx; Expression                                           ; +0xdb, 0x14009a5fb\ncall    cs:_invoke_watson                                              ; +0xdd, 0x14009a5fd\nalign 4                                                                ; +0xe3, 0x14009a603\ncall    j_j_free                                                       ; +0xe4, 0x14009a604\nmov     rcx, [rdi+228h]                                                ; +0xe9, 0x14009a609\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xf0, 0x14009a610\nmov     rcx, rdi                                                       ; +0xf6, 0x14009a616\ncall    AudioEffectsLayer__resetAudioVars                              ; +0xf9, 0x14009a619\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0xfe, 0x14009a61e\nmov     rcx, rax                                                       ; +0x104, 0x14009a624\nxor     r8d, r8d                                                       ; +0x107, 0x14009a627\nlea     rdx, aGjGamesheetPng; \"GJ_GameSheet.png\"                       ; +0x10a, 0x14009a62a\ncall    cs:?addImage@CCTextureCache@cocos2d@@QEAAPEAVCCTexture2D@2@PEBD_N@Z; cocos2d::CCTextureCache::addImage(char const *,bool) ; +0x111, 0x14009a631\nmov     rcx, rax                                                       ; +0x117, 0x14009a637\ncall    cs:?createWithTexture@CCSpriteBatchNode@cocos2d@@SAPEAV12@PEAVCCTexture2D@2@@Z; cocos2d::CCSpriteBatchNode::createWithTexture(cocos2d::CCTexture2D *) ; +0x11a, 0x14009a63a\nmov     [rdi+220h], rax                                                ; +0x120, 0x14009a640\nmov     rcx, [rdi]                                                     ; +0x127, 0x14009a647\nmov     r8, [rcx+1D0h]                                                 ; +0x12a, 0x14009a64a\nmov     rdx, rax                                                       ; +0x131, 0x14009a651\nmov     rcx, rdi                                                       ; +0x134, 0x14009a654\ncall    r8                                                             ; +0x137, 0x14009a657\nmov     dword ptr [rsp+78h+var_48], 302h                               ; +0x13a, 0x14009a65a\nmov     dword ptr [rsp+78h+var_48+4], 1                                ; +0x142, 0x14009a662\nmov     rcx, [rdi+220h]                                                ; +0x14a, 0x14009a66a\nadd     rcx, 140h                                                      ; +0x151, 0x14009a671\nmov     rax, [rcx]                                                     ; +0x158, 0x14009a678\nmov     rdx, [rsp+78h+var_48]                                          ; +0x15b, 0x14009a67b\ncall    qword ptr [rax]                                                ; +0x160, 0x14009a680\nmov     dword ptr [rdi+244h], 3DCCCCCDh                                ; +0x162, 0x14009a682\nmov     rcx, rbx                                                       ; +0x16c, 0x14009a68c\ncall    sub_14003D310                                                  ; +0x16f, 0x14009a68f\nmov     al, 1                                                          ; +0x174, 0x14009a694\nmov     rcx, [rsp+78h+var_18]                                          ; +0x176, 0x14009a696\nxor     rcx, rsp; StackCookie                                          ; +0x17b, 0x14009a69b\ncall    __security_check_cookie                                        ; +0x17e, 0x14009a69e\nmov     rbx, [rsp+78h+arg_10]                                          ; +0x183, 0x14009a6a3\nadd     rsp, 70h                                                       ; +0x18b, 0x14009a6ab\npop     rdi                                                            ; +0x18f, 0x14009a6af\nretn                                                                   ; +0x190, 0x14009a6b0", "xrefs": ["PlayLayer::setupHasCompleted @ 0x140505160", "<???> @ 0x140912e78"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}