{"type": "func", "start": 6443169232, "end": 6443169595, "name": "cocos2d::CCTMXLayer::appendTileForGID", "pseudocode": "// \n// cocos2d::CCTMXLayer::appendTileForGID from 0x1800af5d0 to 0x1800af73b (363 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::setupTiles @ 0x1800b0ba7\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c237c\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:22:19 +0000\n// \n\nstruct cocos2d::CCSprite *__fastcall cocos2d::CCTMXLayer::appendTileForGID(\n        cocos2d::CCTMXLayer *this,\n        unsigned int a2,\n        const struct cocos2d::CCPoint *a3)\n{\n  cocos2d::CCDirector *v6; // rax\n  float ContentScaleFactor; // xmm0_4\n  float v8; // xmm8_4\n  cocos2d::CCDirector *v9; // rax\n  float v10; // xmm0_4\n  float v11; // xmm7_4\n  cocos2d::CCDirector *v12; // rax\n  float v13; // xmm0_4\n  float v14; // xmm6_4\n  cocos2d::CCDirector *v15; // rax\n  float v16; // xmm0_4\n  cocos2d::CCRect *v17; // rax\n  __int64 v18; // rsi\n  cocos2d::CCRect *v19; // rax\n  struct cocos2d::CCSprite *v20; // rdi\n  _DWORD *v21; // rax\n  float v23[4]; // [rsp+30h] [rbp-68h] BYREF\n  _BYTE v24[16]; // [rsp+40h] [rbp-58h] BYREF\n  int v25; // [rsp+A0h] [rbp+8h] BYREF\n\n  cocos2d::CCTMXTilesetInfo::rectForGID(*((_QWORD *)this + 48), v23, a2);\n  v6 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v6);\n  v8 = v23[3] / ContentScaleFactor;\n  v9 = cocos2d::CCDirector::sharedDirector();\n  v10 = cocos2d::CCDirector::getContentScaleFactor(v9);\n  v11 = v23[2] / v10;\n  v12 = cocos2d::CCDirector::sharedDirector();\n  v13 = cocos2d::CCDirector::getContentScaleFactor(v12);\n  v14 = v23[1] / v13;\n  v15 = cocos2d::CCDirector::sharedDirector();\n  v16 = cocos2d::CCDirector::getContentScaleFactor(v15);\n  v17 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v24, v23[0] / v16, v14, v11, v8);\n  cocos2d::CCRect::operator=((__int64)v23, (__int64)v17);\n  v18 = (unsigned int)(int)(float)((float)(*((float *)this + 90) * *((float *)a3 + 1)) + *(float *)a3);\n  v19 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v24, (const struct cocos2d::CCRect *)v23);\n  v20 = (struct cocos2d::CCSprite *)cocos2d::CCTMXLayer::reusedTileWithRect(this, v19);\n  v21 = cocos2d::cc_timeval::operator=(&v25, a3);\n  cocos2d::CCTMXLayer::setupTileSprite(this, v20, v21, a2);\n  LODWORD(a3) = **((_DWORD **)this + 59);\n  cocos2d::CCSpriteBatchNode::insertQuadFromSprite(this, v20, (unsigned int)a3);\n  sub_1800A1EA0(*((int **)this + 59), v18, (unsigned int)a3);\n  return v20;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::appendTileForGID from 0x1800af5d0 to 0x1800af73b (363 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::setupTiles @ 0x1800b0ba7\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c237c\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:22:19 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800af5d0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1800af5d5\npush    rsi                                                            ; +0xa, 0x1800af5da\npush    rdi                                                            ; +0xb, 0x1800af5db\npush    r14                                                            ; +0xc, 0x1800af5dc\nsub     rsp, 80h                                                       ; +0xe, 0x1800af5de\nmovaps  [rsp+98h+var_28], xmm6                                         ; +0x15, 0x1800af5e5\nmov     rbx, r8                                                        ; +0x1a, 0x1800af5ea\nmov     r8d, edx                                                       ; +0x1d, 0x1800af5ed\nmovaps  [rsp+98h+var_38], xmm7                                         ; +0x20, 0x1800af5f0\nmov     ebp, edx                                                       ; +0x25, 0x1800af5f5\nmovaps  [rsp+98h+var_48], xmm8                                         ; +0x27, 0x1800af5f7\nmov     r14, rcx                                                       ; +0x2d, 0x1800af5fd\nlea     rdx, [rsp+98h+var_68]                                          ; +0x30, 0x1800af600\nmov     rcx, [rcx+180h]                                                ; +0x35, 0x1800af605\ncall    ?rectForGID@CCTMXTilesetInfo@cocos2d@@QEAA?AVCCRect@2@I@Z; cocos2d::CCTMXTilesetInfo::rectForGID(uint) ; +0x3c, 0x1800af60c\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x41, 0x1800af611\nmov     rcx, rax; this                                                 ; +0x46, 0x1800af616\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x49, 0x1800af619\nmovss   xmm8, [rsp+98h+var_5C]                                         ; +0x4e, 0x1800af61e\ndivss   xmm8, xmm0                                                     ; +0x55, 0x1800af625\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x5a, 0x1800af62a\nmov     rcx, rax; this                                                 ; +0x5f, 0x1800af62f\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x62, 0x1800af632\nmovss   xmm7, [rsp+98h+var_60]                                         ; +0x67, 0x1800af637\ndivss   xmm7, xmm0                                                     ; +0x6d, 0x1800af63d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x71, 0x1800af641\nmov     rcx, rax; this                                                 ; +0x76, 0x1800af646\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x79, 0x1800af649\nmovss   xmm6, [rsp+98h+var_64]                                         ; +0x7e, 0x1800af64e\ndivss   xmm6, xmm0                                                     ; +0x84, 0x1800af654\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x88, 0x1800af658\nmov     rcx, rax; this                                                 ; +0x8d, 0x1800af65d\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x90, 0x1800af660\nlea     rcx, [rsp+98h+var_58]; this                                    ; +0x95, 0x1800af665\nmovss   xmm1, [rsp+98h+var_68]                                         ; +0x9a, 0x1800af66a\nmovaps  xmm3, xmm7; float                                              ; +0xa0, 0x1800af670\ndivss   xmm1, xmm0; float                                              ; +0xa3, 0x1800af673\nmovaps  xmm2, xmm6; float                                              ; +0xa7, 0x1800af677\nmovss   [rsp+98h+var_78], xmm8; float                                  ; +0xaa, 0x1800af67a\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xb1, 0x1800af681\nmov     rdx, rax                                                       ; +0xb6, 0x1800af686\nlea     rcx, [rsp+98h+var_68]                                          ; +0xb9, 0x1800af689\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0xbe, 0x1800af68e\nmovss   xmm0, dword ptr [r14+168h]                                     ; +0xc3, 0x1800af693\nlea     rdx, [rsp+98h+var_68]; struct cocos2d::CCRect *                ; +0xcc, 0x1800af69c\nmulss   xmm0, dword ptr [rbx+4]                                        ; +0xd1, 0x1800af6a1\nlea     rcx, [rsp+98h+var_58]; this                                    ; +0xd6, 0x1800af6a6\naddss   xmm0, dword ptr [rbx]                                          ; +0xdb, 0x1800af6ab\ncvttss2si rsi, xmm0                                                    ; +0xdf, 0x1800af6af\ncall    ??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0xe4, 0x1800af6b4\nmov     rdx, rax                                                       ; +0xe9, 0x1800af6b9\nmov     rcx, r14                                                       ; +0xec, 0x1800af6bc\ncall    ?reusedTileWithRect@CCTMXLayer@cocos2d@@AEAAPEAVCCSprite@2@VCCRect@2@@Z; cocos2d::CCTMXLayer::reusedTileWithRect(cocos2d::CCRect) ; +0xef, 0x1800af6bf\nmov     rdx, rbx                                                       ; +0xf4, 0x1800af6c4\nlea     rcx, [rsp+98h+arg_0]                                           ; +0xf7, 0x1800af6c7\nmov     rdi, rax                                                       ; +0xff, 0x1800af6cf\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x102, 0x1800af6d2\nmov     r8, rax                                                        ; +0x107, 0x1800af6d7\nmov     r9d, ebp                                                       ; +0x10a, 0x1800af6da\nmov     rdx, rdi                                                       ; +0x10d, 0x1800af6dd\nmov     rcx, r14                                                       ; +0x110, 0x1800af6e0\ncall    ?setupTileSprite@CCTMXLayer@cocos2d@@AEAAXPEAVCCSprite@2@VCCPoint@2@I@Z; cocos2d::CCTMXLayer::setupTileSprite(cocos2d::CCSprite *,cocos2d::CCPoint,uint) ; +0x113, 0x1800af6e3\nmov     rcx, [r14+1D8h]                                                ; +0x118, 0x1800af6e8\nmov     rdx, rdi; struct cocos2d::CCSprite *                           ; +0x11f, 0x1800af6ef\nmov     ebx, [rcx]                                                     ; +0x122, 0x1800af6f2\nmov     r8d, ebx; unsigned int                                         ; +0x124, 0x1800af6f4\nmov     rcx, r14; this                                                 ; +0x127, 0x1800af6f7\ncall    ?insertQuadFromSprite@CCSpriteBatchNode@cocos2d@@IEAAXPEAVCCSprite@2@I@Z; cocos2d::CCSpriteBatchNode::insertQuadFromSprite(cocos2d::CCSprite *,uint) ; +0x12a, 0x1800af6fa\nmov     rcx, [r14+1D8h]                                                ; +0x12f, 0x1800af6ff\nmov     r8d, ebx                                                       ; +0x136, 0x1800af706\nmov     rdx, rsi                                                       ; +0x139, 0x1800af709\ncall    sub_1800A1EA0                                                  ; +0x13c, 0x1800af70c\nmovaps  xmm6, [rsp+98h+var_28]                                         ; +0x141, 0x1800af711\nlea     r11, [rsp+98h+var_18]                                          ; +0x146, 0x1800af716\nmov     rbx, [r11+28h]                                                 ; +0x14e, 0x1800af71e\nmov     rax, rdi                                                       ; +0x152, 0x1800af722\nmov     rbp, [r11+30h]                                                 ; +0x155, 0x1800af725\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x159, 0x1800af729\nmovaps  xmm7, [rsp+98h+var_38]                                         ; +0x15e, 0x1800af72e\nmov     rsp, r11                                                       ; +0x163, 0x1800af733\npop     r14                                                            ; +0x166, 0x1800af736\npop     rdi                                                            ; +0x168, 0x1800af738\npop     rsi                                                            ; +0x169, 0x1800af739\nretn                                                                   ; +0x16a, 0x1800af73a", "xrefs": ["cocos2d::CCTMXLayer::setupTiles @ 0x1800b0ba7", "<???> @ 0x18014cf68", "<???> @ 0x1801c237c"], "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"}