{"type": "func", "start": 6443157280, "end": 6443157718, "name": "cocos2d::CCTMXLayer::positionAt", "pseudocode": "// \n// cocos2d::CCTMXLayer::positionAt from 0x1800ac720 to 0x1800ac8d6 (438 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad023\n// > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad11c\n// > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad147\n// > cocos2d::CCTMXLayer::tileAt @ 0x1800ad539\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b813c\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::CCPoint *__fastcall cocos2d::CCTMXLayer::positionAt(\n        cocos2d::CCTMXLayer *this,\n        struct cocos2d::CCPoint *a2,\n        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  cocos2d::CCDirector *v11; // rax\n  float v12; // xmm6_4\n  cocos2d::CCDirector *v13; // rax\n  float ContentScaleFactor; // xmm0_4\n  float *v15; // rax\n  int v17; // [rsp+40h] [rbp+8h] BYREF\n\n  cocos2d::cc_timeval::operator=(a2, &unk_1801A9AC8);\n  v6 = *((_DWORD *)this + 98);\n  if ( !v6 )\n  {\n    v9 = *((float *)this + 92) * *a3;\n    v8 = (float)((float)(*((float *)this + 91) - a3[1]) - 1.0) * *((float *)this + 93);\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 *)this + 93) * 0.5;\n    v9 = (float)((float)(*a3 * *((float *)this + 92)) * 3.0) * 0.25;\n    v8 = (float)((float)((float)(*((float *)this + 91) - a3[1]) - 1.0) * *((float *)this + 93)) + v10;\n    goto LABEL_9;\n  }\n  if ( v7 == 1 )\n  {\n    v8 = (float)((float)((float)((float)(*((float *)this + 91) + *((float *)this + 91)) - *a3) - a3[1]) - 2.0)\n       * (float)(*((float *)this + 93) * 0.5);\n    v9 = (float)((float)((float)(*a3 + *((float *)this + 90)) - a3[1]) - 1.0) * (float)(*((float *)this + 92) * 0.5);\nLABEL_9:\n    kmVec2Fill((float *)&v17, v9, v8);\n    cocos2d::CCSize::operator=(a2, &v17);\n  }\n  v11 = cocos2d::CCDirector::sharedDirector();\n  v12 = a2->y / cocos2d::CCDirector::getContentScaleFactor(v11);\n  v13 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v13);\n  v15 = kmVec2Fill((float *)&v17, a2->x / ContentScaleFactor, v12);\n  cocos2d::CCSize::operator=(a2, v15);\n  return a2;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::positionAt from 0x1800ac720 to 0x1800ac8d6 (438 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad023\n; > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad11c\n; > cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad147\n; > cocos2d::CCTMXLayer::tileAt @ 0x1800ad539\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b813c\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, 0x1800ac720\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800ac725\npush    rdi                                                            ; +0xa, 0x1800ac72a\nsub     rsp, 30h                                                       ; +0xb, 0x1800ac72b\nmov     rdi, rdx                                                       ; +0xf, 0x1800ac72f\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x12, 0x1800ac732\nmov     rbx, rcx                                                       ; +0x17, 0x1800ac737\nlea     rdx, unk_1801A9AC8                                             ; +0x1a, 0x1800ac73a\nmov     rcx, rdi                                                       ; +0x21, 0x1800ac741\nmov     rsi, r8                                                        ; +0x24, 0x1800ac744\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x27, 0x1800ac747\nmov     ecx, [rbx+188h]                                                ; +0x2c, 0x1800ac74c\ntest    ecx, ecx                                                       ; +0x32, 0x1800ac752\njz      loc_1800AC83B                                                  ; +0x34, 0x1800ac754\nsub     ecx, 1                                                         ; +0x3a, 0x1800ac75a\njz      short loc_1800AC7CB                                            ; +0x3d, 0x1800ac75d\ncmp     ecx, 1                                                         ; +0x3f, 0x1800ac75f\njnz     loc_1800AC87B                                                  ; +0x42, 0x1800ac762\nmovss   xmm1, dword ptr [rsi]                                          ; +0x48, 0x1800ac768\nmovss   xmm0, dword ptr [rbx+174h]                                     ; +0x4c, 0x1800ac76c\nmulss   xmm0, cs:dword_1800E6308                                       ; +0x54, 0x1800ac774\nmovss   xmm2, dword ptr [rbx+16Ch]                                     ; +0x5c, 0x1800ac77c\naddss   xmm2, xmm2                                                     ; +0x64, 0x1800ac784\nsubss   xmm2, xmm1                                                     ; +0x68, 0x1800ac788\naddss   xmm1, dword ptr [rbx+168h]                                     ; +0x6c, 0x1800ac78c\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0x74, 0x1800ac794\nsubss   xmm1, dword ptr [rsi+4]                                        ; +0x79, 0x1800ac799\nsubss   xmm2, cs:Y                                                     ; +0x7e, 0x1800ac79e\nsubss   xmm1, cs:flt_1800E61A8                                         ; +0x86, 0x1800ac7a6\nmulss   xmm2, xmm0                                                     ; +0x8e, 0x1800ac7ae\nmovss   xmm0, dword ptr [rbx+170h]                                     ; +0x92, 0x1800ac7b2\nmulss   xmm0, cs:dword_1800E6308                                       ; +0x9a, 0x1800ac7ba\nmulss   xmm1, xmm0                                                     ; +0xa2, 0x1800ac7c2\njmp     loc_1800AC864                                                  ; +0xa6, 0x1800ac7c6\nmovss   xmm1, dword ptr [rsi]                                          ; +0xab, 0x1800ac7cb\nxorps   xmm0, xmm0                                                     ; +0xaf, 0x1800ac7cf\ncvttss2si eax, xmm1                                                    ; +0xb2, 0x1800ac7d2\nand     eax, 80000001h                                                 ; +0xb6, 0x1800ac7d6\njge     short loc_1800AC7E4                                            ; +0xbb, 0x1800ac7db\ndec     eax                                                            ; +0xbd, 0x1800ac7dd\nor      eax, 0FFFFFFFEh                                                ; +0xbf, 0x1800ac7df\ninc     eax                                                            ; +0xc2, 0x1800ac7e2\ncmp     eax, 1                                                         ; +0xc4, 0x1800ac7e4\njnz     short loc_1800AC800                                            ; +0xc7, 0x1800ac7e7\nmovss   xmm0, dword ptr [rbx+174h]                                     ; +0xc9, 0x1800ac7e9\nxorps   xmm0, cs:xmmword_1800E61C0                                     ; +0xd1, 0x1800ac7f1\nmulss   xmm0, cs:dword_1800E6308                                       ; +0xd8, 0x1800ac7f8\nmulss   xmm1, dword ptr [rbx+170h]                                     ; +0xe0, 0x1800ac800\nmovss   xmm2, dword ptr [rbx+16Ch]                                     ; +0xe8, 0x1800ac808\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0xf0, 0x1800ac810\nmulss   xmm1, cs:flt_1800E6700                                         ; +0xf5, 0x1800ac815\nsubss   xmm2, cs:flt_1800E61A8                                         ; +0xfd, 0x1800ac81d\nmulss   xmm1, cs:dword_1800E83F4                                       ; +0x105, 0x1800ac825\nmulss   xmm2, dword ptr [rbx+174h]                                     ; +0x10d, 0x1800ac82d\naddss   xmm2, xmm0                                                     ; +0x115, 0x1800ac835\njmp     short loc_1800AC864                                            ; +0x119, 0x1800ac839\nmovss   xmm2, dword ptr [rbx+16Ch]                                     ; +0x11b, 0x1800ac83b\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0x123, 0x1800ac843\nmovss   xmm1, dword ptr [rbx+170h]                                     ; +0x128, 0x1800ac848\nmulss   xmm1, dword ptr [rsi]                                          ; +0x130, 0x1800ac850\nsubss   xmm2, cs:flt_1800E61A8                                         ; +0x134, 0x1800ac854\nmulss   xmm2, dword ptr [rbx+174h]                                     ; +0x13c, 0x1800ac85c\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x144, 0x1800ac864\ncall    kmVec2Fill                                                     ; +0x149, 0x1800ac869\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x14e, 0x1800ac86e\nmov     rcx, rdi                                                       ; +0x153, 0x1800ac873\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x156, 0x1800ac876\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x15b, 0x1800ac87b\nmov     rcx, rax; this                                                 ; +0x160, 0x1800ac880\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x163, 0x1800ac883\nmovss   xmm6, dword ptr [rdi+4]                                        ; +0x168, 0x1800ac888\ndivss   xmm6, xmm0                                                     ; +0x16d, 0x1800ac88d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x171, 0x1800ac891\nmov     rcx, rax; this                                                 ; +0x176, 0x1800ac896\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x179, 0x1800ac899\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x17e, 0x1800ac89e\nmovss   xmm1, dword ptr [rdi]                                          ; +0x183, 0x1800ac8a3\nmovaps  xmm2, xmm6                                                     ; +0x187, 0x1800ac8a7\ndivss   xmm1, xmm0                                                     ; +0x18a, 0x1800ac8aa\ncall    kmVec2Fill                                                     ; +0x18e, 0x1800ac8ae\nmov     rdx, rax                                                       ; +0x193, 0x1800ac8b3\nmov     rcx, rdi                                                       ; +0x196, 0x1800ac8b6\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x199, 0x1800ac8b9\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x19e, 0x1800ac8be\nmov     rax, rdi                                                       ; +0x1a3, 0x1800ac8c3\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x1a6, 0x1800ac8c6\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x1ab, 0x1800ac8cb\nadd     rsp, 30h                                                       ; +0x1b0, 0x1800ac8d0\npop     rdi                                                            ; +0x1b4, 0x1800ac8d4\nretn                                                                   ; +0x1b5, 0x1800ac8d5", "xrefs": ["cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad023", "cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad11c", "cocos2d::CCTMXLayer::setupTileSprite @ 0x1800ad147", "cocos2d::CCTMXLayer::tileAt @ 0x1800ad539", "<???> @ 0x1801438a8", "<???> @ 0x1801b813c"], "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"}