{"type": "func", "start": 6442596928, "end": 6442597182, "name": "cocos2d::CCGridBase::initWithSize", "pseudocode": "// \n// cocos2d::CCGridBase::initWithSize from 0x180023a40 to 0x180023b3e (254 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCGrid3D::create @ 0x1800236ab\n// > cocos2d::CCGridBase::create @ 0x18002380d\n// > cocos2d::CCTiledGrid3D::create @ 0x18002394b\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b9130\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:21:29 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::CCGridBase::initWithSize(cocos2d::CCGridBase *this, const struct cocos2d::CCSize *a2)\n{\n  struct cocos2d::CCDirector *v4; // rax\n  unsigned int v5; // ebp\n  int v6; // r14d\n  void *v7; // rsi\n  cocos2d::CCTexture2D *v9; // rax\n  struct cocos2d::CCTexture2D *v10; // rbx\n  float v11; // [rsp+70h] [rbp+18h] BYREF\n  float v12; // [rsp+74h] [rbp+1Ch]\n  cocos2d::CCTexture2D *v13; // [rsp+78h] [rbp+20h]\n\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSizeInPixels(v4, &v11);\n  v5 = sub_1800992B0((unsigned int)(int)v11);\n  v6 = sub_1800992B0((unsigned int)(int)v12);\n  v7 = calloc((int)(4 * v5 * v6), 1u);\n  if ( !v7 )\n  {\n    cocos2d::CCObject::release(this);\n    return 0;\n  }\n  v9 = (cocos2d::CCTexture2D *)sub_1800E4AC0(0x68u);\n  v13 = v9;\n  if ( v9 )\n    v10 = (struct cocos2d::CCTexture2D *)cocos2d::CCTexture2D::CCTexture2D(v9);\n  else\n    v10 = nullptr;\n  cocos2d::CCTexture2D::initWithData(v10, v7, 0, v5, v6, &v11);\n  free(v7);\n  if ( !v10 )\n    return 0;\n  cocos2d::CCGridBase::initWithSize(this, a2, v10, 0);\n  cocos2d::CCObject::release(v10);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCGridBase::initWithSize from 0x180023a40 to 0x180023b3e (254 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCGrid3D::create @ 0x1800236ab\n; > cocos2d::CCGridBase::create @ 0x18002380d\n; > cocos2d::CCTiledGrid3D::create @ 0x18002394b\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b9130\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:21:29 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180023a40\npush    rbp                                                            ; +0x5, 0x180023a45\npush    rsi                                                            ; +0x6, 0x180023a46\npush    rdi                                                            ; +0x7, 0x180023a47\npush    r14                                                            ; +0x8, 0x180023a48\npush    r15                                                            ; +0xa, 0x180023a4a\nsub     rsp, 30h                                                       ; +0xc, 0x180023a4c\nmov     r15, rdx                                                       ; +0x10, 0x180023a50\nmov     rdi, rcx                                                       ; +0x13, 0x180023a53\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x16, 0x180023a56\nlea     rdx, [rsp+58h+arg_10]                                          ; +0x1b, 0x180023a5b\nmov     rcx, rax                                                       ; +0x20, 0x180023a60\ncall    ?getWinSizeInPixels@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSizeInPixels(void) ; +0x23, 0x180023a63\ncvttss2si rcx, [rsp+58h+arg_10]                                        ; +0x28, 0x180023a68\ncall    sub_1800992B0                                                  ; +0x2f, 0x180023a6f\nmov     ebp, eax                                                       ; +0x34, 0x180023a74\ncvttss2si rcx, [rsp+58h+arg_14]                                        ; +0x36, 0x180023a76\ncall    sub_1800992B0                                                  ; +0x3d, 0x180023a7d\nmov     r14d, eax                                                      ; +0x42, 0x180023a82\nmov     r8d, eax                                                       ; +0x45, 0x180023a85\nimul    r8d, ebp                                                       ; +0x48, 0x180023a88\nshl     r8d, 2                                                         ; +0x4c, 0x180023a8c\nmovsxd  rcx, r8d; Count                                                ; +0x50, 0x180023a90\nmov     edx, 1; Size                                                   ; +0x53, 0x180023a93\ncall    cs:calloc                                                      ; +0x58, 0x180023a98\nmov     rsi, rax                                                       ; +0x5e, 0x180023a9e\ntest    rax, rax                                                       ; +0x61, 0x180023aa1\njnz     short loc_180023AC1                                            ; +0x64, 0x180023aa4\nmov     rcx, rdi; this                                                 ; +0x66, 0x180023aa6\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x69, 0x180023aa9\nxor     al, al                                                         ; +0x6e, 0x180023aae\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x70, 0x180023ab0\nadd     rsp, 30h                                                       ; +0x75, 0x180023ab5\npop     r15                                                            ; +0x79, 0x180023ab9\npop     r14                                                            ; +0x7b, 0x180023abb\npop     rdi                                                            ; +0x7d, 0x180023abd\npop     rsi                                                            ; +0x7e, 0x180023abe\npop     rbp                                                            ; +0x7f, 0x180023abf\nretn                                                                   ; +0x80, 0x180023ac0\nmov     ecx, 68h ; 'h'; Size                                           ; +0x81, 0x180023ac1\ncall    sub_1800E4AC0                                                  ; +0x86, 0x180023ac6\nmov     [rsp+58h+arg_18], rax                                          ; +0x8b, 0x180023acb\ntest    rax, rax                                                       ; +0x90, 0x180023ad0\njz      short loc_180023AE2                                            ; +0x93, 0x180023ad3\nmov     rcx, rax; this                                                 ; +0x95, 0x180023ad5\ncall    ??0CCTexture2D@cocos2d@@QEAA@XZ; cocos2d::CCTexture2D::CCTexture2D(void) ; +0x98, 0x180023ad8\nmov     rbx, rax                                                       ; +0x9d, 0x180023add\njmp     short loc_180023AE4                                            ; +0xa0, 0x180023ae0\nxor     ebx, ebx                                                       ; +0xa2, 0x180023ae2\nlea     rax, [rsp+58h+arg_10]                                          ; +0xa4, 0x180023ae4\nmov     [rsp+58h+var_30], rax                                          ; +0xa9, 0x180023ae9\nmov     [rsp+58h+var_38], r14d                                         ; +0xae, 0x180023aee\nmov     r9d, ebp                                                       ; +0xb3, 0x180023af3\nxor     r8d, r8d                                                       ; +0xb6, 0x180023af6\nmov     rdx, rsi                                                       ; +0xb9, 0x180023af9\nmov     rcx, rbx                                                       ; +0xbc, 0x180023afc\ncall    ?initWithData@CCTexture2D@cocos2d@@QEAA_NPEBXW4CCTexture2DPixelFormat@2@IIAEBVCCSize@2@@Z; cocos2d::CCTexture2D::initWithData(void const *,cocos2d::CCTexture2DPixelFormat,uint,uint,cocos2d::CCSize const &) ; +0xbf, 0x180023aff\nmov     rcx, rsi; Block                                                ; +0xc4, 0x180023b04\ncall    cs:__imp_free                                                  ; +0xc7, 0x180023b07\ntest    rbx, rbx                                                       ; +0xcd, 0x180023b0d\njz      short loc_180023AAE                                            ; +0xd0, 0x180023b10\nxor     r9d, r9d; bool                                                 ; +0xd2, 0x180023b12\nmov     r8, rbx; struct cocos2d::CCTexture2D *                         ; +0xd5, 0x180023b15\nmov     rdx, r15; struct cocos2d::CCSize *                             ; +0xd8, 0x180023b18\nmov     rcx, rdi; this                                                 ; +0xdb, 0x180023b1b\ncall    ?initWithSize@CCGridBase@cocos2d@@QEAA_NAEBVCCSize@2@PEAVCCTexture2D@2@_N@Z; cocos2d::CCGridBase::initWithSize(cocos2d::CCSize const &,cocos2d::CCTexture2D *,bool) ; +0xde, 0x180023b1e\nmov     rcx, rbx; this                                                 ; +0xe3, 0x180023b23\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xe6, 0x180023b26\nmov     al, 1                                                          ; +0xeb, 0x180023b2b\nmov     rbx, [rsp+58h+arg_0]                                           ; +0xed, 0x180023b2d\nadd     rsp, 30h                                                       ; +0xf2, 0x180023b32\npop     r15                                                            ; +0xf6, 0x180023b36\npop     r14                                                            ; +0xf8, 0x180023b38\npop     rdi                                                            ; +0xfa, 0x180023b3a\npop     rsi                                                            ; +0xfb, 0x180023b3b\npop     rbp                                                            ; +0xfc, 0x180023b3c\nretn                                                                   ; +0xfd, 0x180023b3d", "xrefs": ["cocos2d::CCGrid3D::create @ 0x1800236ab", "cocos2d::CCGridBase::create @ 0x18002380d", "cocos2d::CCTiledGrid3D::create @ 0x18002394b", "<???> @ 0x18014cf68", "<???> @ 0x1801b9130"], "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"}