{"type": "func", "start": 4296194368, "end": 4296194988, "name": "GJBaseGameLayer::getMoveTargetDelta", "pseudocode": "// \n// GJBaseGameLayer::getMoveTargetDelta from 0x10012b940 to 0x10012bbac (620 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::triggerMoveCommand @ 0x100137a0b\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::getMoveTargetDelta(GJBaseGameLayer *a1, EffectGameObject *a2, bool a3)\n{\n  char v3; // cl\n  char v4; // r12\n  __int64 v5; // r13\n  int v7; // ebx\n  cocos2d::CCDictionary *v8; // rdi\n  __int64 v9; // rsi\n  GameObject *Object; // r15\n  intptr_t v11; // r15\n  cocos2d::CCObject *v12; // rbx\n  cocos2d::CCObject *v13; // rsi\n  int v14; // ebx\n  cocos2d::CCDictionary *v15; // rdi\n  intptr_t v16; // r12\n  cocos2d::CCObject *v17; // rbx\n  GameObject *v18; // rax\n  _BYTE v20[8]; // [rsp+0h] [rbp-40h] BYREF\n  _BYTE v21[8]; // [rsp+8h] [rbp-38h] BYREF\n  GJBaseGameLayer *v22; // [rsp+10h] [rbp-30h]\n  cocos2d::CCPoint result; // 0:xmm0_8.8\n\n  v4 = v3;\n  v5 = a3;\n  v22 = a1;\n  v7 = *(_DWORD *)(a3 + 1528LL);\n  if ( v7 <= 0 )\n  {\n    v7 = *(_DWORD *)(a3 + 1464LL);\n    if ( v3 )\n      goto LABEL_3;\nLABEL_8:\n    Object = GJBaseGameLayer::tryGetObject((GJBaseGameLayer *)a2, v7);\n    if ( *(_BYTE *)(v5 + 1684) )\n      goto LABEL_33;\n    goto LABEL_18;\n  }\n  if ( !v3 )\n    goto LABEL_8;\nLABEL_3:\n  if ( v7 <= 0 )\n    goto LABEL_17;\n  v8 = *(cocos2d::CCDictionary **)&a2[1].m_unk708;\n  v9 = (unsigned int)v7;\n  Object = (GameObject *)cocos2d::CCDictionary::objectForKey(v8, (unsigned int)v7);\n  if ( Object )\n  {\n    if ( *(_BYTE *)(v5 + 1684) )\n      goto LABEL_33;\n    goto LABEL_18;\n  }\n  v11 = 9999;\n  if ( (unsigned int)v7 < 0x270F )\n    v11 = (unsigned int)v7;\n  v12 = *(cocos2d::CCObject **)(*(_QWORD *)&a2[1].m_zoomValue + 8 * v11);\n  if ( v12\n    || (v12 = (cocos2d::CCObject *)sub_10071F9E0(v8, v9),\n        cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)&a2[1].m_unk6a8, v12, v11),\n        (*(_QWORD *)(*(_QWORD *)&a2[1].m_zoomValue + 8 * v11) = v12) != 0) )\n  {\n    if ( (unsigned int)sub_100720070(v12) == 1 )\n    {\n      Object = (GameObject *)sub_1007200C0(v12, 0);\n      if ( *(_BYTE *)(v5 + 1684) )\n        goto LABEL_33;\n    }\n    else\n    {\n      Object = nullptr;\n      if ( *(_BYTE *)(v5 + 1684) )\n        goto LABEL_33;\n    }\n  }\n  else\n  {\nLABEL_17:\n    Object = nullptr;\n    if ( *(_BYTE *)(v5 + 1684) )\n      goto LABEL_33;\n  }\nLABEL_18:\n  if ( *(_BYTE *)(v5 + 1685) == 1 )\n  {\n    if ( LOBYTE(a2->m_exitType) )\n    {\n      v13 = *(cocos2d::CCObject **)&a2[1].m_rotationDelta;\n      goto LABEL_34;\n    }\nLABEL_33:\n    v13 = *(cocos2d::CCObject **)&a2[1].m_rotationSpeed;\n    goto LABEL_34;\n  }\n  v14 = *(_DWORD *)(v5 + 1468);\n  if ( !v4 )\n  {\n    v18 = GJBaseGameLayer::tryGetObject((GJBaseGameLayer *)a2, v14);\nLABEL_31:\n    v13 = v18;\n    goto LABEL_34;\n  }\n  if ( v14 <= 0 )\n  {\nLABEL_37:\n    *(double *)&result = sub_10028CC60(v22);\n    return result;\n  }\n  v15 = *(cocos2d::CCDictionary **)&a2[1].m_unk708;\n  v13 = cocos2d::CCDictionary::objectForKey(v15, *(unsigned int *)(v5 + 1468));\n  if ( !v13 )\n  {\n    v16 = 9999;\n    if ( (unsigned int)v14 < 0x270F )\n      v16 = (unsigned int)v14;\n    v17 = *(cocos2d::CCObject **)(*(_QWORD *)&a2[1].m_zoomValue + 8 * v16);\n    if ( !v17 )\n    {\n      v17 = (cocos2d::CCObject *)sub_10071F9E0(v15, 0);\n      cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)&a2[1].m_unk6a8, v17, v16);\n      *(_QWORD *)(*(_QWORD *)&a2[1].m_zoomValue + 8 * v16) = v17;\n      if ( !v17 )\n        goto LABEL_37;\n    }\n    if ( (unsigned int)sub_100720070(v17) != 1 )\n      goto LABEL_37;\n    v18 = (GameObject *)sub_1007200C0(v17, 0);\n    goto LABEL_31;\n  }\nLABEL_34:\n  if ( !Object || !v13 || Object->m_uniqueID == v13[16].m_uReference )\n    goto LABEL_37;\n  ((void (__fastcall *)(_BYTE *))v13->__vftable[16].getTag)(v20);\n  ((void (__fastcall *)(_BYTE *, GameObject *))Object->getRealPosition)(v21, Object);\n  sub_10028CD00(v22, v20, v21);\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getMoveTargetDelta from 0x10012b940 to 0x10012bbac (620 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::triggerMoveCommand @ 0x100137a0b\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, 0x10012b940\nmov     rbp, rsp                                                       ; +0x1, 0x10012b941\npush    r15                                                            ; +0x4, 0x10012b944\npush    r14                                                            ; +0x6, 0x10012b946\npush    r13                                                            ; +0x8, 0x10012b948\npush    r12                                                            ; +0xa, 0x10012b94a\npush    rbx                                                            ; +0xc, 0x10012b94c\nsub     rsp, 18h                                                       ; +0xd, 0x10012b94d\nmov     r12d, ecx                                                      ; +0x11, 0x10012b951\nmov     r13, rdx                                                       ; +0x14, 0x10012b954\nmov     r14, rsi                                                       ; +0x17, 0x10012b957\nmov     [rbp+var_30], rdi                                              ; +0x1a, 0x10012b95a\nmov     ebx, [rdx+5F8h]                                                ; +0x1e, 0x10012b95e\ntest    ebx, ebx                                                       ; +0x24, 0x10012b964\njle     short loc_10012B99E                                            ; +0x26, 0x10012b966\ntest    r12b, r12b                                                     ; +0x28, 0x10012b968\njz      short loc_10012B9AA                                            ; +0x2b, 0x10012b96b\ntest    ebx, ebx                                                       ; +0x2d, 0x10012b96d\njle     loc_10012BA42                                                  ; +0x2f, 0x10012b96f\nmov     rdi, [r14+0E48h]                                               ; +0x35, 0x10012b975\nmov     esi, ebx                                                       ; +0x3c, 0x10012b97c\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x3e, 0x10012b97e\nmov     r15, rax                                                       ; +0x43, 0x10012b983\ntest    rax, rax                                                       ; +0x46, 0x10012b986\njz      short loc_10012B9CA                                            ; +0x49, 0x10012b989\ncmp     byte ptr [r13+694h], 0                                         ; +0x4b, 0x10012b98b\njz      loc_10012BA53                                                  ; +0x53, 0x10012b993\njmp     loc_10012BB2D                                                  ; +0x59, 0x10012b999\nmov     ebx, [r13+5B8h]                                                ; +0x5e, 0x10012b99e\ntest    r12b, r12b                                                     ; +0x65, 0x10012b9a5\njnz     short loc_10012B96D                                            ; +0x68, 0x10012b9a8\nmov     rdi, r14                                                       ; +0x6a, 0x10012b9aa\nmov     esi, ebx                                                       ; +0x6d, 0x10012b9ad\ncall    GJBaseGameLayer__tryGetObject                                  ; +0x6f, 0x10012b9af\nmov     r15, rax                                                       ; +0x74, 0x10012b9b4\ncmp     byte ptr [r13+694h], 0                                         ; +0x77, 0x10012b9b7\njnz     loc_10012BB2D                                                  ; +0x7f, 0x10012b9bf\njmp     loc_10012BA53                                                  ; +0x85, 0x10012b9c5\ncmp     ebx, 270Fh                                                     ; +0x8a, 0x10012b9ca\nmov     r15d, 270Fh                                                    ; +0x90, 0x10012b9d0\ncmovb   r15d, ebx                                                      ; +0x96, 0x10012b9d6\nmov     rax, [r14+0E00h]                                               ; +0x9a, 0x10012b9da\nmov     rbx, [rax+r15*8]                                               ; +0xa1, 0x10012b9e1\ntest    rbx, rbx                                                       ; +0xa5, 0x10012b9e5\njnz     short loc_10012BA14                                            ; +0xa8, 0x10012b9e8\ncall    sub_10071F9E0                                                  ; +0xaa, 0x10012b9ea\nmov     rbx, rax                                                       ; +0xaf, 0x10012b9ef\nmov     rdi, [r14+0DE8h]                                               ; +0xb2, 0x10012b9f2\nmov     rsi, rax                                                       ; +0xb9, 0x10012b9f9\nmov     rdx, r15                                                       ; +0xbc, 0x10012b9fc\ncall    cocos2d__CCDictionary__setObject                               ; +0xbf, 0x10012b9ff\nmov     rax, [r14+0E00h]                                               ; +0xc4, 0x10012ba04\nmov     [rax+r15*8], rbx                                               ; +0xcb, 0x10012ba0b\ntest    rbx, rbx                                                       ; +0xcf, 0x10012ba0f\njz      short loc_10012BA42                                            ; +0xd2, 0x10012ba12\nmov     rdi, rbx                                                       ; +0xd4, 0x10012ba14\ncall    sub_100720070                                                  ; +0xd7, 0x10012ba17\ncmp     eax, 1                                                         ; +0xdc, 0x10012ba1c\njnz     loc_10012BB1C                                                  ; +0xdf, 0x10012ba1f\nmov     rdi, rbx                                                       ; +0xe5, 0x10012ba25\nxor     esi, esi                                                       ; +0xe8, 0x10012ba28\ncall    sub_1007200C0                                                  ; +0xea, 0x10012ba2a\nmov     r15, rax                                                       ; +0xef, 0x10012ba2f\ncmp     byte ptr [r13+694h], 0                                         ; +0xf2, 0x10012ba32\njnz     loc_10012BB2D                                                  ; +0xfa, 0x10012ba3a\njmp     short loc_10012BA53                                            ; +0x100, 0x10012ba40\nxor     r15d, r15d                                                     ; +0x102, 0x10012ba42\ncmp     byte ptr [r13+694h], 0                                         ; +0x105, 0x10012ba45\njnz     loc_10012BB2D                                                  ; +0x10d, 0x10012ba4d\ncmp     byte ptr [r13+695h], 1                                         ; +0x113, 0x10012ba53\njnz     short loc_10012BA77                                            ; +0x11b, 0x10012ba5b\ncmp     byte ptr [r14+3F2h], 0                                         ; +0x11d, 0x10012ba5d\njz      loc_10012BB2D                                                  ; +0x125, 0x10012ba65\nmov     rsi, [r14+0CA8h]                                               ; +0x12b, 0x10012ba6b\njmp     loc_10012BB34                                                  ; +0x132, 0x10012ba72\nmov     ebx, [r13+5BCh]                                                ; +0x137, 0x10012ba77\ntest    r12b, r12b                                                     ; +0x13e, 0x10012ba7e\njz      loc_10012BB0D                                                  ; +0x141, 0x10012ba81\ntest    ebx, ebx                                                       ; +0x147, 0x10012ba87\njle     loc_10012BB4D                                                  ; +0x149, 0x10012ba89\nmov     rdi, [r14+0E48h]                                               ; +0x14f, 0x10012ba8f\nmov     rsi, rbx                                                       ; +0x156, 0x10012ba96\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x159, 0x10012ba99\nmov     rsi, rax                                                       ; +0x15e, 0x10012ba9e\ntest    rax, rax                                                       ; +0x161, 0x10012baa1\njnz     loc_10012BB34                                                  ; +0x164, 0x10012baa4\ncmp     ebx, 270Fh                                                     ; +0x16a, 0x10012baaa\nmov     r12d, 270Fh                                                    ; +0x170, 0x10012bab0\ncmovb   r12d, ebx                                                      ; +0x176, 0x10012bab6\nmov     rax, [r14+0E00h]                                               ; +0x17a, 0x10012baba\nmov     rbx, [rax+r12*8]                                               ; +0x181, 0x10012bac1\ntest    rbx, rbx                                                       ; +0x185, 0x10012bac5\njnz     short loc_10012BAF4                                            ; +0x188, 0x10012bac8\ncall    sub_10071F9E0                                                  ; +0x18a, 0x10012baca\nmov     rbx, rax                                                       ; +0x18f, 0x10012bacf\nmov     rdi, [r14+0DE8h]                                               ; +0x192, 0x10012bad2\nmov     rsi, rax                                                       ; +0x199, 0x10012bad9\nmov     rdx, r12                                                       ; +0x19c, 0x10012badc\ncall    cocos2d__CCDictionary__setObject                               ; +0x19f, 0x10012badf\nmov     rax, [r14+0E00h]                                               ; +0x1a4, 0x10012bae4\nmov     [rax+r12*8], rbx                                               ; +0x1ab, 0x10012baeb\ntest    rbx, rbx                                                       ; +0x1af, 0x10012baef\njz      short loc_10012BB4D                                            ; +0x1b2, 0x10012baf2\nmov     rdi, rbx                                                       ; +0x1b4, 0x10012baf4\ncall    sub_100720070                                                  ; +0x1b7, 0x10012baf7\ncmp     eax, 1                                                         ; +0x1bc, 0x10012bafc\njnz     short loc_10012BB4D                                            ; +0x1bf, 0x10012baff\nmov     rdi, rbx                                                       ; +0x1c1, 0x10012bb01\nxor     esi, esi                                                       ; +0x1c4, 0x10012bb04\ncall    sub_1007200C0                                                  ; +0x1c6, 0x10012bb06\njmp     short loc_10012BB17                                            ; +0x1cb, 0x10012bb0b\nmov     rdi, r14                                                       ; +0x1cd, 0x10012bb0d\nmov     esi, ebx                                                       ; +0x1d0, 0x10012bb10\ncall    GJBaseGameLayer__tryGetObject                                  ; +0x1d2, 0x10012bb12\nmov     rsi, rax                                                       ; +0x1d7, 0x10012bb17\njmp     short loc_10012BB34                                            ; +0x1da, 0x10012bb1a\nxor     r15d, r15d                                                     ; +0x1dc, 0x10012bb1c\ncmp     byte ptr [r13+694h], 0                                         ; +0x1df, 0x10012bb1f\njz      loc_10012BA53                                                  ; +0x1e7, 0x10012bb27\nmov     rsi, [r14+0CA0h]                                               ; +0x1ed, 0x10012bb2d\ntest    r15, r15                                                       ; +0x1f4, 0x10012bb34\njz      short loc_10012BB4D                                            ; +0x1f7, 0x10012bb37\ntest    rsi, rsi                                                       ; +0x1f9, 0x10012bb39\njz      short loc_10012BB4D                                            ; +0x1fc, 0x10012bb3c\nmov     eax, [r15+394h]                                                ; +0x1fe, 0x10012bb3e\ncmp     eax, [rsi+394h]                                                ; +0x205, 0x10012bb45\njnz     short loc_10012BB65                                            ; +0x20b, 0x10012bb4b\nlea     rsi, qword_10099EFF0                                           ; +0x20d, 0x10012bb4d\nmov     rbx, [rbp+var_30]                                              ; +0x214, 0x10012bb54\nmov     rdi, rbx                                                       ; +0x218, 0x10012bb58\ncall    sub_10028CC60                                                  ; +0x21b, 0x10012bb5b\nmov     rax, rbx                                                       ; +0x220, 0x10012bb60\njmp     short loc_10012BB9D                                            ; +0x223, 0x10012bb63\nmov     rax, [rsi]                                                     ; +0x225, 0x10012bb65\nlea     rbx, [rbp+var_40]                                              ; +0x228, 0x10012bb68\nmov     rdi, rbx                                                       ; +0x22c, 0x10012bb6c\ncall    qword ptr [rax+540h]                                           ; +0x22f, 0x10012bb6f\nmov     rax, [r15]                                                     ; +0x235, 0x10012bb75\nlea     r14, [rbp+var_38]                                              ; +0x238, 0x10012bb78\nmov     rdi, r14                                                       ; +0x23c, 0x10012bb7c\nmov     rsi, r15                                                       ; +0x23f, 0x10012bb7f\ncall    qword ptr [rax+540h]                                           ; +0x242, 0x10012bb82\nmov     r15, [rbp+var_30]                                              ; +0x248, 0x10012bb88\nmov     rdi, r15                                                       ; +0x24c, 0x10012bb8c\nmov     rsi, rbx                                                       ; +0x24f, 0x10012bb8f\nmov     rdx, r14                                                       ; +0x252, 0x10012bb92\ncall    sub_10028CD00                                                  ; +0x255, 0x10012bb95\nmov     rax, r15                                                       ; +0x25a, 0x10012bb9a\nadd     rsp, 18h                                                       ; +0x25d, 0x10012bb9d\npop     rbx                                                            ; +0x261, 0x10012bba1\npop     r12                                                            ; +0x262, 0x10012bba2\npop     r13                                                            ; +0x264, 0x10012bba4\npop     r14                                                            ; +0x266, 0x10012bba6\npop     r15                                                            ; +0x268, 0x10012bba8\npop     rbp                                                            ; +0x26a, 0x10012bbaa\nretn                                                                   ; +0x26b, 0x10012bbab", "xrefs": ["GJBaseGameLayer::triggerMoveCommand @ 0x100137a0b"], "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"}