{"type": "func", "start": 5370969136, "end": 5370969769, "name": "GJBaseGameLayer::resetAreaObjectValues", "pseudocode": "// \n// GJBaseGameLayer::resetAreaObjectValues from 0x140227c30 to 0x140227ea9 (633 bytes)\n// \n// 15 xrefs:\n// > GJBaseGameLayer::processAreaEffects @ 0x1402287f3\n// > GJBaseGameLayer::processAreaActions @ 0x14022909f\n// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x1402293d1\n// > GJBaseGameLayer::transformAreaObjects @ 0x14022975e\n// > GJBaseGameLayer::transformAreaObjects @ 0x140229971\n// > GJBaseGameLayer::processAreaRotateGroupAction @ 0x140229eb7\n// > GJBaseGameLayer::rotateAreaObjects @ 0x14022a142\n// > GJBaseGameLayer::rotateAreaObjects @ 0x14022a342\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x14022a675\n// > GJBaseGameLayer::moveAreaObject @ 0x14022aad3\n// > LevelEditorLayer::onStopPlaytest @ 0x1402e0814\n// > <???> @ 0x1406803fc\n// > <???> @ 0x140680418\n// > <???> @ 0x140680428\n// > <???> @ 0x1406cd920\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\nbool GJBaseGameLayer::resetAreaObjectValues(GJBaseGameLayer *a1, GameObject *a2, bool a3)\n{\n  float m_positionXOffset; // xmm0_4\n  bool v7; // bp\n  double m_positionX; // xmm1_8\n  float m_positionYOffset; // xmm0_4\n  double m_positionY; // xmm1_8\n  float m_unk2BC; // xmm2_4\n  float m_scaleX; // xmm1_4\n  float v13; // xmm0_4\n  float v14; // xmm1_4\n  float m_unk2C0; // xmm2_4\n  float m_scaleYOffset; // xmm0_4\n  float v17; // xmm1_4\n  float m_unk2A8; // xmm1_4\n  float m_rotationXOffset; // xmm0_4\n  float v20; // xmm0_4\n  __int64 m_areaObjectsCount; // rcx\n  std::_Vector_val<std::_Simple_types<GameObject *>>::pointer Mylast; // rdx\n  GameObject *v24; // [rsp+50h] [rbp+8h] BYREF\n\n  if ( a2->m_unk4C8 < (signed int)a1->m_gameState.m_commandIndex )\n  {\n    if ( a3 )\n      GJBaseGameLayer::updateAreaObjectLastValues(a1, a2);\n    m_positionXOffset = a2->m_positionXOffset;\n    v7 = 0;\n    if ( m_positionXOffset != 0.0 )\n    {\n      m_positionX = a2->m_positionX;\n      v7 = 1;\n      a2->m_positionXOffset = 0.0;\n      a2->m_isUnmodifiedPosDirty = 1;\n      a2->m_positionX = m_positionX - m_positionXOffset;\n    }\n    m_positionYOffset = a2->m_positionYOffset;\n    if ( m_positionYOffset != 0.0 )\n    {\n      m_positionY = a2->m_positionY;\n      v7 = 1;\n      a2->m_positionYOffset = 0.0;\n      a2->m_isUnmodifiedPosDirty = 1;\n      a2->m_positionY = m_positionY - m_positionYOffset;\n    }\n    m_unk2BC = a2->m_unk2BC;\n    if ( m_unk2BC != 0.0 || a2->m_unk2C0 != 0.0 )\n    {\n      m_scaleX = a2->m_scaleX;\n      v13 = a2->m_scaleXOffset - m_unk2BC;\n      a2->m_unk2BC = 0.0;\n      v14 = m_scaleX - m_unk2BC;\n      m_unk2C0 = a2->m_unk2C0;\n      a2->m_unk2C0 = 0.0;\n      a2->m_scaleXOffset = v13;\n      m_scaleYOffset = a2->m_scaleYOffset;\n      a2->m_scaleX = v14;\n      v17 = a2->m_scaleY - m_unk2C0;\n      a2->m_scaleYOffset = m_scaleYOffset - m_unk2C0;\n      a2->m_scaleY = v17;\n      if ( !a3 )\n        ((void (__fastcall *)(GameObject *))a2->setRScale)(a2);\n    }\n    m_unk2A8 = a2->m_unk2A8;\n    if ( m_unk2A8 == 0.0 && a2->m_unk2B0 == 0.0\n      || (m_rotationXOffset = a2->m_rotationXOffset,\n          a2->m_unk2A8 = 0.0,\n          a2->m_rotationXOffset = m_rotationXOffset - m_unk2A8,\n          v20 = a2->m_rotationYOffset - a2->m_unk2B0,\n          a2->m_unk2B0 = 0.0,\n          a2->m_rotationYOffset = v20,\n          a3) )\n    {\n      a2->m_unk4C8 = a1->m_gameState.m_commandIndex;\n      if ( a3 )\n      {\n        m_areaObjectsCount = a1->m_areaObjectsCount;\n        v24 = a2;\n        if ( a1->m_areaObjectsIndex > (int)m_areaObjectsCount )\n        {\n          a1->m_areaObjects._Mypair._Myval2._Myfirst[m_areaObjectsCount] = a2;\n          ++a1->m_areaObjectsCount;\n        }\n        else\n        {\n          Mylast = a1->m_areaObjects._Mypair._Myval2._Mylast;\n          if ( Mylast == a1->m_areaObjects._Mypair._Myval2._Myend )\n          {\n            sub_14012D2A0((const void **)&a1->m_areaObjects._Mypair._Myval2._Myfirst, Mylast, &v24);\n          }\n          else\n          {\n            *Mylast = a2;\n            ++a1->m_areaObjects._Mypair._Myval2._Mylast;\n          }\n          ++a1->m_areaObjectsIndex;\n          ++a1->m_areaObjectsCount;\n        }\n        return v7;\n      }\n    }\n    else\n    {\n      ((void (__fastcall *)(GameObject *))a2->setRRotation)(a2);\n      a2->m_unk4C8 = a1->m_gameState.m_commandIndex;\n    }\n    GJBaseGameLayer::updateAreaObjectLastValues(a1, a2);\n    return v7;\n  }\n  return 0;\n}", "assembly": "; \n; GJBaseGameLayer::resetAreaObjectValues from 0x140227c30 to 0x140227ea9 (633 bytes)\n; \n; 15 xrefs:\n; > GJBaseGameLayer::processAreaEffects @ 0x1402287f3\n; > GJBaseGameLayer::processAreaActions @ 0x14022909f\n; > GJBaseGameLayer::processAreaTransformGroupAction @ 0x1402293d1\n; > GJBaseGameLayer::transformAreaObjects @ 0x14022975e\n; > GJBaseGameLayer::transformAreaObjects @ 0x140229971\n; > GJBaseGameLayer::processAreaRotateGroupAction @ 0x140229eb7\n; > GJBaseGameLayer::rotateAreaObjects @ 0x14022a142\n; > GJBaseGameLayer::rotateAreaObjects @ 0x14022a342\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x14022a675\n; > GJBaseGameLayer::moveAreaObject @ 0x14022aad3\n; > LevelEditorLayer::onStopPlaytest @ 0x1402e0814\n; > <???> @ 0x1406803fc\n; > <???> @ 0x140680418\n; > <???> @ 0x140680428\n; > <???> @ 0x1406cd920\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\npush    rbx                                                            ; +0x0, 0x140227c30\npush    rsi                                                            ; +0x2, 0x140227c32\npush    rdi                                                            ; +0x3, 0x140227c33\nsub     rsp, 30h                                                       ; +0x4, 0x140227c34\nmov     eax, [rcx+3E0h]                                                ; +0x8, 0x140227c38\nmovzx   esi, r8b                                                       ; +0xe, 0x140227c3e\nmov     rbx, rdx                                                       ; +0x12, 0x140227c42\nmov     rdi, rcx                                                       ; +0x15, 0x140227c45\ncmp     [rdx+4E0h], eax                                                ; +0x18, 0x140227c48\njge     loc_140227E9F                                                  ; +0x1e, 0x140227c4e\nmov     [rsp+48h+arg_8], rbp                                           ; +0x24, 0x140227c54\nmov     [rsp+48h+arg_10], r14                                          ; +0x29, 0x140227c59\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0x2e, 0x140227c5e\ntest    r8b, r8b                                                       ; +0x33, 0x140227c63\njz      short loc_140227C6D                                            ; +0x36, 0x140227c66\ncall    GJBaseGameLayer__updateAreaObjectLastValues                    ; +0x38, 0x140227c68\nmovss   xmm0, dword ptr [rdx+2A0h]                                     ; +0x3d, 0x140227c6d\nxor     bpl, bpl                                                       ; +0x45, 0x140227c75\nxorps   xmm6, xmm6                                                     ; +0x48, 0x140227c78\nxor     r14d, r14d                                                     ; +0x4b, 0x140227c7b\nucomiss xmm0, xmm6                                                     ; +0x4e, 0x140227c7e\njp      short loc_140227C85                                            ; +0x51, 0x140227c81\njz      short loc_140227CAD                                            ; +0x53, 0x140227c83\nmovsd   xmm1, qword ptr [rdx+3B8h]                                     ; +0x55, 0x140227c85\nmov     bpl, 1                                                         ; +0x5d, 0x140227c8d\ncvtps2pd xmm0, xmm0                                                    ; +0x60, 0x140227c90\nmov     [rdx+2A0h], r14d                                               ; +0x63, 0x140227c93\nmov     [rdx+352h], bpl                                                ; +0x6a, 0x140227c9a\nsubsd   xmm1, xmm0                                                     ; +0x71, 0x140227ca1\nmovsd   qword ptr [rdx+3B8h], xmm1                                     ; +0x75, 0x140227ca5\nmovss   xmm0, dword ptr [rdx+2A4h]                                     ; +0x7d, 0x140227cad\nucomiss xmm0, xmm6                                                     ; +0x85, 0x140227cb5\njp      short loc_140227CBC                                            ; +0x88, 0x140227cb8\njz      short loc_140227CE4                                            ; +0x8a, 0x140227cba\nmovsd   xmm1, qword ptr [rdx+3C0h]                                     ; +0x8c, 0x140227cbc\nmov     bpl, 1                                                         ; +0x94, 0x140227cc4\ncvtps2pd xmm0, xmm0                                                    ; +0x97, 0x140227cc7\nmov     [rdx+2A4h], r14d                                               ; +0x9a, 0x140227cca\nmov     [rdx+352h], bpl                                                ; +0xa1, 0x140227cd1\nsubsd   xmm1, xmm0                                                     ; +0xa8, 0x140227cd8\nmovsd   qword ptr [rdx+3C0h], xmm1                                     ; +0xac, 0x140227cdc\nmovss   xmm2, dword ptr [rdx+2C0h]                                     ; +0xb4, 0x140227ce4\nucomiss xmm2, xmm6                                                     ; +0xbc, 0x140227cec\njp      short loc_140227D02                                            ; +0xbf, 0x140227cef\njnz     short loc_140227D02                                            ; +0xc1, 0x140227cf1\nmovss   xmm0, dword ptr [rdx+2C4h]                                     ; +0xc3, 0x140227cf3\nucomiss xmm0, xmm6                                                     ; +0xcb, 0x140227cfb\njp      short loc_140227D02                                            ; +0xce, 0x140227cfe\njz      short loc_140227D81                                            ; +0xd0, 0x140227d00\nmovss   xmm0, dword ptr [rdx+2B8h]                                     ; +0xd2, 0x140227d02\nmovss   xmm1, dword ptr [rdx+488h]                                     ; +0xda, 0x140227d0a\nsubss   xmm0, xmm2                                                     ; +0xe2, 0x140227d12\nmov     [rdx+2C0h], r14d                                               ; +0xe6, 0x140227d16\nsubss   xmm1, xmm2                                                     ; +0xed, 0x140227d1d\nmovss   xmm2, dword ptr [rdx+2C4h]                                     ; +0xf1, 0x140227d21\nmov     [rdx+2C4h], r14d                                               ; +0xf9, 0x140227d29\nmovss   dword ptr [rdx+2B8h], xmm0                                     ; +0x100, 0x140227d30\nmovss   xmm0, dword ptr [rdx+2BCh]                                     ; +0x108, 0x140227d38\nmovss   dword ptr [rdx+488h], xmm1                                     ; +0x110, 0x140227d40\nsubss   xmm0, xmm2                                                     ; +0x118, 0x140227d48\nmovss   xmm1, dword ptr [rdx+48Ch]                                     ; +0x11c, 0x140227d4c\nsubss   xmm1, xmm2                                                     ; +0x124, 0x140227d54\nmovss   dword ptr [rdx+2BCh], xmm0                                     ; +0x128, 0x140227d58\nmovss   dword ptr [rdx+48Ch], xmm1                                     ; +0x130, 0x140227d60\ntest    sil, sil                                                       ; +0x138, 0x140227d68\njnz     short loc_140227D81                                            ; +0x13b, 0x140227d6b\nmov     rax, [rdx]                                                     ; +0x13d, 0x140227d6d\nmov     rcx, rbx                                                       ; +0x140, 0x140227d70\nmovss   xmm1, cs:flt_140622C24                                         ; +0x143, 0x140227d73\ncall    qword ptr [rax+508h]                                           ; +0x14b, 0x140227d7b\nmovss   xmm1, dword ptr [rbx+2ACh]                                     ; +0x151, 0x140227d81\nucomiss xmm1, xmm6                                                     ; +0x159, 0x140227d89\njp      short loc_140227DA3                                            ; +0x15c, 0x140227d8c\njnz     short loc_140227DA3                                            ; +0x15e, 0x140227d8e\nmovss   xmm0, dword ptr [rbx+2B4h]                                     ; +0x160, 0x140227d90\nucomiss xmm0, xmm6                                                     ; +0x168, 0x140227d98\njp      short loc_140227DA3                                            ; +0x16b, 0x140227d9b\njz      loc_140227E23                                                  ; +0x16d, 0x140227d9d\nmovss   xmm0, dword ptr [rbx+2A8h]                                     ; +0x173, 0x140227da3\nmov     [rbx+2ACh], r14d                                               ; +0x17b, 0x140227dab\nsubss   xmm0, xmm1                                                     ; +0x182, 0x140227db2\nmovss   dword ptr [rbx+2A8h], xmm0                                     ; +0x186, 0x140227db6\nmovss   xmm0, dword ptr [rbx+2B0h]                                     ; +0x18e, 0x140227dbe\nsubss   xmm0, dword ptr [rbx+2B4h]                                     ; +0x196, 0x140227dc6\nmov     [rbx+2B4h], r14d                                               ; +0x19e, 0x140227dce\nmovss   dword ptr [rbx+2B0h], xmm0                                     ; +0x1a5, 0x140227dd5\ntest    sil, sil                                                       ; +0x1ad, 0x140227ddd\njnz     short loc_140227E23                                            ; +0x1b0, 0x140227de0\nmov     rax, [rbx]                                                     ; +0x1b2, 0x140227de2\nxorps   xmm1, xmm1                                                     ; +0x1b5, 0x140227de5\nmov     rcx, rbx                                                       ; +0x1b8, 0x140227de8\ncall    qword ptr [rax+520h]                                           ; +0x1bb, 0x140227deb\nmov     eax, [rdi+3E0h]                                                ; +0x1c1, 0x140227df1\nmov     [rbx+4E0h], eax                                                ; +0x1c7, 0x140227df7\nmov     rdx, rbx                                                       ; +0x1cd, 0x140227dfd\nmov     rcx, rdi                                                       ; +0x1d0, 0x140227e00\ncall    GJBaseGameLayer__updateAreaObjectLastValues                    ; +0x1d3, 0x140227e03\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0x1d8, 0x140227e08\nmovzx   eax, bpl                                                       ; +0x1dd, 0x140227e0d\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x1e1, 0x140227e11\nmov     r14, [rsp+48h+arg_10]                                          ; +0x1e6, 0x140227e16\nadd     rsp, 30h                                                       ; +0x1eb, 0x140227e1b\npop     rdi                                                            ; +0x1ef, 0x140227e1f\npop     rsi                                                            ; +0x1f0, 0x140227e20\npop     rbx                                                            ; +0x1f1, 0x140227e21\nretn                                                                   ; +0x1f2, 0x140227e22\nmov     eax, [rdi+3E0h]                                                ; +0x1f3, 0x140227e23\nmov     [rbx+4E0h], eax                                                ; +0x1f9, 0x140227e29\ntest    sil, sil                                                       ; +0x1ff, 0x140227e2f\njz      short loc_140227DFD                                            ; +0x202, 0x140227e32\nmovsxd  rcx, dword ptr [rdi+0EE4h]                                     ; +0x204, 0x140227e34\nlea     rax, [rdi+0E28h]                                               ; +0x20b, 0x140227e3b\nmov     [rsp+48h+arg_0], rbx                                           ; +0x212, 0x140227e42\ncmp     [rdi+0EF8h], ecx                                               ; +0x217, 0x140227e47\njg      short loc_140227E8D                                            ; +0x21d, 0x140227e4d\nmov     rdx, [rax+8]                                                   ; +0x21f, 0x140227e4f\ncmp     rdx, [rax+10h]                                                 ; +0x223, 0x140227e53\njz      short loc_140227E6F                                            ; +0x227, 0x140227e57\nmov     [rdx], rbx                                                     ; +0x229, 0x140227e59\nadd     qword ptr [rax+8], 8                                           ; +0x22c, 0x140227e5c\ninc     dword ptr [rdi+0EF8h]                                          ; +0x231, 0x140227e61\ninc     dword ptr [rdi+0EE4h]                                          ; +0x237, 0x140227e67\njmp     short loc_140227E08                                            ; +0x23d, 0x140227e6d\nlea     r8, [rsp+48h+arg_0]                                            ; +0x23f, 0x140227e6f\nmov     rcx, rax                                                       ; +0x244, 0x140227e74\ncall    sub_14012D2A0                                                  ; +0x247, 0x140227e77\ninc     dword ptr [rdi+0EF8h]                                          ; +0x24c, 0x140227e7c\ninc     dword ptr [rdi+0EE4h]                                          ; +0x252, 0x140227e82\njmp     loc_140227E08                                                  ; +0x258, 0x140227e88\nmov     rax, [rax]                                                     ; +0x25d, 0x140227e8d\nmov     [rax+rcx*8], rbx                                               ; +0x260, 0x140227e90\ninc     dword ptr [rdi+0EE4h]                                          ; +0x264, 0x140227e94\njmp     loc_140227E08                                                  ; +0x26a, 0x140227e9a\nxor     al, al                                                         ; +0x26f, 0x140227e9f\nadd     rsp, 30h                                                       ; +0x271, 0x140227ea1\npop     rdi                                                            ; +0x275, 0x140227ea5\npop     rsi                                                            ; +0x276, 0x140227ea6\npop     rbx                                                            ; +0x277, 0x140227ea7\nretn                                                                   ; +0x278, 0x140227ea8", "xrefs": ["GJBaseGameLayer::processAreaEffects @ 0x1402287f3", "GJBaseGameLayer::processAreaActions @ 0x14022909f", "GJBaseGameLayer::processAreaTransformGroupAction @ 0x1402293d1", "GJBaseGameLayer::transformAreaObjects @ 0x14022975e", "GJBaseGameLayer::transformAreaObjects @ 0x140229971", "GJBaseGameLayer::processAreaRotateGroupAction @ 0x140229eb7", "GJBaseGameLayer::rotateAreaObjects @ 0x14022a142", "GJBaseGameLayer::rotateAreaObjects @ 0x14022a342", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x14022a675", "GJBaseGameLayer::moveAreaObject @ 0x14022aad3", "LevelEditorLayer::onStopPlaytest @ 0x1402e0814", "<???> @ 0x1406803fc", "<???> @ 0x140680418", "<???> @ 0x140680428", "<???> @ 0x1406cd920"], "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"}