{"type": "func", "start": 4298649968, "end": 4298650193, "name": "GameManager::loadDeathEffect", "pseudocode": "// \n// GameManager::loadDeathEffect from 0x100383170 to 0x100383251 (225 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x1000adf07\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 __fastcall GameManager::loadDeathEffect(GameManager *a1, int a2)\n{\n  int v2; // eax\n  int v3; // r12d\n  int m_loadedDeathEffect; // eax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // r14\n  cocos2d::CCTextureCache *v7; // rax\n  cocos2d::CCTextureCache *v8; // r15\n  cocos2d::CCString *v9; // rax\n  const char *v10; // rax\n  cocos2d::CCSpriteFrameCache *v11; // r15\n  cocos2d::CCString *v12; // rax\n  const char *v13; // rax\n  char v14; // [rsp+0h] [rbp-20h]\n  char v15; // [rsp+0h] [rbp-20h]\n\n  v2 = 20;\n  if ( a2 < 20 )\n    v2 = a2;\n  v3 = 1;\n  if ( v2 >= 2 )\n    v3 = v2;\n  m_loadedDeathEffect = a1->m_loadedDeathEffect;\n  if ( v3 != m_loadedDeathEffect )\n  {\n    if ( m_loadedDeathEffect >= 2 )\n    {\n      v5 = (cocos2d::CCString *)sub_1007AB580(\"PlayerExplosion_%02d.png\", v14);\n      CString = cocos2d::CCString::getCString(v5);\n      v7 = cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::removeTextureForKey(v7, CString);\n    }\n    if ( a2 >= 2 )\n    {\n      v8 = cocos2d::CCTextureCache::sharedTextureCache();\n      v9 = (cocos2d::CCString *)sub_1007AB580(\"PlayerExplosion_%02d.png\", v14);\n      v10 = cocos2d::CCString::getCString(v9);\n      cocos2d::CCTextureCache::addImage(v8, v10, 0);\n      v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v12 = (cocos2d::CCString *)sub_1007AB580(\"PlayerExplosion_%02d.plist\", v15);\n      v13 = cocos2d::CCString::getCString(v12);\n      cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v11, v13);\n    }\n    a1->m_loadedDeathEffect = v3;\n  }\n}", "assembly": "; \n; GameManager::loadDeathEffect from 0x100383170 to 0x100383251 (225 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x1000adf07\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    rbp                                                            ; +0x0, 0x100383170\nmov     rbp, rsp                                                       ; +0x1, 0x100383171\npush    r15                                                            ; +0x4, 0x100383174\npush    r14                                                            ; +0x6, 0x100383176\npush    r12                                                            ; +0x8, 0x100383178\npush    rbx; char                                                      ; +0xa, 0x10038317a\ncmp     esi, 14h                                                       ; +0xb, 0x10038317b\nmov     eax, 14h                                                       ; +0xe, 0x10038317e\ncmovl   eax, esi                                                       ; +0x13, 0x100383183\ncmp     eax, 2                                                         ; +0x16, 0x100383186\nmov     r12d, 1                                                        ; +0x19, 0x100383189\ncmovge  r12d, eax                                                      ; +0x1f, 0x10038318f\nmov     eax, [rdi+3B0h]                                                ; +0x23, 0x100383193\ncmp     r12d, eax                                                      ; +0x29, 0x100383199\njz      loc_100383248                                                  ; +0x2c, 0x10038319c\nmov     rbx, rdi                                                       ; +0x32, 0x1003831a2\ncmp     eax, 2                                                         ; +0x35, 0x1003831a5\njl      short loc_1003831DD                                            ; +0x38, 0x1003831a8\ndec     eax                                                            ; +0x3a, 0x1003831aa\nlea     rdi, aPlayerexplosio_37; \"PlayerExplosion_%02d.png\"            ; +0x3c, 0x1003831ac\nmov     r15d, esi                                                      ; +0x43, 0x1003831b3\nmov     esi, eax                                                       ; +0x46, 0x1003831b6\nxor     eax, eax                                                       ; +0x48, 0x1003831b8\ncall    sub_1007AB580                                                  ; +0x4a, 0x1003831ba\nmov     rdi, rax                                                       ; +0x4f, 0x1003831bf\ncall    cocos2d__CCString__getCString                                  ; +0x52, 0x1003831c2\nmov     r14, rax                                                       ; +0x57, 0x1003831c7\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x5a, 0x1003831ca\nmov     rdi, rax                                                       ; +0x5f, 0x1003831cf\nmov     rsi, r14                                                       ; +0x62, 0x1003831d2\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x65, 0x1003831d5\nmov     esi, r15d                                                      ; +0x6a, 0x1003831da\ncmp     esi, 2                                                         ; +0x6d, 0x1003831dd\njl      short loc_100383241                                            ; +0x70, 0x1003831e0\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x72, 0x1003831e2\nmov     r15, rax                                                       ; +0x77, 0x1003831e7\nlea     r14d, [r12-1]                                                  ; +0x7a, 0x1003831ea\nlea     rdi, aPlayerexplosio_37; \"PlayerExplosion_%02d.png\"            ; +0x7f, 0x1003831ef\nmov     esi, r14d                                                      ; +0x86, 0x1003831f6\nxor     eax, eax                                                       ; +0x89, 0x1003831f9\ncall    sub_1007AB580                                                  ; +0x8b, 0x1003831fb\nmov     rdi, rax                                                       ; +0x90, 0x100383200\ncall    cocos2d__CCString__getCString                                  ; +0x93, 0x100383203\nmov     rdi, r15                                                       ; +0x98, 0x100383208\nmov     rsi, rax                                                       ; +0x9b, 0x10038320b\nxor     edx, edx                                                       ; +0x9e, 0x10038320e\ncall    cocos2d__CCTextureCache__addImage                              ; +0xa0, 0x100383210\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0xa5, 0x100383215\nmov     r15, rax                                                       ; +0xaa, 0x10038321a\nlea     rdi, aPlayerexplosio_38; \"PlayerExplosion_%02d.plist\"          ; +0xad, 0x10038321d\nmov     esi, r14d                                                      ; +0xb4, 0x100383224\nxor     eax, eax                                                       ; +0xb7, 0x100383227\ncall    sub_1007AB580                                                  ; +0xb9, 0x100383229\nmov     rdi, rax                                                       ; +0xbe, 0x10038322e\ncall    cocos2d__CCString__getCString                                  ; +0xc1, 0x100383231\nmov     rdi, r15                                                       ; +0xc6, 0x100383236\nmov     rsi, rax                                                       ; +0xc9, 0x100383239\ncall    cocos2d__CCSpriteFrameCache__addSpriteFramesWithFile_2         ; +0xcc, 0x10038323c\nmov     [rbx+3B0h], r12d                                               ; +0xd1, 0x100383241\npop     rbx                                                            ; +0xd8, 0x100383248\npop     r12                                                            ; +0xd9, 0x100383249\npop     r14                                                            ; +0xdb, 0x10038324b\npop     r15                                                            ; +0xdd, 0x10038324d\npop     rbp                                                            ; +0xdf, 0x10038324f\nretn                                                                   ; +0xe0, 0x100383250", "xrefs": ["PlayLayer::setupHasCompleted @ 0x1000adf07"], "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"}