{"type": "func", "start": 6443171632, "end": 6443172083, "name": "cocos2d::CCTMXLayer::positionAt", "pseudocode": "// \n// cocos2d::CCTMXLayer::positionAt from 0x1800aff30 to 0x1800b00f3 (451 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b0884\n// > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b0988\n// > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b09a1\n// > cocos2d::CCTMXLayer::tileAt @ 0x1800b0d99\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c2400\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\n__int64 __fastcall cocos2d::CCTMXLayer::positionAt(__int64 a1, __int64 a2, float *a3)\n{\n  int v6; // ecx\n  int v7; // ecx\n  float v8; // xmm2_4\n  float v9; // xmm1_4\n  float v10; // xmm0_4\n  float v11; // xmm7_4\n  cocos2d::CCDirector *v12; // rax\n  float ContentScaleFactor; // xmm0_4\n  float v14; // xmm6_4\n  float v15; // xmm7_4\n  cocos2d::CCDirector *v16; // rax\n  float v17; // xmm0_4\n  float *v18; // rax\n  int v20; // [rsp+50h] [rbp+8h] BYREF\n\n  cocos2d::cc_timeval::operator=((_DWORD *)a2, dword_1801B3B28);\n  v6 = *(_DWORD *)(a1 + 392);\n  if ( !v6 )\n  {\n    v9 = *(float *)(a1 + 368) * *a3;\n    v8 = (float)((float)(*(float *)(a1 + 364) - a3[1]) - 1.0) * *(float *)(a1 + 372);\n    goto LABEL_9;\n  }\n  v7 = v6 - 1;\n  if ( !v7 )\n  {\n    v10 = 0.0;\n    if ( (int)*a3 % 2 == 1 )\n      v10 = (float)-*(float *)(a1 + 372) * 0.5;\n    v9 = (float)((float)(*a3 * *(float *)(a1 + 368)) * 3.0) * 0.25;\n    v8 = (float)((float)((float)(*(float *)(a1 + 364) - a3[1]) - 1.0) * *(float *)(a1 + 372)) + v10;\n    goto LABEL_9;\n  }\n  if ( v7 == 1 )\n  {\n    v8 = (float)((float)((float)((float)(*(float *)(a1 + 364) + *(float *)(a1 + 364)) - *a3) - a3[1]) - 2.0)\n       * (float)(*(float *)(a1 + 372) * 0.5);\n    v9 = (float)((float)((float)(*a3 + *(float *)(a1 + 360)) - a3[1]) - 1.0) * (float)(*(float *)(a1 + 368) * 0.5);\nLABEL_9:\n    kmVec2Fill((float *)&v20, v9, v8);\n    cocos2d::CCSize::operator=((_DWORD *)a2, &v20);\n  }\n  v11 = *(float *)(a2 + 4);\n  v12 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v12);\n  v14 = *(float *)a2;\n  v15 = v11 / ContentScaleFactor;\n  v16 = cocos2d::CCDirector::sharedDirector();\n  v17 = cocos2d::CCDirector::getContentScaleFactor(v16);\n  v18 = kmVec2Fill((float *)&v20, v14 / v17, v15);\n  cocos2d::CCSize::operator=((_DWORD *)a2, v18);\n  return a2;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::positionAt from 0x1800aff30 to 0x1800b00f3 (451 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b0884\n; > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b0988\n; > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b09a1\n; > cocos2d::CCTMXLayer::tileAt @ 0x1800b0d99\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c2400\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, 0x1800aff30\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800aff35\npush    rdi                                                            ; +0xa, 0x1800aff3a\nsub     rsp, 40h                                                       ; +0xb, 0x1800aff3b\nmov     rdi, rdx                                                       ; +0xf, 0x1800aff3f\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x12, 0x1800aff42\nmov     rbx, rcx                                                       ; +0x17, 0x1800aff47\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x1a, 0x1800aff4a\nmov     rcx, rdi                                                       ; +0x1f, 0x1800aff4f\nlea     rdx, dword_1801B3B28                                           ; +0x22, 0x1800aff52\nmov     rsi, r8                                                        ; +0x29, 0x1800aff59\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x2c, 0x1800aff5c\nmov     ecx, [rbx+188h]                                                ; +0x31, 0x1800aff61\ntest    ecx, ecx                                                       ; +0x37, 0x1800aff67\njz      loc_1800B0050                                                  ; +0x39, 0x1800aff69\nsub     ecx, 1                                                         ; +0x3f, 0x1800aff6f\njz      short loc_1800AFFE0                                            ; +0x42, 0x1800aff72\ncmp     ecx, 1                                                         ; +0x44, 0x1800aff74\njnz     loc_1800B0090                                                  ; +0x47, 0x1800aff77\nmovss   xmm1, dword ptr [rsi]                                          ; +0x4d, 0x1800aff7d\nmovss   xmm0, dword ptr [rbx+174h]                                     ; +0x51, 0x1800aff81\nmulss   xmm0, cs:dword_1800EC358                                       ; +0x59, 0x1800aff89\nmovss   xmm2, dword ptr [rbx+16Ch]                                     ; +0x61, 0x1800aff91\naddss   xmm2, xmm2                                                     ; +0x69, 0x1800aff99\nsubss   xmm2, xmm1                                                     ; +0x6d, 0x1800aff9d\naddss   xmm1, dword ptr [rbx+168h]                                     ; +0x71, 0x1800affa1\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0x79, 0x1800affa9\nsubss   xmm1, dword ptr [rsi+4]                                        ; +0x7e, 0x1800affae\nsubss   xmm2, cs:X                                                     ; +0x83, 0x1800affb3\nsubss   xmm1, cs:flt_1800EC208                                         ; +0x8b, 0x1800affbb\nmulss   xmm2, xmm0                                                     ; +0x93, 0x1800affc3\nmovss   xmm0, dword ptr [rbx+170h]                                     ; +0x97, 0x1800affc7\nmulss   xmm0, cs:dword_1800EC358                                       ; +0x9f, 0x1800affcf\nmulss   xmm1, xmm0                                                     ; +0xa7, 0x1800affd7\njmp     loc_1800B0079                                                  ; +0xab, 0x1800affdb\nmovss   xmm1, dword ptr [rsi]                                          ; +0xb0, 0x1800affe0\nxorps   xmm0, xmm0                                                     ; +0xb4, 0x1800affe4\ncvttss2si eax, xmm1                                                    ; +0xb7, 0x1800affe7\nand     eax, 80000001h                                                 ; +0xbb, 0x1800affeb\njge     short loc_1800AFFF9                                            ; +0xc0, 0x1800afff0\ndec     eax                                                            ; +0xc2, 0x1800afff2\nor      eax, 0FFFFFFFEh                                                ; +0xc4, 0x1800afff4\ninc     eax                                                            ; +0xc7, 0x1800afff7\ncmp     eax, 1                                                         ; +0xc9, 0x1800afff9\njnz     short loc_1800B0015                                            ; +0xcc, 0x1800afffc\nmovss   xmm0, dword ptr [rbx+174h]                                     ; +0xce, 0x1800afffe\nxorps   xmm0, cs:xmmword_1800EC220                                     ; +0xd6, 0x1800b0006\nmulss   xmm0, cs:dword_1800EC358                                       ; +0xdd, 0x1800b000d\nmulss   xmm1, dword ptr [rbx+170h]                                     ; +0xe5, 0x1800b0015\nmovss   xmm2, dword ptr [rbx+16Ch]                                     ; +0xed, 0x1800b001d\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0xf5, 0x1800b0025\nmulss   xmm1, cs:Y                                                     ; +0xfa, 0x1800b002a\nsubss   xmm2, cs:flt_1800EC208                                         ; +0x102, 0x1800b0032\nmulss   xmm1, cs:dword_1800EE454                                       ; +0x10a, 0x1800b003a\nmulss   xmm2, dword ptr [rbx+174h]                                     ; +0x112, 0x1800b0042\naddss   xmm2, xmm0                                                     ; +0x11a, 0x1800b004a\njmp     short loc_1800B0079                                            ; +0x11e, 0x1800b004e\nmovss   xmm2, dword ptr [rbx+16Ch]                                     ; +0x120, 0x1800b0050\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0x128, 0x1800b0058\nmovss   xmm1, dword ptr [rbx+170h]                                     ; +0x12d, 0x1800b005d\nmulss   xmm1, dword ptr [rsi]                                          ; +0x135, 0x1800b0065\nsubss   xmm2, cs:flt_1800EC208                                         ; +0x139, 0x1800b0069\nmulss   xmm2, dword ptr [rbx+174h]                                     ; +0x141, 0x1800b0071\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x149, 0x1800b0079\ncall    kmVec2Fill                                                     ; +0x14e, 0x1800b007e\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x153, 0x1800b0083\nmov     rcx, rdi                                                       ; +0x158, 0x1800b0088\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x15b, 0x1800b008b\nmovss   xmm7, dword ptr [rdi+4]                                        ; +0x160, 0x1800b0090\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x165, 0x1800b0095\nmov     rcx, rax; this                                                 ; +0x16a, 0x1800b009a\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x16d, 0x1800b009d\nmovss   xmm6, dword ptr [rdi]                                          ; +0x172, 0x1800b00a2\ndivss   xmm7, xmm0                                                     ; +0x176, 0x1800b00a6\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17a, 0x1800b00aa\nmov     rcx, rax; this                                                 ; +0x17f, 0x1800b00af\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x182, 0x1800b00b2\nlea     rcx, [rsp+48h+arg_0]                                           ; +0x187, 0x1800b00b7\ndivss   xmm6, xmm0                                                     ; +0x18c, 0x1800b00bc\nmovaps  xmm2, xmm7                                                     ; +0x190, 0x1800b00c0\nmovaps  xmm1, xmm6                                                     ; +0x193, 0x1800b00c3\ncall    kmVec2Fill                                                     ; +0x196, 0x1800b00c6\nmov     rdx, rax                                                       ; +0x19b, 0x1800b00cb\nmov     rcx, rdi                                                       ; +0x19e, 0x1800b00ce\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x1a1, 0x1800b00d1\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x1a6, 0x1800b00d6\nmov     rax, rdi                                                       ; +0x1ab, 0x1800b00db\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x1ae, 0x1800b00de\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x1b3, 0x1800b00e3\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x1b8, 0x1800b00e8\nadd     rsp, 40h                                                       ; +0x1bd, 0x1800b00ed\npop     rdi                                                            ; +0x1c1, 0x1800b00f1\nretn                                                                   ; +0x1c2, 0x1800b00f2", "xrefs": ["cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b0884", "cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b0988", "cocos2d::CCTMXLayer::setupTileSprite @ 0x1800b09a1", "cocos2d::CCTMXLayer::tileAt @ 0x1800b0d99", "<???> @ 0x18014cf68", "<???> @ 0x1801c2400"], "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"}