{"type": "func", "start": 6443155408, "end": 6443155647, "name": "cocos2d::CCTMXLayer::calculateLayerOffset", "pseudocode": "// \n// cocos2d::CCTMXLayer::calculateLayerOffset from 0x1800abfd0 to 0x1800ac0bf (239 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800ac2d8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b80d0\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::calculateLayerOffset(\n        const struct cocos2d::CCPoint *a1,\n        _DWORD *a2,\n        cocos2d::CCSize *a3)\n{\n  float x; // r9d\n  int v7; // r9d\n  float v8; // xmm2_4\n  float v9; // xmm1_4\n  float *v11; // rax\n  float v12; // [rsp+30h] [rbp+8h] BYREF\n\n  cocos2d::cc_timeval::operator=(a2, &unk_1801A9AC8);\n  x = a1[49].x;\n  if ( x == 0.0 )\n  {\n    v8 = (float)-a3->height * a1[46].y;\n    v9 = a1[46].x * a3->width;\n    goto LABEL_7;\n  }\n  v7 = LODWORD(x) - 1;\n  if ( !v7 )\n  {\n    cocos2d::CCSize::equals(a3, &unk_1801A9AC8);\n    return (struct cocos2d::CCPoint)a2;\n  }\n  if ( v7 == 1 )\n  {\n    v8 = (float)((float)-a3->width - a3->height) * (float)(a1[46].y * 0.5);\n    v9 = (float)(a3->width - a3->height) * (float)(a1[46].x * 0.5);\nLABEL_7:\n    v11 = kmVec2Fill(&v12, v9, v8);\n    cocos2d::CCSize::operator=(a2, v11);\n  }\n  return (struct cocos2d::CCPoint)a2;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::calculateLayerOffset from 0x1800abfd0 to 0x1800ac0bf (239 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800ac2d8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b80d0\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, 0x1800abfd0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800abfd5\npush    rdi                                                            ; +0xa, 0x1800abfda\nsub     rsp, 20h                                                       ; +0xb, 0x1800abfdb\nmov     rbx, rdx                                                       ; +0xf, 0x1800abfdf\nmov     rdi, rcx                                                       ; +0x12, 0x1800abfe2\nmov     rcx, rbx                                                       ; +0x15, 0x1800abfe5\nlea     rdx, unk_1801A9AC8                                             ; +0x18, 0x1800abfe8\nmov     rsi, r8                                                        ; +0x1f, 0x1800abfef\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x22, 0x1800abff2\nmov     r9d, [rdi+188h]                                                ; +0x27, 0x1800abff7\ntest    r9d, r9d                                                       ; +0x2e, 0x1800abffe\njz      short loc_1800AC077                                            ; +0x31, 0x1800ac001\nsub     r9d, 1                                                         ; +0x33, 0x1800ac003\njz      short loc_1800AC055                                            ; +0x37, 0x1800ac007\ncmp     r9d, 1                                                         ; +0x39, 0x1800ac009\njnz     loc_1800AC0AC                                                  ; +0x3d, 0x1800ac00d\nmovss   xmm1, dword ptr [rsi]                                          ; +0x43, 0x1800ac013\nmovss   xmm0, dword ptr [rdi+174h]                                     ; +0x47, 0x1800ac017\nmovaps  xmm2, xmm1                                                     ; +0x4f, 0x1800ac01f\nmulss   xmm0, cs:dword_1800E6308                                       ; +0x52, 0x1800ac022\nxorps   xmm2, cs:xmmword_1800E61C0                                     ; +0x5a, 0x1800ac02a\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0x61, 0x1800ac031\nsubss   xmm1, dword ptr [rsi+4]                                        ; +0x66, 0x1800ac036\nmulss   xmm2, xmm0                                                     ; +0x6b, 0x1800ac03b\nmovss   xmm0, dword ptr [rdi+170h]                                     ; +0x6f, 0x1800ac03f\nmulss   xmm0, cs:dword_1800E6308                                       ; +0x77, 0x1800ac047\nmulss   xmm1, xmm0                                                     ; +0x7f, 0x1800ac04f\njmp     short loc_1800AC097                                            ; +0x83, 0x1800ac053\nlea     rdx, unk_1801A9AC8; struct cocos2d::CCSize *                   ; +0x85, 0x1800ac055\nmov     rcx, rsi; this                                                 ; +0x8c, 0x1800ac05c\ncall    ?equals@CCSize@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCSize::equals(cocos2d::CCSize const &) ; +0x8f, 0x1800ac05f\nmov     rax, rbx                                                       ; +0x94, 0x1800ac064\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x97, 0x1800ac067\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x9c, 0x1800ac06c\nadd     rsp, 20h                                                       ; +0xa1, 0x1800ac071\npop     rdi                                                            ; +0xa5, 0x1800ac075\nretn                                                                   ; +0xa6, 0x1800ac076\nmovss   xmm2, dword ptr [rsi+4]                                        ; +0xa7, 0x1800ac077\nxorps   xmm2, cs:xmmword_1800E61C0                                     ; +0xac, 0x1800ac07c\nmovss   xmm1, dword ptr [rdi+170h]                                     ; +0xb3, 0x1800ac083\nmulss   xmm2, dword ptr [rdi+174h]                                     ; +0xbb, 0x1800ac08b\nmulss   xmm1, dword ptr [rsi]                                          ; +0xc3, 0x1800ac093\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xc7, 0x1800ac097\ncall    kmVec2Fill                                                     ; +0xcc, 0x1800ac09c\nmov     rdx, rax                                                       ; +0xd1, 0x1800ac0a1\nmov     rcx, rbx                                                       ; +0xd4, 0x1800ac0a4\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xd7, 0x1800ac0a7\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xdc, 0x1800ac0ac\nmov     rax, rbx                                                       ; +0xe1, 0x1800ac0b1\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xe4, 0x1800ac0b4\nadd     rsp, 20h                                                       ; +0xe9, 0x1800ac0b9\npop     rdi                                                            ; +0xed, 0x1800ac0bd\nretn                                                                   ; +0xee, 0x1800ac0be", "xrefs": ["cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800ac2d8", "<???> @ 0x1801438a8", "<???> @ 0x1801b80d0"], "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"}