{"type": "func", "start": 4296098320, "end": 4296098566, "name": "GJBaseGameLayer::controlAdvancedFollowCommand", "pseudocode": "// \n// GJBaseGameLayer::controlAdvancedFollowCommand from 0x100114210 to 0x100114306 (246 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::controlTriggersWithControlID @ 0x100114954\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 12:24:33 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::controlAdvancedFollowCommand(__int64 a1, __int64 a2, int a3, int a4)\n{\n  __int64 result; // rax\n  __int64 v5; // rdi\n\n  result = *(_QWORD *)(a1 + 1648);\n  v5 = *(_QWORD *)(a1 + 1656);\n  if ( result != v5 )\n  {\n    if ( a3 == -1 )\n    {\n      if ( a4 )\n      {\n        if ( a4 == 1 )\n        {\n          do\n          {\n            if ( *(_QWORD *)result == a2 )\n              *(_WORD *)(result + 28) = 257;\n            result += 32;\n          }\n          while ( result != v5 );\n        }\n        else if ( a4 == 2 )\n        {\n          do\n          {\n            if ( *(_QWORD *)result == a2 )\n              *(_WORD *)(result + 28) = 0;\n            result += 32;\n          }\n          while ( result != v5 );\n        }\n      }\n      else\n      {\n        do\n        {\n          if ( *(_QWORD *)result == a2 )\n          {\n            *(_WORD *)(result + 28) = 0;\n            *(_BYTE *)(result + 30) = 1;\n          }\n          result += 32;\n        }\n        while ( result != v5 );\n      }\n    }\n    else if ( a4 )\n    {\n      if ( a4 == 1 )\n      {\n        do\n        {\n          if ( *(_DWORD *)(result + 16) == a3 )\n            *(_WORD *)(result + 28) = 257;\n          result += 32;\n        }\n        while ( result != v5 );\n      }\n      else if ( a4 == 2 )\n      {\n        do\n        {\n          if ( *(_DWORD *)(result + 16) == a3 )\n            *(_WORD *)(result + 28) = 0;\n          result += 32;\n        }\n        while ( result != v5 );\n      }\n    }\n    else\n    {\n      do\n      {\n        if ( *(_DWORD *)(result + 16) == a3 )\n        {\n          *(_WORD *)(result + 28) = 0;\n          *(_BYTE *)(result + 30) = 1;\n        }\n        result += 32;\n      }\n      while ( result != v5 );\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::controlAdvancedFollowCommand from 0x100114210 to 0x100114306 (246 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::controlTriggersWithControlID @ 0x100114954\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 12:24:33 +0000\n; \npush    rbp                                                            ; +0x0, 0x100114210\nmov     rbp, rsp                                                       ; +0x1, 0x100114211\nmov     rax, [rdi+670h]                                                ; +0x4, 0x100114214\nmov     rdi, [rdi+678h]                                                ; +0xb, 0x10011421b\ncmp     rax, rdi                                                       ; +0x12, 0x100114222\njz      short loc_1001142A4                                            ; +0x15, 0x100114225\ncmp     edx, 0FFFFFFFFh                                                ; +0x17, 0x100114227\njz      short loc_100114296                                            ; +0x1a, 0x10011422a\ntest    ecx, ecx                                                       ; +0x1c, 0x10011422c\njz      short loc_100114269                                            ; +0x1e, 0x10011422e\ncmp     ecx, 1                                                         ; +0x20, 0x100114230\njz      short loc_100114249                                            ; +0x23, 0x100114233\ncmp     ecx, 2                                                         ; +0x25, 0x100114235\njz      short loc_100114289                                            ; +0x28, 0x100114238\njmp     short loc_1001142A4                                            ; +0x2a, 0x10011423a\nalign 20h                                                              ; +0x2c, 0x10011423c\nadd     rax, 20h ; ' '                                                 ; +0x30, 0x100114240\ncmp     rax, rdi                                                       ; +0x34, 0x100114244\njz      short loc_1001142A4                                            ; +0x37, 0x100114247\ncmp     [rax+10h], edx                                                 ; +0x39, 0x100114249\njnz     short loc_100114240                                            ; +0x3c, 0x10011424c\nmov     word ptr [rax+1Ch], 101h                                       ; +0x3e, 0x10011424e\njmp     short loc_100114240                                            ; +0x44, 0x100114254\nalign 20h                                                              ; +0x46, 0x100114256\nadd     rax, 20h ; ' '                                                 ; +0x50, 0x100114260\ncmp     rax, rdi                                                       ; +0x54, 0x100114264\njz      short loc_1001142A4                                            ; +0x57, 0x100114267\ncmp     [rax+10h], edx                                                 ; +0x59, 0x100114269\njnz     short loc_100114260                                            ; +0x5c, 0x10011426c\nmov     word ptr [rax+1Ch], 0                                          ; +0x5e, 0x10011426e\nmov     byte ptr [rax+1Eh], 1                                          ; +0x64, 0x100114274\njmp     short loc_100114260                                            ; +0x68, 0x100114278\nalign 20h                                                              ; +0x6a, 0x10011427a\nadd     rax, 20h ; ' '                                                 ; +0x70, 0x100114280\ncmp     rax, rdi                                                       ; +0x74, 0x100114284\njz      short loc_1001142A4                                            ; +0x77, 0x100114287\ncmp     [rax+10h], edx                                                 ; +0x79, 0x100114289\njnz     short loc_100114280                                            ; +0x7c, 0x10011428c\nmov     word ptr [rax+1Ch], 0                                          ; +0x7e, 0x10011428e\njmp     short loc_100114280                                            ; +0x84, 0x100114294\ntest    ecx, ecx                                                       ; +0x86, 0x100114296\njz      short loc_1001142D9                                            ; +0x88, 0x100114298\ncmp     ecx, 1                                                         ; +0x8a, 0x10011429a\njz      short loc_1001142B9                                            ; +0x8d, 0x10011429d\ncmp     ecx, 2                                                         ; +0x8f, 0x10011429f\njz      short loc_1001142F9                                            ; +0x92, 0x1001142a2\npop     rbp                                                            ; +0x94, 0x1001142a4\nretn                                                                   ; +0x95, 0x1001142a5\nalign 10h                                                              ; +0x96, 0x1001142a6\nadd     rax, 20h ; ' '                                                 ; +0xa0, 0x1001142b0\ncmp     rax, rdi                                                       ; +0xa4, 0x1001142b4\njz      short loc_1001142A4                                            ; +0xa7, 0x1001142b7\ncmp     [rax], rsi                                                     ; +0xa9, 0x1001142b9\njnz     short loc_1001142B0                                            ; +0xac, 0x1001142bc\nmov     word ptr [rax+1Ch], 101h                                       ; +0xae, 0x1001142be\njmp     short loc_1001142B0                                            ; +0xb4, 0x1001142c4\nalign 10h                                                              ; +0xb6, 0x1001142c6\nadd     rax, 20h ; ' '                                                 ; +0xc0, 0x1001142d0\ncmp     rax, rdi                                                       ; +0xc4, 0x1001142d4\njz      short loc_1001142A4                                            ; +0xc7, 0x1001142d7\ncmp     [rax], rsi                                                     ; +0xc9, 0x1001142d9\njnz     short loc_1001142D0                                            ; +0xcc, 0x1001142dc\nmov     word ptr [rax+1Ch], 0                                          ; +0xce, 0x1001142de\nmov     byte ptr [rax+1Eh], 1                                          ; +0xd4, 0x1001142e4\njmp     short loc_1001142D0                                            ; +0xd8, 0x1001142e8\nalign 10h                                                              ; +0xda, 0x1001142ea\nadd     rax, 20h ; ' '                                                 ; +0xe0, 0x1001142f0\ncmp     rax, rdi                                                       ; +0xe4, 0x1001142f4\njz      short loc_1001142A4                                            ; +0xe7, 0x1001142f7\ncmp     [rax], rsi                                                     ; +0xe9, 0x1001142f9\njnz     short loc_1001142F0                                            ; +0xec, 0x1001142fc\nmov     word ptr [rax+1Ch], 0                                          ; +0xee, 0x1001142fe\njmp     short loc_1001142F0                                            ; +0xf4, 0x100114304", "xrefs": ["GJBaseGameLayer::controlTriggersWithControlID @ 0x100114954"], "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"}