{"type": "func", "start": 4296262608, "end": 4296262889, "name": "GJBaseGameLayer::positionForShaderTarget", "pseudocode": "// \n// GJBaseGameLayer::positionForShaderTarget from 0x10013c3d0 to 0x10013c4e9 (281 bytes)\n// \n// 7 xrefs:\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b4a5\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b4e1\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b517\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b546\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b572\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b59e\n// > GJBaseGameLayer::updateShaderLayer @ 0x10013b5d3\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::positionForShaderTarget(GJBaseGameLayer *a1, int a2)\n{\n  unsigned int v2; // edx\n  unsigned int v3; // r15d\n  __int64 v4; // r14\n  __int64 v5; // rdi\n  cocos2d::CCDictionary *v6; // rdi\n  __int64 v7; // rsi\n  cocos2d::CCObject *v8; // rax\n  intptr_t v9; // r12\n  cocos2d::CCObject *v10; // r15\n  _BYTE v12[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 = *(_QWORD *)(*(_QWORD *)&a2 + 3240LL);\nLABEL_6:\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 192LL))(v5);\n      goto LABEL_17;\n    }\nLABEL_5:\n    v5 = *(_QWORD *)(*(_QWORD *)&a2 + 3232LL);\n    goto LABEL_6;\n  }\n  if ( (int)v3 <= 0 )\n    goto LABEL_16;\n  v6 = *(cocos2d::CCDictionary **)(*(_QWORD *)&a2 + 3656LL);\n  v7 = v3;\n  v8 = cocos2d::CCDictionary::objectForKey(v6, v3);\n  if ( v8 )\n    goto LABEL_9;\n  v9 = 9999;\n  if ( v3 < 0x270F )\n    v9 = v3;\n  if ( ((v10 = *(cocos2d::CCObject **)(*(_QWORD *)(v4 + 3584) + 8 * v9)) != nullptr\n     || (v10 = (cocos2d::CCObject *)sub_10071F9E0(v6, v7),\n         cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(v4 + 3560), v10, v9),\n         (*(_QWORD *)(*(_QWORD *)(v4 + 3584) + 8 * v9) = v10) != 0))\n    && (unsigned int)sub_100720070(v10) == 1\n    && (v8 = (cocos2d::CCObject *)sub_1007200C0(v10, 0)) != nullptr )\n  {\nLABEL_9:\n    ((void (__fastcall *)(_BYTE *, cocos2d::CCObject *))v8->__vftable[16].getTag)(v12, v8);\n  }\n  else\n  {\nLABEL_16:\n    sub_10028CC60(v12);\n  }\nLABEL_17:\n  *(double *)&result = sub_10028CC90();\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::positionForShaderTarget from 0x10013c3d0 to 0x10013c4e9 (281 bytes)\n; \n; 7 xrefs:\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b4a5\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b4e1\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b517\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b546\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b572\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b59e\n; > GJBaseGameLayer::updateShaderLayer @ 0x10013b5d3\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, 0x10013c3d0\nmov     rbp, rsp                                                       ; +0x1, 0x10013c3d1\npush    r15                                                            ; +0x4, 0x10013c3d4\npush    r14                                                            ; +0x6, 0x10013c3d6\npush    r12                                                            ; +0x8, 0x10013c3d8\npush    rbx                                                            ; +0xa, 0x10013c3da\nsub     rsp, 10h                                                       ; +0xb, 0x10013c3db\nmov     r15d, edx                                                      ; +0xf, 0x10013c3df\nmov     r14, rsi                                                       ; +0x12, 0x10013c3e2\nmov     rbx, rdi                                                       ; +0x15, 0x10013c3e5\ncall    sub_10028CC30                                                  ; +0x18, 0x10013c3e8\ncmp     r15d, 0FFFFFFFFh                                               ; +0x1d, 0x10013c3ed\njz      short loc_10013C40C                                            ; +0x21, 0x10013c3f1\ncmp     r15d, 0FFFFFFFEh                                               ; +0x23, 0x10013c3f3\njnz     short loc_10013C427                                            ; +0x27, 0x10013c3f7\ncmp     byte ptr [r14+3F2h], 0                                         ; +0x29, 0x10013c3f9\njz      short loc_10013C40C                                            ; +0x31, 0x10013c401\nmov     rdi, [r14+0CA8h]                                               ; +0x33, 0x10013c403\njmp     short loc_10013C413                                            ; +0x3a, 0x10013c40a\nmov     rdi, [r14+0CA0h]                                               ; +0x3c, 0x10013c40c\nmov     rax, [rdi]                                                     ; +0x43, 0x10013c413\ncall    qword ptr [rax+0C0h]                                           ; +0x46, 0x10013c416\nmov     rdi, rbx                                                       ; +0x4c, 0x10013c41c\nmov     rsi, rax                                                       ; +0x4f, 0x10013c41f\njmp     loc_10013C4D4                                                  ; +0x52, 0x10013c422\ntest    r15d, r15d                                                     ; +0x57, 0x10013c427\njle     loc_10013C4BD                                                  ; +0x5a, 0x10013c42a\nmov     rdi, [r14+0E48h]                                               ; +0x60, 0x10013c430\nmov     esi, r15d                                                      ; +0x67, 0x10013c437\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x6a, 0x10013c43a\ntest    rax, rax                                                       ; +0x6f, 0x10013c43f\njz      short loc_10013C456                                            ; +0x72, 0x10013c442\nmov     rcx, [rax]                                                     ; +0x74, 0x10013c444\nlea     rdi, [rbp+var_28]                                              ; +0x77, 0x10013c447\nmov     rsi, rax                                                       ; +0x7b, 0x10013c44b\ncall    qword ptr [rcx+540h]                                           ; +0x7e, 0x10013c44e\njmp     short loc_10013C4CD                                            ; +0x84, 0x10013c454\ncmp     r15d, 270Fh                                                    ; +0x86, 0x10013c456\nmov     r12d, 270Fh                                                    ; +0x8d, 0x10013c45d\ncmovb   r12d, r15d                                                     ; +0x93, 0x10013c463\nmov     rax, [r14+0E00h]                                               ; +0x97, 0x10013c467\nmov     r15, [rax+r12*8]                                               ; +0x9e, 0x10013c46e\ntest    r15, r15                                                       ; +0xa2, 0x10013c472\njnz     short loc_10013C4A1                                            ; +0xa5, 0x10013c475\ncall    sub_10071F9E0                                                  ; +0xa7, 0x10013c477\nmov     r15, rax                                                       ; +0xac, 0x10013c47c\nmov     rdi, [r14+0DE8h]                                               ; +0xaf, 0x10013c47f\nmov     rsi, rax                                                       ; +0xb6, 0x10013c486\nmov     rdx, r12                                                       ; +0xb9, 0x10013c489\ncall    cocos2d__CCDictionary__setObject                               ; +0xbc, 0x10013c48c\nmov     rax, [r14+0E00h]                                               ; +0xc1, 0x10013c491\nmov     [rax+r12*8], r15                                               ; +0xc8, 0x10013c498\ntest    r15, r15                                                       ; +0xcc, 0x10013c49c\njz      short loc_10013C4BD                                            ; +0xcf, 0x10013c49f\nmov     rdi, r15                                                       ; +0xd1, 0x10013c4a1\ncall    sub_100720070                                                  ; +0xd4, 0x10013c4a4\ncmp     eax, 1                                                         ; +0xd9, 0x10013c4a9\njnz     short loc_10013C4BD                                            ; +0xdc, 0x10013c4ac\nmov     rdi, r15                                                       ; +0xde, 0x10013c4ae\nxor     esi, esi                                                       ; +0xe1, 0x10013c4b1\ncall    sub_1007200C0                                                  ; +0xe3, 0x10013c4b3\ntest    rax, rax                                                       ; +0xe8, 0x10013c4b8\njnz     short loc_10013C444                                            ; +0xeb, 0x10013c4bb\nlea     rsi, qword_10099EFF0                                           ; +0xed, 0x10013c4bd\nlea     rdi, [rbp+var_28]                                              ; +0xf4, 0x10013c4c4\ncall    sub_10028CC60                                                  ; +0xf8, 0x10013c4c8\nlea     rsi, [rbp+var_28]                                              ; +0xfd, 0x10013c4cd\nmov     rdi, rbx                                                       ; +0x101, 0x10013c4d1\ncall    sub_10028CC90                                                  ; +0x104, 0x10013c4d4\nmov     rax, rbx                                                       ; +0x109, 0x10013c4d9\nadd     rsp, 10h                                                       ; +0x10c, 0x10013c4dc\npop     rbx                                                            ; +0x110, 0x10013c4e0\npop     r12                                                            ; +0x111, 0x10013c4e1\npop     r14                                                            ; +0x113, 0x10013c4e3\npop     r15                                                            ; +0x115, 0x10013c4e5\npop     rbp                                                            ; +0x117, 0x10013c4e7\nretn                                                                   ; +0x118, 0x10013c4e8", "xrefs": ["GJBaseGameLayer::updateShaderLayer @ 0x10013b4a5", "GJBaseGameLayer::updateShaderLayer @ 0x10013b4e1", "GJBaseGameLayer::updateShaderLayer @ 0x10013b517", "GJBaseGameLayer::updateShaderLayer @ 0x10013b546", "GJBaseGameLayer::updateShaderLayer @ 0x10013b572", "GJBaseGameLayer::updateShaderLayer @ 0x10013b59e", "GJBaseGameLayer::updateShaderLayer @ 0x10013b5d3"], "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"}