{"type": "func", "start": 5372998368, "end": 5372998585, "name": "SetupCameraOffsetTrigger::onTargetMode", "pseudocode": "// \n// SetupCameraOffsetTrigger::onTargetMode from 0x1404172e0 to 0x1404173b9 (217 bytes)\n// \n// 3 xrefs:\n// > SetupCameraOffsetTrigger::init @ 0x1404164d9\n// > SetupCameraOffsetTrigger::init @ 0x1404165bb\n// > <???> @ 0x1406d8fcc\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 SetupCameraOffsetTrigger::onTargetMode(SetupCameraOffsetTrigger *a1, cocos2d::CCObject *a2)\n{\n  unsigned int v4; // edi\n  int v5; // eax\n  EffectGameObject *m_gameObject; // rcx\n  cocos2d::CCArray *m_gameObjects; // rcx\n  struct cocos2d::CCObject *v8; // rax\n\n  v4 = 0;\n  if ( a1->m_targetMode == a2->getTag(a2) )\n    v5 = 0;\n  else\n    v5 = a2->getTag(a2);\n  a1->m_targetMode = v5;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_moveTargetMode = v5;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects && cocos2d::CCArray::count(m_gameObjects) )\n    {\n      do\n      {\n        v8 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v4++);\n        v8[27].m_nTag = a1->m_targetMode;\n      }\n      while ( v4 < cocos2d::CCArray::count(a1->m_gameObjects) );\n    }\n  }\n  CCMenuItemToggler::toggle(a1->m_xOnlyToggler, a1->m_targetMode == 1);\n  CCMenuItemToggler::toggle(a1->m_yOnlyToggler, a1->m_targetMode == 2);\n}", "assembly": "; \n; SetupCameraOffsetTrigger::onTargetMode from 0x1404172e0 to 0x1404173b9 (217 bytes)\n; \n; 3 xrefs:\n; > SetupCameraOffsetTrigger::init @ 0x1404164d9\n; > SetupCameraOffsetTrigger::init @ 0x1404165bb\n; > <???> @ 0x1406d8fcc\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_0], rbx                                               ; +0x0, 0x1404172e0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1404172e5\npush    rdi                                                            ; +0xa, 0x1404172ea\nsub     rsp, 20h                                                       ; +0xb, 0x1404172eb\nmov     rax, [rdx]                                                     ; +0xf, 0x1404172ef\nmov     rbx, rcx                                                       ; +0x12, 0x1404172f2\nmov     rcx, rdx                                                       ; +0x15, 0x1404172f5\nmov     rsi, rdx                                                       ; +0x18, 0x1404172f8\ncall    qword ptr [rax+38h]                                            ; +0x1b, 0x1404172fb\nxor     edi, edi                                                       ; +0x1e, 0x1404172fe\ncmp     [rbx+408h], eax                                                ; +0x20, 0x140417300\njnz     short loc_14041730C                                            ; +0x26, 0x140417306\nmov     eax, edi                                                       ; +0x28, 0x140417308\njmp     short loc_140417315                                            ; +0x2a, 0x14041730a\nmov     rax, [rsi]                                                     ; +0x2c, 0x14041730c\nmov     rcx, rsi                                                       ; +0x2f, 0x14041730f\ncall    qword ptr [rax+38h]                                            ; +0x32, 0x140417312\nmov     [rbx+408h], eax                                                ; +0x35, 0x140417315\nmov     rcx, [rbx+290h]                                                ; +0x3b, 0x14041731b\ntest    rcx, rcx                                                       ; +0x42, 0x140417322\njz      short loc_14041732F                                            ; +0x45, 0x140417325\nmov     [rcx+5F8h], eax                                                ; +0x47, 0x140417327\njmp     short loc_14041737E                                            ; +0x4d, 0x14041732d\nmov     rcx, [rbx+298h]                                                ; +0x4f, 0x14041732f\ntest    rcx, rcx                                                       ; +0x56, 0x140417336\njz      short loc_14041737E                                            ; +0x59, 0x140417339\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5b, 0x14041733b\ntest    eax, eax                                                       ; +0x61, 0x140417341\njz      short loc_14041737E                                            ; +0x63, 0x140417343\nnop     word ptr [rax+rax+00000000h]                                   ; +0x65, 0x140417345\nmov     rcx, [rbx+298h]                                                ; +0x70, 0x140417350\nmov     edx, edi                                                       ; +0x77, 0x140417357\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x79, 0x140417359\nmov     ecx, [rbx+408h]                                                ; +0x7f, 0x14041735f\ninc     edi                                                            ; +0x85, 0x140417365\nmov     [rax+5F8h], ecx                                                ; +0x87, 0x140417367\nmov     rcx, [rbx+298h]                                                ; +0x8d, 0x14041736d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x94, 0x140417374\ncmp     edi, eax                                                       ; +0x9a, 0x14041737a\njb      short loc_140417350                                            ; +0x9c, 0x14041737c\ncmp     dword ptr [rbx+408h], 1                                        ; +0x9e, 0x14041737e\nmov     rcx, [rbx+410h]                                                ; +0xa5, 0x140417385\nsetz    dl                                                             ; +0xac, 0x14041738c\ncall    CCMenuItemToggler__toggle                                      ; +0xaf, 0x14041738f\ncmp     dword ptr [rbx+408h], 2                                        ; +0xb4, 0x140417394\nmov     rcx, [rbx+418h]                                                ; +0xbb, 0x14041739b\nsetz    dl                                                             ; +0xc2, 0x1404173a2\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xc5, 0x1404173a5\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xca, 0x1404173aa\nadd     rsp, 20h                                                       ; +0xcf, 0x1404173af\npop     rdi                                                            ; +0xd3, 0x1404173b3\njmp     CCMenuItemToggler__toggle                                      ; +0xd4, 0x1404173b4", "xrefs": ["SetupCameraOffsetTrigger::init @ 0x1404164d9", "SetupCameraOffsetTrigger::init @ 0x1404165bb", "<???> @ 0x1406d8fcc"], "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"}