{"type": "func", "start": 6443169728, "end": 6443169967, "name": "cocos2d::CCTMXLayer::calculateLayerOffset", "pseudocode": "// \n// cocos2d::CCTMXLayer::calculateLayerOffset from 0x1800af7c0 to 0x1800af8af (239 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800afac6\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c2394\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_DWORD *__fastcall cocos2d::CCTMXLayer::calculateLayerOffset(__int64 a1, _DWORD *a2, float *a3)\n{\n  int v6; // 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, dword_1801B3B28);\n  v6 = *(_DWORD *)(a1 + 392);\n  if ( !v6 )\n  {\n    v8 = (float)-a3[1] * *(float *)(a1 + 372);\n    v9 = *(float *)(a1 + 368) * *a3;\n    goto LABEL_7;\n  }\n  v7 = v6 - 1;\n  if ( !v7 )\n  {\n    cocos2d::CCSize::equals((cocos2d::CCSize *)a3, (const struct cocos2d::CCSize *)dword_1801B3B28);\n    return a2;\n  }\n  if ( v7 == 1 )\n  {\n    v8 = (float)((float)-*a3 - a3[1]) * (float)(*(float *)(a1 + 372) * 0.5);\n    v9 = (float)(*a3 - a3[1]) * (float)(*(float *)(a1 + 368) * 0.5);\nLABEL_7:\n    v11 = kmVec2Fill(&v12, v9, v8);\n    cocos2d::CCSize::operator=(a2, v11);\n  }\n  return a2;\n}", "assembly": "; \n; cocos2d::CCTMXLayer::calculateLayerOffset from 0x1800af7c0 to 0x1800af8af (239 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800afac6\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c2394\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, 0x1800af7c0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800af7c5\npush    rdi                                                            ; +0xa, 0x1800af7ca\nsub     rsp, 20h                                                       ; +0xb, 0x1800af7cb\nmov     rbx, rdx                                                       ; +0xf, 0x1800af7cf\nmov     rdi, rcx                                                       ; +0x12, 0x1800af7d2\nmov     rcx, rbx                                                       ; +0x15, 0x1800af7d5\nlea     rdx, dword_1801B3B28                                           ; +0x18, 0x1800af7d8\nmov     rsi, r8                                                        ; +0x1f, 0x1800af7df\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x22, 0x1800af7e2\nmov     r9d, [rdi+188h]                                                ; +0x27, 0x1800af7e7\ntest    r9d, r9d                                                       ; +0x2e, 0x1800af7ee\njz      short loc_1800AF867                                            ; +0x31, 0x1800af7f1\nsub     r9d, 1                                                         ; +0x33, 0x1800af7f3\njz      short loc_1800AF845                                            ; +0x37, 0x1800af7f7\ncmp     r9d, 1                                                         ; +0x39, 0x1800af7f9\njnz     loc_1800AF89C                                                  ; +0x3d, 0x1800af7fd\nmovss   xmm1, dword ptr [rsi]                                          ; +0x43, 0x1800af803\nmovss   xmm0, dword ptr [rdi+174h]                                     ; +0x47, 0x1800af807\nmovaps  xmm2, xmm1                                                     ; +0x4f, 0x1800af80f\nmulss   xmm0, cs:dword_1800EC358                                       ; +0x52, 0x1800af812\nxorps   xmm2, cs:xmmword_1800EC220                                     ; +0x5a, 0x1800af81a\nsubss   xmm2, dword ptr [rsi+4]                                        ; +0x61, 0x1800af821\nsubss   xmm1, dword ptr [rsi+4]                                        ; +0x66, 0x1800af826\nmulss   xmm2, xmm0                                                     ; +0x6b, 0x1800af82b\nmovss   xmm0, dword ptr [rdi+170h]                                     ; +0x6f, 0x1800af82f\nmulss   xmm0, cs:dword_1800EC358                                       ; +0x77, 0x1800af837\nmulss   xmm1, xmm0                                                     ; +0x7f, 0x1800af83f\njmp     short loc_1800AF887                                            ; +0x83, 0x1800af843\nlea     rdx, dword_1801B3B28; struct cocos2d::CCSize *                 ; +0x85, 0x1800af845\nmov     rcx, rsi; this                                                 ; +0x8c, 0x1800af84c\ncall    ?equals@CCSize@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCSize::equals(cocos2d::CCSize const &) ; +0x8f, 0x1800af84f\nmov     rax, rbx                                                       ; +0x94, 0x1800af854\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x97, 0x1800af857\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x9c, 0x1800af85c\nadd     rsp, 20h                                                       ; +0xa1, 0x1800af861\npop     rdi                                                            ; +0xa5, 0x1800af865\nretn                                                                   ; +0xa6, 0x1800af866\nmovss   xmm2, dword ptr [rsi+4]                                        ; +0xa7, 0x1800af867\nxorps   xmm2, cs:xmmword_1800EC220                                     ; +0xac, 0x1800af86c\nmovss   xmm1, dword ptr [rdi+170h]                                     ; +0xb3, 0x1800af873\nmulss   xmm2, dword ptr [rdi+174h]                                     ; +0xbb, 0x1800af87b\nmulss   xmm1, dword ptr [rsi]                                          ; +0xc3, 0x1800af883\nlea     rcx, [rsp+28h+arg_0]                                           ; +0xc7, 0x1800af887\ncall    kmVec2Fill                                                     ; +0xcc, 0x1800af88c\nmov     rdx, rax                                                       ; +0xd1, 0x1800af891\nmov     rcx, rbx                                                       ; +0xd4, 0x1800af894\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xd7, 0x1800af897\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xdc, 0x1800af89c\nmov     rax, rbx                                                       ; +0xe1, 0x1800af8a1\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xe4, 0x1800af8a4\nadd     rsp, 20h                                                       ; +0xe9, 0x1800af8a9\npop     rdi                                                            ; +0xed, 0x1800af8ad\nretn                                                                   ; +0xee, 0x1800af8ae", "xrefs": ["cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x1800afac6", "<???> @ 0x18014cf68", "<???> @ 0x1801c2394"], "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"}