{"type": "func", "start": 6443175664, "end": 6443176000, "name": "cocos2d::CCTMXLayer::updateTileForGID", "pseudocode": "// \n// cocos2d::CCTMXLayer::updateTileForGID from 0x1800b0ef0 to 0x1800b1040 (336 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::setTileGID @ 0x1800b0830\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c2550\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::updateTileForGID(\n        cocos2d::CCTMXLayer *this,\n        unsigned int a2,\n        const struct cocos2d::CCPoint *a3)\n{\n  cocos2d::CCRect *v6; // rax\n  float v7; // xmm0_4\n  cocos2d::CCRect *v8; // rax\n  cocos2d::CCSprite *v9; // rdi\n  float *v10; // rax\n  const void **v11; // rdx\n  void *v12; // rax\n  __int64 v13; // rdx\n  float v15[4]; // [rsp+30h] [rbp-38h] BYREF\n  _BYTE v16[16]; // [rsp+40h] [rbp-28h] BYREF\n  int v17; // [rsp+70h] [rbp+8h] BYREF\n  int Key; // [rsp+78h] [rbp+10h] BYREF\n\n  cocos2d::CCTMXTilesetInfo::rectForGID(*((_QWORD *)this + 48), v15, a2);\n  v6 = cocos2d::CCRect::CCRect(\n         (cocos2d::CCRect *)v16,\n         v15[0] / *((float *)this + 120),\n         v15[1] / *((float *)this + 120),\n         v15[2] / *((float *)this + 120),\n         v15[3] / *((float *)this + 120));\n  cocos2d::CCRect::operator=((__int64)v15, (__int64)v6);\n  v7 = (float)(*((float *)this + 90) * *((float *)a3 + 1)) + *(float *)a3;\n  v8 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v16, (const struct cocos2d::CCRect *)v15);\n  v9 = (cocos2d::CCSprite *)cocos2d::CCTMXLayer::reusedTileWithRect((__int64)this, (__int64)v8);\n  v10 = (float *)cocos2d::cc_timeval::operator=(&v17, a3);\n  cocos2d::CCTMXLayer::setupTileSprite((unsigned __int8 *)this, v9, v10, a2);\n  v11 = *((const void ***)this + 59);\n  Key = (int)v7;\n  v12 = bsearch(&Key, v11[2], *(unsigned int *)v11, 8u, (_CoreCrtNonSecureSearchSortCompareFunction)CompareFunction);\n  LOBYTE(v13) = 1;\n  *((_DWORD *)v9 + 90) = ((unsigned __int64)v12 - *(_QWORD *)(*((_QWORD *)this + 59) + 16LL)) >> 3;\n  (*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(*(_QWORD *)v9 + 1048LL))(v9, v13);\n  (*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v9 + 784LL))(v9);\n  *(_DWORD *)(*((_QWORD *)this + 47) + 4LL * (int)v7) = a2;\n  return v9;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::updateTileForGID from 0x1800b0ef0 to 0x1800b1040 (336 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::setTileGID @ 0x1800b0830\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c2550\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_10], rbx                                              ; +0x0, 0x1800b0ef0\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x1800b0ef5\npush    rsi                                                            ; +0xa, 0x1800b0efa\npush    rdi                                                            ; +0xb, 0x1800b0efb\npush    r14                                                            ; +0xc, 0x1800b0efc\nsub     rsp, 50h                                                       ; +0xe, 0x1800b0efe\nmov     rbx, r8                                                        ; +0x12, 0x1800b0f02\nmov     r14d, edx                                                      ; +0x15, 0x1800b0f05\nmov     r8d, edx                                                       ; +0x18, 0x1800b0f08\nmov     rbp, rcx                                                       ; +0x1b, 0x1800b0f0b\nmov     rcx, [rcx+180h]                                                ; +0x1e, 0x1800b0f0e\nlea     rdx, [rsp+68h+var_38]                                          ; +0x25, 0x1800b0f15\ncall    ?rectForGID@CCTMXTilesetInfo@cocos2d@@QEAA?AVCCRect@2@I@Z; cocos2d::CCTMXTilesetInfo::rectForGID(uint) ; +0x2a, 0x1800b0f1a\nmovss   xmm0, dword ptr [rbp+1E0h]                                     ; +0x2f, 0x1800b0f1f\nlea     rcx, [rsp+68h+var_28]; this                                    ; +0x37, 0x1800b0f27\nmovss   xmm4, [rsp+68h+var_2C]                                         ; +0x3c, 0x1800b0f2c\nmovss   xmm3, [rsp+68h+var_30]                                         ; +0x42, 0x1800b0f32\nmovss   xmm2, [rsp+68h+var_34]                                         ; +0x48, 0x1800b0f38\nmovss   xmm1, [rsp+68h+var_38]                                         ; +0x4e, 0x1800b0f3e\ndivss   xmm4, xmm0                                                     ; +0x54, 0x1800b0f44\ndivss   xmm3, xmm0; float                                              ; +0x58, 0x1800b0f48\ndivss   xmm2, xmm0; float                                              ; +0x5c, 0x1800b0f4c\ndivss   xmm1, xmm0; float                                              ; +0x60, 0x1800b0f50\nmovss   dword ptr [rsp+68h+CompareFunction], xmm4; float               ; +0x64, 0x1800b0f54\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0x6a, 0x1800b0f5a\nmov     rdx, rax                                                       ; +0x6f, 0x1800b0f5f\nlea     rcx, [rsp+68h+var_38]                                          ; +0x72, 0x1800b0f62\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x77, 0x1800b0f67\nmovss   xmm0, dword ptr [rbp+168h]                                     ; +0x7c, 0x1800b0f6c\nlea     rdx, [rsp+68h+var_38]; struct cocos2d::CCRect *                ; +0x84, 0x1800b0f74\nmulss   xmm0, dword ptr [rbx+4]                                        ; +0x89, 0x1800b0f79\nlea     rcx, [rsp+68h+var_28]; this                                    ; +0x8e, 0x1800b0f7e\naddss   xmm0, dword ptr [rbx]                                          ; +0x93, 0x1800b0f83\ncvttss2si esi, xmm0                                                    ; +0x97, 0x1800b0f87\ncall    ??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x9b, 0x1800b0f8b\nmov     rdx, rax                                                       ; +0xa0, 0x1800b0f90\nmov     rcx, rbp                                                       ; +0xa3, 0x1800b0f93\ncall    ?reusedTileWithRect@CCTMXLayer@cocos2d@@AEAAPEAVCCSprite@2@VCCRect@2@@Z; cocos2d::CCTMXLayer::reusedTileWithRect(cocos2d::CCRect) ; +0xa6, 0x1800b0f96\nmov     rdx, rbx                                                       ; +0xab, 0x1800b0f9b\nlea     rcx, [rsp+68h+arg_0]                                           ; +0xae, 0x1800b0f9e\nmov     rdi, rax                                                       ; +0xb3, 0x1800b0fa3\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0xb6, 0x1800b0fa6\nmov     r8, rax                                                        ; +0xbb, 0x1800b0fab\nmov     r9d, r14d                                                      ; +0xbe, 0x1800b0fae\nmov     rdx, rdi                                                       ; +0xc1, 0x1800b0fb1\nmov     rcx, rbp                                                       ; +0xc4, 0x1800b0fb4\ncall    ?setupTileSprite@CCTMXLayer@cocos2d@@AEAAXPEAVCCSprite@2@VCCPoint@2@I@Z; cocos2d::CCTMXLayer::setupTileSprite(cocos2d::CCSprite *,cocos2d::CCPoint,uint) ; +0xc7, 0x1800b0fb7\nmov     rdx, [rbp+1D8h]                                                ; +0xcc, 0x1800b0fbc\nlea     rax, CompareFunction                                           ; +0xd3, 0x1800b0fc3\nmov     [rsp+68h+Key], esi                                             ; +0xda, 0x1800b0fca\nlea     rcx, [rsp+68h+Key]; Key                                        ; +0xde, 0x1800b0fce\nmov     r9d, 8; SizeOfElements                                         ; +0xe3, 0x1800b0fd3\nmov     [rsp+68h+CompareFunction], rax; CompareFunction                ; +0xe9, 0x1800b0fd9\nmov     r8d, [rdx]; NumOfElements                                      ; +0xee, 0x1800b0fde\nmov     rdx, [rdx+10h]; Base                                           ; +0xf1, 0x1800b0fe1\ncall    cs:bsearch                                                     ; +0xf5, 0x1800b0fe5\nmov     rcx, [rbp+1D8h]                                                ; +0xfb, 0x1800b0feb\nmov     dl, 1                                                          ; +0x102, 0x1800b0ff2\nsub     rax, [rcx+10h]                                                 ; +0x104, 0x1800b0ff4\nmov     rcx, rdi                                                       ; +0x108, 0x1800b0ff8\nshr     rax, 3                                                         ; +0x10b, 0x1800b0ffb\nmov     [rdi+168h], eax                                                ; +0x10f, 0x1800b0fff\nmov     rax, [rdi]                                                     ; +0x115, 0x1800b1005\ncall    qword ptr [rax+418h]                                           ; +0x118, 0x1800b1008\nmov     rax, [rdi]                                                     ; +0x11e, 0x1800b100e\nmov     rcx, rdi                                                       ; +0x121, 0x1800b1011\ncall    qword ptr [rax+310h]                                           ; +0x124, 0x1800b1014\nmov     rax, [rbp+178h]                                                ; +0x12a, 0x1800b101a\nlea     r11, [rsp+68h+var_18]                                          ; +0x131, 0x1800b1021\nmov     rbx, [r11+30h]                                                 ; +0x136, 0x1800b1026\nmov     rbp, [r11+38h]                                                 ; +0x13a, 0x1800b102a\nmovsxd  rcx, esi                                                       ; +0x13e, 0x1800b102e\nmov     [rax+rcx*4], r14d                                              ; +0x141, 0x1800b1031\nmov     rax, rdi                                                       ; +0x145, 0x1800b1035\nmov     rsp, r11                                                       ; +0x148, 0x1800b1038\npop     r14                                                            ; +0x14b, 0x1800b103b\npop     rdi                                                            ; +0x14d, 0x1800b103d\npop     rsi                                                            ; +0x14e, 0x1800b103e\nretn                                                                   ; +0x14f, 0x1800b103f", "xrefs": ["cocos2d::CCTMXLayer::setTileGID @ 0x1800b0830", "<???> @ 0x18014cf68", "<???> @ 0x1801c2550"], "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"}