{"type": "func", "start": 4294981584, "end": 4294981823, "name": "GJRotateCommandLayer::onFollowRotation", "pseudocode": "// \n// GJRotateCommandLayer::onFollowRotation from 0x1000037d0 to 0x1000038bf (239 bytes)\n// \n// 2 xrefs:\n// > GJRotateCommandLayer::init @ 0x100002847\n// > GJRotateCommandLayer::init @ 0x100002967\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 GJRotateCommandLayer::onFollowRotation(GJRotateCommandLayer *a1, cocos2d::CCObject *a2)\n{\n  bool m_followP1; // al\n  bool v4; // al\n  EffectGameObject *m_gameObject; // rax\n  cocos2d::CCArray *m_gameObjects; // rdi\n  unsigned int v7; // r14d\n  __int64 v8; // rax\n\n  if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) == 1 )\n  {\n    m_followP1 = a1->m_followP1;\n    a1->m_followP1 = !m_followP1;\n    a1->m_followP2 = 0;\n    v4 = !m_followP1;\n  }\n  else\n  {\n    a1->m_followP2 ^= 1u;\n    a1->m_followP1 = 0;\n    v4 = 0;\n  }\n  CCMenuItemToggler::toggle(a1->m_followP1Toggler, v4);\n  CCMenuItemToggler::toggle(a1->m_followP2Toggler, a1->m_followP2);\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_targetPlayer1 = a1->m_followP1;\n    m_gameObject->m_targetPlayer2 = a1->m_followP2;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects && (unsigned int)sub_100720070(m_gameObjects) )\n    {\n      v7 = 0;\n      do\n      {\n        v8 = sub_1007200C0(a1->m_gameObjects, v7);\n        *(_BYTE *)(v8 + 1684) = a1->m_followP1;\n        *(_BYTE *)(v8 + 1685) = a1->m_followP2;\n        ++v7;\n      }\n      while ( v7 < (unsigned int)sub_100720070(a1->m_gameObjects) );\n    }\n  }\n}", "assembly": "; \n; GJRotateCommandLayer::onFollowRotation from 0x1000037d0 to 0x1000038bf (239 bytes)\n; \n; 2 xrefs:\n; > GJRotateCommandLayer::init @ 0x100002847\n; > GJRotateCommandLayer::init @ 0x100002967\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, 0x1000037d0\nmov     rbp, rsp                                                       ; +0x1, 0x1000037d1\npush    r14                                                            ; +0x4, 0x1000037d4\npush    rbx                                                            ; +0x6, 0x1000037d6\nmov     rbx, rdi                                                       ; +0x7, 0x1000037d7\nmov     rax, [rsi]                                                     ; +0xa, 0x1000037da\nmov     rdi, rsi                                                       ; +0xd, 0x1000037dd\ncall    qword ptr [rax+40h]                                            ; +0x10, 0x1000037e0\ncmp     eax, 1                                                         ; +0x13, 0x1000037e3\njnz     short loc_100003808                                            ; +0x16, 0x1000037e6\nmovzx   eax, byte ptr [rbx+42Dh]                                       ; +0x18, 0x1000037e8\nmov     ecx, eax                                                       ; +0x1f, 0x1000037ef\nxor     cl, 1                                                          ; +0x21, 0x1000037f1\nmov     [rbx+42Dh], cl                                                 ; +0x24, 0x1000037f4\nmov     byte ptr [rbx+42Eh], 0                                         ; +0x2a, 0x1000037fa\ntest    al, al                                                         ; +0x31, 0x100003801\nsetz    al                                                             ; +0x33, 0x100003803\njmp     short loc_100003818                                            ; +0x36, 0x100003806\nxor     byte ptr [rbx+42Eh], 1                                         ; +0x38, 0x100003808\nmov     byte ptr [rbx+42Dh], 0                                         ; +0x3f, 0x10000380f\nxor     eax, eax                                                       ; +0x46, 0x100003816\nmov     rdi, [rbx+430h]                                                ; +0x48, 0x100003818\nmovzx   esi, al                                                        ; +0x4f, 0x10000381f\ncall    CCMenuItemToggler__toggle                                      ; +0x52, 0x100003822\nmov     rdi, [rbx+438h]                                                ; +0x57, 0x100003827\nmovzx   esi, byte ptr [rbx+42Eh]                                       ; +0x5e, 0x10000382e\ncall    CCMenuItemToggler__toggle                                      ; +0x65, 0x100003835\nmov     rax, [rbx+290h]                                                ; +0x6a, 0x10000383a\ntest    rax, rax                                                       ; +0x71, 0x100003841\njz      short loc_100003865                                            ; +0x74, 0x100003844\nmovzx   ecx, byte ptr [rbx+42Dh]                                       ; +0x76, 0x100003846\nmov     [rax+694h], cl                                                 ; +0x7d, 0x10000384d\nmovzx   ecx, byte ptr [rbx+42Eh]                                       ; +0x83, 0x100003853\nmov     [rax+695h], cl                                                 ; +0x8a, 0x10000385a\npop     rbx                                                            ; +0x90, 0x100003860\npop     r14                                                            ; +0x91, 0x100003861\npop     rbp                                                            ; +0x93, 0x100003863\nretn                                                                   ; +0x94, 0x100003864\nmov     rdi, [rbx+298h]                                                ; +0x95, 0x100003865\ntest    rdi, rdi                                                       ; +0x9c, 0x10000386c\njz      short loc_100003860                                            ; +0x9f, 0x10000386f\ncall    sub_100720070                                                  ; +0xa1, 0x100003871\ntest    eax, eax                                                       ; +0xa6, 0x100003876\njz      short loc_100003860                                            ; +0xa8, 0x100003878\nxor     r14d, r14d                                                     ; +0xaa, 0x10000387a\nnop     dword ptr [rax]                                                ; +0xad, 0x10000387d\nmov     rdi, [rbx+298h]                                                ; +0xb0, 0x100003880\nmov     esi, r14d                                                      ; +0xb7, 0x100003887\ncall    sub_1007200C0                                                  ; +0xba, 0x10000388a\nmovzx   ecx, byte ptr [rbx+42Dh]                                       ; +0xbf, 0x10000388f\nmov     [rax+694h], cl                                                 ; +0xc6, 0x100003896\nmovzx   ecx, byte ptr [rbx+42Eh]                                       ; +0xcc, 0x10000389c\nmov     [rax+695h], cl                                                 ; +0xd3, 0x1000038a3\ninc     r14d                                                           ; +0xd9, 0x1000038a9\nmov     rdi, [rbx+298h]                                                ; +0xdc, 0x1000038ac\ncall    sub_100720070                                                  ; +0xe3, 0x1000038b3\ncmp     r14d, eax                                                      ; +0xe8, 0x1000038b8\njb      short loc_100003880                                            ; +0xeb, 0x1000038bb\njmp     short loc_100003860                                            ; +0xed, 0x1000038bd", "xrefs": ["GJRotateCommandLayer::init @ 0x100002847", "GJRotateCommandLayer::init @ 0x100002967"], "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"}