{"type": "func", "start": 6443152192, "end": 6443152367, "name": "cocos2d::CCTileMapAtlas::loadTGAfile", "pseudocode": "// \n// cocos2d::CCTileMapAtlas::loadTGAfile from 0x1800ab340 to 0x1800ab3ef (175 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800ab26b\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b8058\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\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCTileMapAtlas::loadTGAfile(cocos2d::CCTileMapAtlas *this, const char *a2)\n{\n  struct cocos2d::CCFileUtils *v4; // rax\n  void **v5; // rcx\n  void *v6; // rcx\n  void *Block[3]; // [rsp+20h] [rbp-38h] BYREF\n  unsigned __int64 v8; // [rsp+38h] [rbp-20h]\n\n  v4 = cocos2d::CCFileUtils::sharedFileUtils();\n  ((void (__fastcall *)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))v4->createCCArrayWithContentsOfFile)(\n    v4,\n    Block,\n    a2,\n    0);\n  v5 = Block;\n  if ( v8 > 0xF )\n    v5 = (void **)Block[0];\n  this->m_pTGAInfo = (cocos2d::sImageTGA *)sub_18009E3D0((__int64)v5);\n  if ( v8 > 0xF )\n  {\n    v6 = Block[0];\n    if ( v8 + 1 >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v6);\n  }\n}", "assembly": "; \n; cocos2d::CCTileMapAtlas::loadTGAfile from 0x1800ab340 to 0x1800ab3ef (175 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800ab26b\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b8058\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1800ab340\npush    rdi                                                            ; +0x5, 0x1800ab345\nsub     rsp, 50h                                                       ; +0x6, 0x1800ab346\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1800ab34a\nxor     rax, rsp                                                       ; +0x11, 0x1800ab351\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x1800ab354\nmov     rbx, rdx                                                       ; +0x19, 0x1800ab359\nmov     rdi, rcx                                                       ; +0x1c, 0x1800ab35c\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x1f, 0x1800ab35f\nmov     r10, [rax]                                                     ; +0x24, 0x1800ab364\nxor     r9d, r9d                                                       ; +0x27, 0x1800ab367\nmov     r8, rbx                                                        ; +0x2a, 0x1800ab36a\nlea     rdx, [rsp+58h+Block]                                           ; +0x2d, 0x1800ab36d\nmov     rcx, rax                                                       ; +0x32, 0x1800ab372\ncall    qword ptr [r10+28h]                                            ; +0x35, 0x1800ab375\nnop                                                                    ; +0x39, 0x1800ab379\nlea     rcx, [rsp+58h+Block]                                           ; +0x3a, 0x1800ab37a\ncmp     [rsp+58h+var_20], 0Fh                                          ; +0x3f, 0x1800ab37f\ncmova   rcx, [rsp+58h+Block]                                           ; +0x45, 0x1800ab385\ncall    sub_18009E3D0                                                  ; +0x4b, 0x1800ab38b\nmov     [rdi+198h], rax                                                ; +0x50, 0x1800ab390\nmov     rdx, [rsp+58h+var_20]                                          ; +0x57, 0x1800ab397\ncmp     rdx, 0Fh                                                       ; +0x5c, 0x1800ab39c\njbe     short loc_1800AB3D7                                            ; +0x60, 0x1800ab3a0\ninc     rdx                                                            ; +0x62, 0x1800ab3a2\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x65, 0x1800ab3a5\nmov     rax, rcx                                                       ; +0x6a, 0x1800ab3aa\ncmp     rdx, 1000h                                                     ; +0x6d, 0x1800ab3ad\njb      short loc_1800AB3D2                                            ; +0x74, 0x1800ab3b4\nadd     rdx, 27h ; '''                                                 ; +0x76, 0x1800ab3b6\nmov     rcx, [rcx-8]                                                   ; +0x7a, 0x1800ab3ba\nsub     rax, rcx                                                       ; +0x7e, 0x1800ab3be\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x81, 0x1800ab3c1\ncmp     rax, 1Fh                                                       ; +0x85, 0x1800ab3c5\njbe     short loc_1800AB3D2                                            ; +0x89, 0x1800ab3c9\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x8b, 0x1800ab3cb\nalign 2                                                                ; +0x91, 0x1800ab3d1\ncall    j_j_free_0                                                     ; +0x92, 0x1800ab3d2\nmov     rcx, [rsp+58h+var_18]                                          ; +0x97, 0x1800ab3d7\nxor     rcx, rsp; StackCookie                                          ; +0x9c, 0x1800ab3dc\ncall    __security_check_cookie                                        ; +0x9f, 0x1800ab3df\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xa4, 0x1800ab3e4\nadd     rsp, 50h                                                       ; +0xa9, 0x1800ab3e9\npop     rdi                                                            ; +0xad, 0x1800ab3ed\nretn                                                                   ; +0xae, 0x1800ab3ee", "xrefs": ["cocos2d::CCTileMapAtlas::initWithTileFile @ 0x1800ab26b", "<???> @ 0x1801438a8", "<???> @ 0x1801b8058"], "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"}