{"type": "func", "start": 4296164992, "end": 4296165393, "name": "GJBaseGameLayer::updateDualGround", "pseudocode": "// \n// GJBaseGameLayer::updateDualGround from 0x100124680 to 0x100124811 (401 bytes)\n// \n// 8 xrefs:\n// > PlayLayer::loadFromCheckpoint @ 0x1000bd83a\n// > GJBaseGameLayer::setupLevelStart @ 0x1001238b5\n// > GJBaseGameLayer::toggleDualMode @ 0x10012424e\n// > GJBaseGameLayer::updateCameraMode @ 0x100124a18\n// > GJBaseGameLayer::playerWillSwitchMode @ 0x100124abc\n// > GJBaseGameLayer::updateZoom @ 0x10014ec1e\n// > GJBaseGameLayer::resetCamera @ 0x100159f3c\n// > GJBaseGameLayer::exitStaticCamera @ 0x10015c9e6\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\nvoid __fastcall GJBaseGameLayer::updateDualGround(GJBaseGameLayer *a1, PlayerObject *a2, int a3, bool a4, float a5)\n{\n  bool m_isDualMode; // al\n  GameObject *m_lastActivatedPortal1; // r14\n  __m128 v9; // xmm0\n  float v10; // xmm1_4\n  unsigned int m_dualRelated; // ecx\n  __int64 v12; // rdx\n  __m128 v13; // xmm2\n  PlayerObject *v14; // r12\n  float v15; // xmm0_4\n  float v16; // [rsp+0h] [rbp-40h]\n\n  m_isDualMode = a1->m_gameState.m_isDualMode;\n  if ( !m_isDualMode || (m_lastActivatedPortal1 = a1->m_gameState.m_lastActivatedPortal2) == nullptr )\n    m_lastActivatedPortal1 = a1->m_gameState.m_lastActivatedPortal1;\n  if ( (unsigned int)(a3 - 25) <= 0xFFFFFFFD )\n    a1->m_gameState.m_dualRelated = a3;\n  v9 = (__m128)0x43960000u;\n  v10 = 270.0;\n  m_dualRelated = a3;\n  while ( m_dualRelated - 23 < 2 )\n  {\n    m_dualRelated = a1->m_gameState.m_dualRelated;\n    if ( m_dualRelated - 23 < 2 )\n      goto LABEL_18;\n  }\n  if ( m_dualRelated > 0x29 )\n    goto LABEL_18;\n  v12 = 0x20004080020LL;\n  if ( !_bittest64(&v12, m_dualRelated) )\n  {\n    if ( m_dualRelated == 16 )\n    {\n      v9 = (__m128)0x43700000u;\n      if ( m_isDualMode )\n        goto LABEL_19;\nLABEL_13:\n      if ( a1->m_gameState.m_isFreeMode )\n        goto LABEL_29;\n      goto LABEL_25;\n    }\nLABEL_18:\n    v9 = (__m128)0x43870000u;\n    if ( m_isDualMode )\n      goto LABEL_19;\n    goto LABEL_13;\n  }\n  if ( !m_isDualMode )\n    goto LABEL_13;\nLABEL_19:\n  v13 = _mm_cmpeq_ss((__m128)0x43700000u, v9);\n  LODWORD(v10) = v13.i32[0] & 0x43870000;\n  LODWORD(v16) = _mm_andnot_ps(v13, v9).u32[0] | v13.i32[0] & 0x43870000;\n  v14 = *(&a1->m_player1 + (a2->m_uniqueID == a1->m_player1->m_uniqueID));\n  if ( PlayerObject::isFlying(v14) )\n  {\n    v15 = 300.0;\n  }\n  else if ( v14->m_isBall )\n  {\n    v15 = 240.0;\n  }\n  else\n  {\n    v15 = 270.0;\n  }\n  v9.f32[0] = fmaxf(v15, v16);\n  if ( a1->m_gameState.m_isFreeMode )\n    goto LABEL_29;\nLABEL_25:\n  if ( a3 == 33 || v9.f32[0] != 270.0 || a1->m_gameState.m_isDualMode )\n  {\n    GJBaseGameLayer::animateInDualGroundNew(a1, m_lastActivatedPortal1, v9.f32[0], a4, v10);\n    return;\n  }\nLABEL_29:\n  GJBaseGameLayer::animateOutGroundNew(a1, 0);\n}", "assembly": "; \n; GJBaseGameLayer::updateDualGround from 0x100124680 to 0x100124811 (401 bytes)\n; \n; 8 xrefs:\n; > PlayLayer::loadFromCheckpoint @ 0x1000bd83a\n; > GJBaseGameLayer::setupLevelStart @ 0x1001238b5\n; > GJBaseGameLayer::toggleDualMode @ 0x10012424e\n; > GJBaseGameLayer::updateCameraMode @ 0x100124a18\n; > GJBaseGameLayer::playerWillSwitchMode @ 0x100124abc\n; > GJBaseGameLayer::updateZoom @ 0x10014ec1e\n; > GJBaseGameLayer::resetCamera @ 0x100159f3c\n; > GJBaseGameLayer::exitStaticCamera @ 0x10015c9e6\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    rbp                                                            ; +0x0, 0x100124680\nmov     rbp, rsp                                                       ; +0x1, 0x100124681\npush    r15                                                            ; +0x4, 0x100124684\npush    r14                                                            ; +0x6, 0x100124686\npush    r13                                                            ; +0x8, 0x100124688\npush    r12                                                            ; +0xa, 0x10012468a\npush    rbx                                                            ; +0xc, 0x10012468c\nsub     rsp, 18h                                                       ; +0xd, 0x10012468d\nmov     ebx, ecx                                                       ; +0x11, 0x100124691\nmov     r15d, edx                                                      ; +0x13, 0x100124693\nmovzx   eax, byte ptr [rdi+3F2h]                                       ; +0x16, 0x100124696\ncmp     al, 1                                                          ; +0x1d, 0x10012469d\njnz     short loc_1001246AD                                            ; +0x1f, 0x10012469f\nmov     r14, [rdi+3D8h]                                                ; +0x21, 0x1001246a1\ntest    r14, r14                                                       ; +0x28, 0x1001246a8\njnz     short loc_1001246B4                                            ; +0x2b, 0x1001246ab\nmov     r14, [rdi+3D0h]                                                ; +0x2d, 0x1001246ad\nlea     ecx, [r15-19h]                                                 ; +0x34, 0x1001246b4\ncmp     ecx, 0FFFFFFFDh                                                ; +0x38, 0x1001246b8\nja      short loc_1001246C4                                            ; +0x3b, 0x1001246bb\nmov     [rdi+4E8h], r15d                                               ; +0x3d, 0x1001246bd\nmovss   xmm0, cs:dword_1008152B4                                       ; +0x44, 0x1001246c4\nmovss   xmm1, cs:dword_100815414                                       ; +0x4c, 0x1001246cc\nmov     ecx, r15d                                                      ; +0x54, 0x1001246d4\nnop     word ptr [rax+rax+00000000h]                                   ; +0x57, 0x1001246d7\nlea     edx, [rcx-17h]                                                 ; +0x60, 0x1001246e0\ncmp     edx, 2                                                         ; +0x63, 0x1001246e3\njnb     short loc_1001246F8                                            ; +0x66, 0x1001246e6\nmov     ecx, [rdi+4E8h]                                                ; +0x68, 0x1001246e8\nlea     edx, [rcx-17h]                                                 ; +0x6e, 0x1001246ee\ncmp     edx, 2                                                         ; +0x71, 0x1001246f1\njnb     short loc_1001246E0                                            ; +0x74, 0x1001246f4\njmp     short loc_100124739                                            ; +0x76, 0x1001246f6\ncmp     ecx, 29h ; ')'                                                 ; +0x78, 0x1001246f8\nja      short loc_100124739                                            ; +0x7b, 0x1001246fb\nmov     ecx, ecx                                                       ; +0x7d, 0x1001246fd\nmov     rdx, 20004080020h                                              ; +0x7f, 0x1001246ff\nbt      rdx, rcx                                                       ; +0x89, 0x100124709\njnb     short loc_100124725                                            ; +0x8d, 0x10012470d\ntest    al, al                                                         ; +0x8f, 0x10012470f\njnz     short loc_100124740                                            ; +0x91, 0x100124711\ncmp     byte ptr [rdi+311h], 0                                         ; +0x93, 0x100124713\njz      loc_1001247C9                                                  ; +0x9a, 0x10012471a\njmp     loc_1001247FC                                                  ; +0xa0, 0x100124720\ncmp     rcx, 10h                                                       ; +0xa5, 0x100124725\njnz     short loc_100124739                                            ; +0xa9, 0x100124729\nmovss   xmm0, cs:dword_100815B84                                       ; +0xab, 0x10012472b\ntest    al, al                                                         ; +0xb3, 0x100124733\njz      short loc_100124713                                            ; +0xb5, 0x100124735\njmp     short loc_100124740                                            ; +0xb7, 0x100124737\nmovaps  xmm0, xmm1                                                     ; +0xb9, 0x100124739\ntest    al, al                                                         ; +0xbc, 0x10012473c\njz      short loc_100124713                                            ; +0xbe, 0x10012473e\nmovss   xmm2, cs:dword_100815B84                                       ; +0xc0, 0x100124740\ncmpeqss xmm2, xmm0                                                     ; +0xc8, 0x100124748\nmovss   xmm1, cs:dword_100815414                                       ; +0xcd, 0x10012474d\nandps   xmm1, xmm2                                                     ; +0xd5, 0x100124755\nandnps  xmm2, xmm0                                                     ; +0xd8, 0x100124758\norps    xmm2, xmm1                                                     ; +0xdb, 0x10012475b\nmovaps  xmmword ptr [rbp+var_40], xmm2                                 ; +0xde, 0x10012475e\nmov     eax, [rsi+394h]                                                ; +0xe2, 0x100124762\nmov     rcx, [rdi+0CA0h]                                               ; +0xe8, 0x100124768\nxor     edx, edx                                                       ; +0xef, 0x10012476f\ncmp     eax, [rcx+394h]                                                ; +0xf1, 0x100124771\nsetz    dl                                                             ; +0xf7, 0x100124777\nmov     r13, rdi                                                       ; +0xfa, 0x10012477a\nmov     r12, [rdi+rdx*8+0CA0h]                                         ; +0xfd, 0x10012477d\nmov     rdi, r12                                                       ; +0x105, 0x100124785\ncall    PlayerObject__isFlying                                         ; +0x108, 0x100124788\ntest    al, al                                                         ; +0x10d, 0x10012478d\njz      short loc_10012479B                                            ; +0x10f, 0x10012478f\nmovss   xmm0, cs:dword_1008152B4                                       ; +0x111, 0x100124791\njmp     short loc_1001247B8                                            ; +0x119, 0x100124799\ncmp     byte ptr [r12+96Bh], 0                                         ; +0x11b, 0x10012479b\njnz     short loc_1001247B0                                            ; +0x124, 0x1001247a4\nmovss   xmm0, cs:dword_100815414                                       ; +0x126, 0x1001247a6\njmp     short loc_1001247B8                                            ; +0x12e, 0x1001247ae\nmovss   xmm0, cs:dword_100815B84                                       ; +0x130, 0x1001247b0\nmov     rdi, r13                                                       ; +0x138, 0x1001247b8\nmaxss   xmm0, [rbp+var_40]                                             ; +0x13b, 0x1001247bb\ncmp     byte ptr [rdi+311h], 0                                         ; +0x140, 0x1001247c0\njnz     short loc_1001247FC                                            ; +0x147, 0x1001247c7\ncmp     r15d, 21h ; '!'                                                ; +0x149, 0x1001247c9\njz      short loc_1001247E3                                            ; +0x14d, 0x1001247cd\nucomiss xmm0, cs:dword_100815414                                       ; +0x14f, 0x1001247cf\njnz     short loc_1001247E3                                            ; +0x156, 0x1001247d6\njp      short loc_1001247E3                                            ; +0x158, 0x1001247d8\ncmp     byte ptr [rdi+3F2h], 1                                         ; +0x15a, 0x1001247da\njnz     short loc_1001247FC                                            ; +0x161, 0x1001247e1\nmovzx   edx, bl                                                        ; +0x163, 0x1001247e3\nmov     rsi, r14                                                       ; +0x166, 0x1001247e6\nadd     rsp, 18h                                                       ; +0x169, 0x1001247e9\npop     rbx                                                            ; +0x16d, 0x1001247ed\npop     r12                                                            ; +0x16e, 0x1001247ee\npop     r13                                                            ; +0x170, 0x1001247f0\npop     r14                                                            ; +0x172, 0x1001247f2\npop     r15                                                            ; +0x174, 0x1001247f4\npop     rbp                                                            ; +0x176, 0x1001247f6\njmp     GJBaseGameLayer__animateInDualGroundNew                        ; +0x177, 0x1001247f7\nxor     esi, esi                                                       ; +0x17c, 0x1001247fc\nadd     rsp, 18h                                                       ; +0x17e, 0x1001247fe\npop     rbx                                                            ; +0x182, 0x100124802\npop     r12                                                            ; +0x183, 0x100124803\npop     r13                                                            ; +0x185, 0x100124805\npop     r14                                                            ; +0x187, 0x100124807\npop     r15                                                            ; +0x189, 0x100124809\npop     rbp                                                            ; +0x18b, 0x10012480b\njmp     GJBaseGameLayer__animateOutGroundNew                           ; +0x18c, 0x10012480c", "xrefs": ["PlayLayer::loadFromCheckpoint @ 0x1000bd83a", "GJBaseGameLayer::setupLevelStart @ 0x1001238b5", "GJBaseGameLayer::toggleDualMode @ 0x10012424e", "GJBaseGameLayer::updateCameraMode @ 0x100124a18", "GJBaseGameLayer::playerWillSwitchMode @ 0x100124abc", "GJBaseGameLayer::updateZoom @ 0x10014ec1e", "GJBaseGameLayer::resetCamera @ 0x100159f3c", "GJBaseGameLayer::exitStaticCamera @ 0x10015c9e6"], "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"}