{"type": "func", "start": 4296262896, "end": 4296263294, "name": "GJBaseGameLayer::speedForShaderTarget", "pseudocode": "// \n// GJBaseGameLayer::speedForShaderTarget from 0x10013c4f0 to 0x10013c67e (398 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b66d\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b694\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 __fastcall GJBaseGameLayer::speedForShaderTarget(GJBaseGameLayer *a1, int a2)\n{\n  unsigned int v2; // edx\n  unsigned int v3; // r15d\n  __int64 v4; // r14\n  __int64 v5; // r15\n  GameObject *v6; // rdi\n  const cocos2d::CCPoint *LastPosition; // rax\n  cocos2d::CCDictionary *v8; // rdi\n  __int64 v9; // rsi\n  cocos2d::CCObject *v10; // rax\n  GameObject *v11; // r15\n  const cocos2d::CCPoint *v12; // rax\n  intptr_t v13; // r12\n  cocos2d::CCObject *v14; // r15\n  _BYTE v16[8]; // [rsp+0h] [rbp-30h] BYREF\n  _BYTE v17[40]; // [rsp+8h] [rbp-28h] BYREF\n  cocos2d::CCPoint result; // 0:xmm0_8.8\n\n  v3 = v2;\n  v4 = *(_QWORD *)&a2;\n  sub_10028CC30(a1);\n  if ( v3 == -1 )\n    goto LABEL_5;\n  if ( v3 == -2 )\n  {\n    if ( *(_BYTE *)(*(_QWORD *)&a2 + 1010LL) )\n    {\n      v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)&a2 + 3240LL) + 192LL))(*(_QWORD *)(*(_QWORD *)&a2 + 3240LL));\n      v6 = *(GameObject **)(*(_QWORD *)&a2 + 3240LL);\nLABEL_6:\n      LastPosition = GameObject::getLastPosition(v6);\n      sub_10028CD00(v17, v5, LastPosition);\n      goto LABEL_18;\n    }\nLABEL_5:\n    v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)&a2 + 3232LL) + 192LL))(*(_QWORD *)(*(_QWORD *)&a2 + 3232LL));\n    v6 = *(GameObject **)(*(_QWORD *)&a2 + 3232LL);\n    goto LABEL_6;\n  }\n  if ( (int)v3 <= 0 )\n  {\n    sub_10028CD20(v17, *(_QWORD *)&a2 + 1148LL);\n  }\n  else\n  {\n    v8 = *(cocos2d::CCDictionary **)(*(_QWORD *)&a2 + 3656LL);\n    v9 = v3;\n    v10 = cocos2d::CCDictionary::objectForKey(v8, v3);\n    if ( v10 )\n      goto LABEL_9;\n    v13 = 9999;\n    if ( v3 < 0x270F )\n      v13 = v3;\n    if ( ((v14 = *(cocos2d::CCObject **)(*(_QWORD *)(v4 + 3584) + 8 * v13)) != nullptr\n       || (v14 = (cocos2d::CCObject *)sub_10071F9E0(v8, v9),\n           cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(v4 + 3560), v14, v13),\n           (*(_QWORD *)(*(_QWORD *)(v4 + 3584) + 8 * v13) = v14) != 0))\n      && (unsigned int)sub_100720070(v14) == 1\n      && (v10 = (cocos2d::CCObject *)sub_1007200C0(v14, 0)) != nullptr )\n    {\nLABEL_9:\n      v11 = (GameObject *)v10;\n      ((void (__fastcall *)(_BYTE *, cocos2d::CCObject *))v10->__vftable[16].getTag)(v16, v10);\n      v12 = GameObject::getLastPosition(v11);\n      sub_10028CD00(v17, v16, v12);\n    }\n    else\n    {\n      sub_10028CC60(v17);\n    }\n  }\nLABEL_18:\n  *(double *)&result = sub_10028CC90();\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::speedForShaderTarget from 0x10013c4f0 to 0x10013c67e (398 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b66d\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b694\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, 0x10013c4f0\nmov     rbp, rsp                                                       ; +0x1, 0x10013c4f1\npush    r15                                                            ; +0x4, 0x10013c4f4\npush    r14                                                            ; +0x6, 0x10013c4f6\npush    r12                                                            ; +0x8, 0x10013c4f8\npush    rbx                                                            ; +0xa, 0x10013c4fa\nsub     rsp, 10h                                                       ; +0xb, 0x10013c4fb\nmov     r15d, edx                                                      ; +0xf, 0x10013c4ff\nmov     r14, rsi                                                       ; +0x12, 0x10013c502\nmov     rbx, rdi                                                       ; +0x15, 0x10013c505\ncall    sub_10028CC30                                                  ; +0x18, 0x10013c508\ncmp     r15d, 0FFFFFFFFh                                               ; +0x1d, 0x10013c50d\njz      short loc_10013C53F                                            ; +0x21, 0x10013c511\ncmp     r15d, 0FFFFFFFEh                                               ; +0x23, 0x10013c513\njnz     short loc_10013C57B                                            ; +0x27, 0x10013c517\ncmp     byte ptr [r14+3F2h], 0                                         ; +0x29, 0x10013c519\njz      short loc_10013C53F                                            ; +0x31, 0x10013c521\nmov     rdi, [r14+0CA8h]                                               ; +0x33, 0x10013c523\nmov     rax, [rdi]                                                     ; +0x3a, 0x10013c52a\ncall    qword ptr [rax+0C0h]                                           ; +0x3d, 0x10013c52d\nmov     r15, rax                                                       ; +0x43, 0x10013c533\nmov     rdi, [r14+0CA8h]                                               ; +0x46, 0x10013c536\njmp     short loc_10013C559                                            ; +0x4d, 0x10013c53d\nmov     rdi, [r14+0CA0h]                                               ; +0x4f, 0x10013c53f\nmov     rax, [rdi]                                                     ; +0x56, 0x10013c546\ncall    qword ptr [rax+0C0h]                                           ; +0x59, 0x10013c549\nmov     r15, rax                                                       ; +0x5f, 0x10013c54f\nmov     rdi, [r14+0CA0h]                                               ; +0x62, 0x10013c552\ncall    GameObject__getLastPosition                                    ; +0x69, 0x10013c559\nlea     r14, [rbp+var_28]                                              ; +0x6e, 0x10013c55e\nmov     rdi, r14                                                       ; +0x72, 0x10013c562\nmov     rsi, r15                                                       ; +0x75, 0x10013c565\nmov     rdx, rax                                                       ; +0x78, 0x10013c568\ncall    sub_10028CD00                                                  ; +0x7b, 0x10013c56b\nmov     rdi, rbx                                                       ; +0x80, 0x10013c570\nmov     rsi, r14                                                       ; +0x83, 0x10013c573\njmp     loc_10013C669                                                  ; +0x86, 0x10013c576\ntest    r15d, r15d                                                     ; +0x8b, 0x10013c57b\njle     short loc_10013C5C6                                            ; +0x8e, 0x10013c57e\nmov     rdi, [r14+0E48h]                                               ; +0x90, 0x10013c580\nmov     esi, r15d                                                      ; +0x97, 0x10013c587\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x9a, 0x10013c58a\ntest    rax, rax                                                       ; +0x9f, 0x10013c58f\njz      short loc_10013C5E7                                            ; +0xa2, 0x10013c592\nmov     rcx, [rax]                                                     ; +0xa4, 0x10013c594\nlea     r14, [rbp+var_30]                                              ; +0xa7, 0x10013c597\nmov     rdi, r14                                                       ; +0xab, 0x10013c59b\nmov     rsi, rax                                                       ; +0xae, 0x10013c59e\nmov     r15, rax                                                       ; +0xb1, 0x10013c5a1\ncall    qword ptr [rcx+540h]                                           ; +0xb4, 0x10013c5a4\nmov     rdi, r15                                                       ; +0xba, 0x10013c5aa\ncall    GameObject__getLastPosition                                    ; +0xbd, 0x10013c5ad\nlea     rdi, [rbp+var_28]                                              ; +0xc2, 0x10013c5b2\nmov     rsi, r14                                                       ; +0xc6, 0x10013c5b6\nmov     rdx, rax                                                       ; +0xc9, 0x10013c5b9\ncall    sub_10028CD00                                                  ; +0xcc, 0x10013c5bc\njmp     loc_10013C662                                                  ; +0xd1, 0x10013c5c1\nadd     r14, 47Ch                                                      ; +0xd6, 0x10013c5c6\nlea     r15, [rbp+var_28]                                              ; +0xdd, 0x10013c5cd\nmov     rdi, r15                                                       ; +0xe1, 0x10013c5d1\nmov     rsi, r14                                                       ; +0xe4, 0x10013c5d4\ncall    sub_10028CD20                                                  ; +0xe7, 0x10013c5d7\nmov     rdi, rbx                                                       ; +0xec, 0x10013c5dc\nmov     rsi, r15                                                       ; +0xef, 0x10013c5df\njmp     loc_10013C669                                                  ; +0xf2, 0x10013c5e2\ncmp     r15d, 270Fh                                                    ; +0xf7, 0x10013c5e7\nmov     r12d, 270Fh                                                    ; +0xfe, 0x10013c5ee\ncmovb   r12d, r15d                                                     ; +0x104, 0x10013c5f4\nmov     rax, [r14+0E00h]                                               ; +0x108, 0x10013c5f8\nmov     r15, [rax+r12*8]                                               ; +0x10f, 0x10013c5ff\ntest    r15, r15                                                       ; +0x113, 0x10013c603\njnz     short loc_10013C632                                            ; +0x116, 0x10013c606\ncall    sub_10071F9E0                                                  ; +0x118, 0x10013c608\nmov     r15, rax                                                       ; +0x11d, 0x10013c60d\nmov     rdi, [r14+0DE8h]                                               ; +0x120, 0x10013c610\nmov     rsi, rax                                                       ; +0x127, 0x10013c617\nmov     rdx, r12                                                       ; +0x12a, 0x10013c61a\ncall    cocos2d__CCDictionary__setObject                               ; +0x12d, 0x10013c61d\nmov     rax, [r14+0E00h]                                               ; +0x132, 0x10013c622\nmov     [rax+r12*8], r15                                               ; +0x139, 0x10013c629\ntest    r15, r15                                                       ; +0x13d, 0x10013c62d\njz      short loc_10013C652                                            ; +0x140, 0x10013c630\nmov     rdi, r15                                                       ; +0x142, 0x10013c632\ncall    sub_100720070                                                  ; +0x145, 0x10013c635\ncmp     eax, 1                                                         ; +0x14a, 0x10013c63a\njnz     short loc_10013C652                                            ; +0x14d, 0x10013c63d\nmov     rdi, r15                                                       ; +0x14f, 0x10013c63f\nxor     esi, esi                                                       ; +0x152, 0x10013c642\ncall    sub_1007200C0                                                  ; +0x154, 0x10013c644\ntest    rax, rax                                                       ; +0x159, 0x10013c649\njnz     loc_10013C594                                                  ; +0x15c, 0x10013c64c\nlea     rsi, qword_10099EFF0                                           ; +0x162, 0x10013c652\nlea     rdi, [rbp+var_28]                                              ; +0x169, 0x10013c659\ncall    sub_10028CC60                                                  ; +0x16d, 0x10013c65d\nlea     rsi, [rbp+var_28]                                              ; +0x172, 0x10013c662\nmov     rdi, rbx                                                       ; +0x176, 0x10013c666\ncall    sub_10028CC90                                                  ; +0x179, 0x10013c669\nmov     rax, rbx                                                       ; +0x17e, 0x10013c66e\nadd     rsp, 10h                                                       ; +0x181, 0x10013c671\npop     rbx                                                            ; +0x185, 0x10013c675\npop     r12                                                            ; +0x186, 0x10013c676\npop     r14                                                            ; +0x188, 0x10013c678\npop     r15                                                            ; +0x18a, 0x10013c67a\npop     rbp                                                            ; +0x18c, 0x10013c67c\nretn                                                                   ; +0x18d, 0x10013c67d", "xrefs": ["GJBaseGameLayer::updateShaderLayer @ 0x10013b66d", "GJBaseGameLayer::updateShaderLayer @ 0x10013b694"], "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"}