{"type": "func", "start": 5370951168, "end": 5370951424, "name": "GJBaseGameLayer::speedForShaderTarget", "pseudocode": "// \n// GJBaseGameLayer::speedForShaderTarget from 0x140223600 to 0x140223700 (256 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::updateShaderLayer @ 0x1402226ba\n// > GJBaseGameLayer::updateShaderLayer @ 0x1402226e1\n// > <???> @ 0x1406cd5a8\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\n// local variable allocation has failed, the output may be wrong!\ncocos2d::CCPoint GJBaseGameLayer::speedForShaderTarget(GJBaseGameLayer *a1, int a2)\n{\n  int v2; // r8d\n  int v4; // ebx\n  cocos2d::CCPoint v5; // rdi\n  PlayerObject *m_player2; // rbx\n  GameObject *MainObject; // rax\n  GameObject *v8; // rbx\n  __int64 v9; // rax\n  char *v10; // rdx\n  char *v11; // rax\n  char *v12; // rax\n  __int64 v13; // rax\n  cocos2d::CCPoint v15; // [rsp+20h] [rbp-18h] BYREF\n  char v16; // [rsp+48h] [rbp+10h] BYREF\n  char v17; // [rsp+58h] [rbp+20h] BYREF\n\n  v4 = v2;\n  v5 = *(cocos2d::CCPoint *)&a2;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)a2);\n  if ( v4 == -1 )\n    goto LABEL_10;\n  if ( v4 == -2 )\n  {\n    if ( a1->m_gameState.m_isDualMode )\n    {\n      m_player2 = a1->m_player2;\nLABEL_11:\n      v13 = (__int64)m_player2->getPosition_0(m_player2);\n      cocos2d::CCPoint::operator-(v13, &v16, &m_player2->m_lastPosition);\n      v10 = &v16;\n      goto LABEL_12;\n    }\nLABEL_10:\n    m_player2 = a1->m_player1;\n    goto LABEL_11;\n  }\n  if ( v4 < 1 )\n  {\n    cocos2d::CCPoint::operator-(&a1->m_gameState.m_cameraStepDiff, &v16);\n    v10 = v12;\n  }\n  else\n  {\n    MainObject = GJBaseGameLayer::tryGetMainObject(a1, v4);\n    v8 = MainObject;\n    if ( MainObject )\n    {\n      v9 = ((__int64 (__fastcall *)(GameObject *, char *))MainObject->getRealPosition)(MainObject, &v17);\n      cocos2d::CCPoint::operator-(v9, &v16, &v8->m_lastPosition);\n      v10 = &v16;\n    }\n    else\n    {\n      cocos2d::CCPoint::CCPoint(&v15);\n      v10 = v11;\n    }\n  }\nLABEL_12:\n  ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(v5, v10);\n  return v5;\n}", "assembly": "; \n; GJBaseGameLayer::speedForShaderTarget from 0x140223600 to 0x140223700 (256 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::updateShaderLayer @ 0x1402226ba\n; > GJBaseGameLayer::updateShaderLayer @ 0x1402226e1\n; > <???> @ 0x1406cd5a8\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, 0x140223600\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140223605\npush    rdi                                                            ; +0xa, 0x14022360a\nsub     rsp, 30h                                                       ; +0xb, 0x14022360b\nmov     rsi, rcx                                                       ; +0xf, 0x14022360f\nmov     ebx, r8d                                                       ; +0x12, 0x140223612\nmov     rcx, rdx                                                       ; +0x15, 0x140223615\nmov     rdi, rdx                                                       ; +0x18, 0x140223618\ncall    cs:??0CCPoint@cocos2d@@QEAA@XZ; cocos2d::CCPoint::CCPoint(void) ; +0x1b, 0x14022361b\ncmp     ebx, 0FFFFFFFFh                                                ; +0x21, 0x140223621\njz      loc_1402236B7                                                  ; +0x24, 0x140223624\ncmp     ebx, 0FFFFFFFEh                                                ; +0x2a, 0x14022362a\njnz     short loc_140223641                                            ; +0x2d, 0x14022362d\ncmp     byte ptr [rsi+422h], 0                                         ; +0x2f, 0x14022362f\njz      short loc_1402236B7                                            ; +0x36, 0x140223636\nmov     rbx, [rsi+0DA8h]                                               ; +0x38, 0x140223638\njmp     short loc_1402236BE                                            ; +0x3f, 0x14022363f\ncmp     ebx, 1                                                         ; +0x41, 0x140223641\njl      short loc_1402236A0                                            ; +0x44, 0x140223644\nmov     edx, ebx                                                       ; +0x46, 0x140223646\nmov     rcx, rsi                                                       ; +0x48, 0x140223648\ncall    GJBaseGameLayer__tryGetMainObject                              ; +0x4b, 0x14022364b\nmov     rbx, rax                                                       ; +0x50, 0x140223650\ntest    rax, rax                                                       ; +0x53, 0x140223653\njz      short loc_140223689                                            ; +0x56, 0x140223656\nmov     r8, [rax]                                                      ; +0x58, 0x140223658\nlea     rdx, [rsp+38h+arg_18]                                          ; +0x5b, 0x14022365b\nmov     rcx, rax                                                       ; +0x60, 0x140223660\ncall    qword ptr [r8+4A8h]                                            ; +0x63, 0x140223663\nmov     rcx, rax                                                       ; +0x6a, 0x14022366a\nlea     r8, [rbx+4D0h]                                                 ; +0x6d, 0x14022366d\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x74, 0x140223674\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0x79, 0x140223679\nlea     rax, [rsp+38h+arg_8]                                           ; +0x7f, 0x14022367f\nmov     rdx, rax                                                       ; +0x84, 0x140223684\njmp     short loc_1402236E4                                            ; +0x87, 0x140223687\nlea     rdx, dword_1406C1D28                                           ; +0x89, 0x140223689\nlea     rcx, [rsp+38h+var_18]                                          ; +0x90, 0x140223690\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x95, 0x140223695\nmov     rdx, rax                                                       ; +0x9b, 0x14022369b\njmp     short loc_1402236E4                                            ; +0x9e, 0x14022369e\nlea     rcx, [rsi+4DCh]                                                ; +0xa0, 0x1402236a0\nlea     rdx, [rsp+38h+arg_8]                                           ; +0xa7, 0x1402236a7\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@XZ; cocos2d::CCPoint::operator-(void) ; +0xac, 0x1402236ac\nmov     rdx, rax                                                       ; +0xb2, 0x1402236b2\njmp     short loc_1402236E4                                            ; +0xb5, 0x1402236b5\nmov     rbx, [rsi+0DA0h]                                               ; +0xb7, 0x1402236b7\nmov     rax, [rbx]                                                     ; +0xbe, 0x1402236be\nmov     rcx, rbx                                                       ; +0xc1, 0x1402236c1\ncall    qword ptr [rax+0C8h]                                           ; +0xc4, 0x1402236c4\nmov     rcx, rax                                                       ; +0xca, 0x1402236ca\nlea     r8, [rbx+4D0h]                                                 ; +0xcd, 0x1402236cd\nlea     rdx, [rsp+38h+arg_8]                                           ; +0xd4, 0x1402236d4\ncall    cs:??GCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator-(cocos2d::CCPoint const &) ; +0xd9, 0x1402236d9\nlea     rdx, [rsp+38h+arg_8]                                           ; +0xdf, 0x1402236df\nmov     rcx, rdi                                                       ; +0xe4, 0x1402236e4\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xe7, 0x1402236e7\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xed, 0x1402236ed\nmov     rax, rdi                                                       ; +0xf2, 0x1402236f2\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xf5, 0x1402236f5\nadd     rsp, 30h                                                       ; +0xfa, 0x1402236fa\npop     rdi                                                            ; +0xfe, 0x1402236fe\nretn                                                                   ; +0xff, 0x1402236ff", "xrefs": ["GJBaseGameLayer::updateShaderLayer @ 0x1402226ba", "GJBaseGameLayer::updateShaderLayer @ 0x1402226e1", "<???> @ 0x1406cd5a8"], "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"}