{"type": "func", "start": 6443154912, "end": 6443155275, "name": "cocos2d::CCTMXLayer::appendTileForGID", "pseudocode": "// \n// cocos2d::CCTMXLayer::appendTileForGID from 0x1800abde0 to 0x1800abf4b (363 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::setupTiles @ 0x1800ad347\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b80b8\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\nstruct cocos2d::CCSprite *__fastcall cocos2d::CCTMXLayer::appendTileForGID(\n        cocos2d::CCTMXLayer *this,\n        unsigned int a2,\n        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  struct cocos2d::CCRect *v19; // rax\n  cocos2d::CCSprite *v20; // rdi\n  _DWORD *v21; // rax\n  struct cocos2d::CCRect v23; // [rsp+30h] [rbp-68h] BYREF\n  cocos2d::CCRect v24; // [rsp+40h] [rbp-58h] BYREF\n  int v25; // [rsp+A0h] [rbp+8h] BYREF\n\n  cocos2d::CCTMXTilesetInfo::rectForGID(*((struct cocos2d::CCRect **)this + 48), (unsigned int)&v23);\n  v6 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v6);\n  v8 = v23.size.height / ContentScaleFactor;\n  v9 = cocos2d::CCDirector::sharedDirector();\n  v10 = cocos2d::CCDirector::getContentScaleFactor(v9);\n  v11 = v23.size.width / v10;\n  v12 = cocos2d::CCDirector::sharedDirector();\n  v13 = cocos2d::CCDirector::getContentScaleFactor(v12);\n  v14 = v23.origin.y / v13;\n  v15 = cocos2d::CCDirector::sharedDirector();\n  v16 = cocos2d::CCDirector::getContentScaleFactor(v15);\n  v17 = cocos2d::CCRect::CCRect(&v24, v23.origin.x / v16, v14, v11, v8);\n  cocos2d::CCRect::operator=((float *)&v23.origin, (float *)&v17->origin);\n  v18 = (unsigned int)(int)(float)((float)(*((float *)this + 90) * a3->y) + a3->x);\n  v19 = cocos2d::CCRect::CCRect(&v24, &v23);\n  v20 = cocos2d::CCTMXLayer::reusedTileWithRect(this, v19);\n  v21 = cocos2d::cc_timeval::operator=(&v25, a3);\n  cocos2d::CCTMXLayer::setupTileSprite(this, v20, (struct cocos2d::CCPoint)v21, a2);\n  LODWORD(a3) = **((_DWORD **)this + 59);\n  cocos2d::CCSpriteBatchNode::insertQuadFromSprite(this, v20, (unsigned int)a3);\n  sub_18009E210(*((int **)this + 59), v18, (unsigned int)a3);\n  return v20;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::appendTileForGID from 0x1800abde0 to 0x1800abf4b (363 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::setupTiles @ 0x1800ad347\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b80b8\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_8], rbx                                               ; +0x0, 0x1800abde0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1800abde5\npush    rsi                                                            ; +0xa, 0x1800abdea\npush    rdi                                                            ; +0xb, 0x1800abdeb\npush    r14                                                            ; +0xc, 0x1800abdec\nsub     rsp, 80h                                                       ; +0xe, 0x1800abdee\nmovaps  [rsp+98h+var_28], xmm6                                         ; +0x15, 0x1800abdf5\nmov     rbx, r8                                                        ; +0x1a, 0x1800abdfa\nmov     r8d, edx                                                       ; +0x1d, 0x1800abdfd\nmovaps  [rsp+98h+var_38], xmm7                                         ; +0x20, 0x1800abe00\nmov     ebp, edx                                                       ; +0x25, 0x1800abe05\nmovaps  [rsp+98h+var_48], xmm8                                         ; +0x27, 0x1800abe07\nmov     r14, rcx                                                       ; +0x2d, 0x1800abe0d\nlea     rdx, [rsp+98h+var_68]                                          ; +0x30, 0x1800abe10\nmov     rcx, [rcx+180h]                                                ; +0x35, 0x1800abe15\ncall    ?rectForGID@CCTMXTilesetInfo@cocos2d@@QEAA?AVCCRect@2@I@Z; cocos2d::CCTMXTilesetInfo::rectForGID(uint) ; +0x3c, 0x1800abe1c\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x41, 0x1800abe21\nmov     rcx, rax; this                                                 ; +0x46, 0x1800abe26\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x49, 0x1800abe29\nmovss   xmm8, [rsp+98h+var_5C]                                         ; +0x4e, 0x1800abe2e\ndivss   xmm8, xmm0                                                     ; +0x55, 0x1800abe35\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x5a, 0x1800abe3a\nmov     rcx, rax; this                                                 ; +0x5f, 0x1800abe3f\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x62, 0x1800abe42\nmovss   xmm7, [rsp+98h+var_60]                                         ; +0x67, 0x1800abe47\ndivss   xmm7, xmm0                                                     ; +0x6d, 0x1800abe4d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x71, 0x1800abe51\nmov     rcx, rax; this                                                 ; +0x76, 0x1800abe56\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x79, 0x1800abe59\nmovss   xmm6, [rsp+98h+var_64]                                         ; +0x7e, 0x1800abe5e\ndivss   xmm6, xmm0                                                     ; +0x84, 0x1800abe64\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x88, 0x1800abe68\nmov     rcx, rax; this                                                 ; +0x8d, 0x1800abe6d\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x90, 0x1800abe70\nlea     rcx, [rsp+98h+var_58]; this                                    ; +0x95, 0x1800abe75\nmovss   xmm1, [rsp+98h+var_68]                                         ; +0x9a, 0x1800abe7a\nmovaps  xmm3, xmm7; float                                              ; +0xa0, 0x1800abe80\ndivss   xmm1, xmm0; float                                              ; +0xa3, 0x1800abe83\nmovaps  xmm2, xmm6; float                                              ; +0xa7, 0x1800abe87\nmovss   [rsp+98h+var_78], xmm8; float                                  ; +0xaa, 0x1800abe8a\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xb1, 0x1800abe91\nmov     rdx, rax                                                       ; +0xb6, 0x1800abe96\nlea     rcx, [rsp+98h+var_68]                                          ; +0xb9, 0x1800abe99\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0xbe, 0x1800abe9e\nmovss   xmm0, dword ptr [r14+168h]                                     ; +0xc3, 0x1800abea3\nlea     rdx, [rsp+98h+var_68]; struct cocos2d::CCRect *                ; +0xcc, 0x1800abeac\nmulss   xmm0, dword ptr [rbx+4]                                        ; +0xd1, 0x1800abeb1\nlea     rcx, [rsp+98h+var_58]; this                                    ; +0xd6, 0x1800abeb6\naddss   xmm0, dword ptr [rbx]                                          ; +0xdb, 0x1800abebb\ncvttss2si rsi, xmm0                                                    ; +0xdf, 0x1800abebf\ncall    ??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0xe4, 0x1800abec4\nmov     rdx, rax                                                       ; +0xe9, 0x1800abec9\nmov     rcx, r14                                                       ; +0xec, 0x1800abecc\ncall    ?reusedTileWithRect@CCTMXLayer@cocos2d@@AEAAPEAVCCSprite@2@VCCRect@2@@Z; cocos2d::CCTMXLayer::reusedTileWithRect(cocos2d::CCRect) ; +0xef, 0x1800abecf\nmov     rdx, rbx                                                       ; +0xf4, 0x1800abed4\nlea     rcx, [rsp+98h+arg_0]                                           ; +0xf7, 0x1800abed7\nmov     rdi, rax                                                       ; +0xff, 0x1800abedf\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x102, 0x1800abee2\nmov     r8, rax                                                        ; +0x107, 0x1800abee7\nmov     r9d, ebp                                                       ; +0x10a, 0x1800abeea\nmov     rdx, rdi                                                       ; +0x10d, 0x1800abeed\nmov     rcx, r14                                                       ; +0x110, 0x1800abef0\ncall    ?setupTileSprite@CCTMXLayer@cocos2d@@AEAAXPEAVCCSprite@2@VCCPoint@2@I@Z; cocos2d::CCTMXLayer::setupTileSprite(cocos2d::CCSprite *,cocos2d::CCPoint,uint) ; +0x113, 0x1800abef3\nmov     rcx, [r14+1D8h]                                                ; +0x118, 0x1800abef8\nmov     rdx, rdi; struct cocos2d::CCSprite *                           ; +0x11f, 0x1800abeff\nmov     ebx, [rcx]                                                     ; +0x122, 0x1800abf02\nmov     r8d, ebx; unsigned int                                         ; +0x124, 0x1800abf04\nmov     rcx, r14; this                                                 ; +0x127, 0x1800abf07\ncall    ?insertQuadFromSprite@CCSpriteBatchNode@cocos2d@@IEAAXPEAVCCSprite@2@I@Z; cocos2d::CCSpriteBatchNode::insertQuadFromSprite(cocos2d::CCSprite *,uint) ; +0x12a, 0x1800abf0a\nmov     rcx, [r14+1D8h]                                                ; +0x12f, 0x1800abf0f\nmov     r8d, ebx                                                       ; +0x136, 0x1800abf16\nmov     rdx, rsi                                                       ; +0x139, 0x1800abf19\ncall    sub_18009E210                                                  ; +0x13c, 0x1800abf1c\nmovaps  xmm6, [rsp+98h+var_28]                                         ; +0x141, 0x1800abf21\nlea     r11, [rsp+98h+var_18]                                          ; +0x146, 0x1800abf26\nmov     rbx, [r11+28h]                                                 ; +0x14e, 0x1800abf2e\nmov     rax, rdi                                                       ; +0x152, 0x1800abf32\nmov     rbp, [r11+30h]                                                 ; +0x155, 0x1800abf35\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x159, 0x1800abf39\nmovaps  xmm7, [rsp+98h+var_38]                                         ; +0x15e, 0x1800abf3e\nmov     rsp, r11                                                       ; +0x163, 0x1800abf43\npop     r14                                                            ; +0x166, 0x1800abf46\npop     rdi                                                            ; +0x168, 0x1800abf48\npop     rsi                                                            ; +0x169, 0x1800abf49\nretn                                                                   ; +0x16a, 0x1800abf4a", "xrefs": ["cocos2d::CCTMXLayer::setupTiles @ 0x1800ad347", "<???> @ 0x1801438a8", "<???> @ 0x1801b80b8"], "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"}