{"type": "func", "start": 5371957136, "end": 5371957478, "name": "GJBaseGameLayer::resetPlayer", "pseudocode": "// \n// GJBaseGameLayer::resetPlayer from 0x140318f90 to 0x1403190e6 (342 bytes)\n// \n// 4 xrefs:\n// > GJBaseGameLayer::resetLevelVariables @ 0x1403458c9\n// > LevelEditorLayer::onPlaytest @ 0x1403feec7\n// > PlayLayer::setupHasCompleted @ 0x140504e60\n// > <???> @ 0x14091eab8\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 11:30:19 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::resetPlayer(_QWORD *a1)\n{\n  __int64 v2; // rcx\n  __int64 v3; // rax\n  _QWORD *v4; // rsi\n  __int64 Object; // rax\n  __int64 v6; // rax\n  __int64 *v7; // rdi\n  __int64 v8; // rbx\n  __int64 v9; // rax\n  __int64 *v10; // rdi\n  __int64 v11; // rbx\n  __int64 v12; // rax\n  __int64 result; // rax\n  int v14; // [rsp+40h] [rbp+8h] BYREF\n  char v15; // [rsp+48h] [rbp+10h] BYREF\n\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, 0.0, 105.0);\n  v2 = a1[1614];\n  if ( v2 )\n  {\n    v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 200LL))(v2);\n    cocos2d::CCPoint::operator=(&v14, v3);\n    v4 = a1 + 441;\n  }\n  else\n  {\n    v4 = a1 + 441;\n    if ( *(int *)(a1[441] + 452LL) > 0 )\n    {\n      Object = GJBaseGameLayer::tryGetObject(a1);\n      if ( Object )\n      {\n        v6 = (*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)Object + 1208LL))(Object, &v15);\n        cocos2d::CCPoint::operator=(&v14, v6);\n        if ( !*(_BYTE *)(*v4 + 341LL) )\n          v14 = 0;\n      }\n    }\n  }\n  v7 = (__int64 *)a1[439];\n  v8 = *v7;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);\n  (*(void (__fastcall **)(__int64 *, __int64))(v8 + 1216))(v7, v9);\n  (*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[439] + 1136LL))(a1[439]);\n  v10 = (__int64 *)a1[440];\n  v11 = *v10;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);\n  (*(void (__fastcall **)(__int64 *, __int64))(v11 + 1216))(v10, v12);\n  (*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[440] + 1136LL))(a1[440]);\n  *(_BYTE *)(a1[439] + 2608LL) = *(_BYTE *)(*v4 + 469LL) == 0;\n  result = a1[440];\n  *(_BYTE *)(result + 2608) = *(_BYTE *)(*v4 + 469LL) == 0;\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::resetPlayer from 0x140318f90 to 0x1403190e6 (342 bytes)\n; \n; 4 xrefs:\n; > GJBaseGameLayer::resetLevelVariables @ 0x1403458c9\n; > LevelEditorLayer::onPlaytest @ 0x1403feec7\n; > PlayLayer::setupHasCompleted @ 0x140504e60\n; > <???> @ 0x14091eab8\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 11:30:19 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140318f90\npush    rbp                                                            ; +0x5, 0x140318f95\npush    rsi                                                            ; +0x6, 0x140318f96\npush    rdi                                                            ; +0x7, 0x140318f97\nsub     rsp, 20h                                                       ; +0x8, 0x140318f98\nmovss   xmm2, cs:dword_1408357C4                                       ; +0xc, 0x140318f9c\nmov     rbp, rcx                                                       ; +0x14, 0x140318fa4\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x17, 0x140318fa7\nxorps   xmm1, xmm1                                                     ; +0x1c, 0x140318fac\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1f, 0x140318faf\nmov     rcx, [rbp+3270h]                                               ; +0x25, 0x140318fb5\ntest    rcx, rcx                                                       ; +0x2c, 0x140318fbc\njz      short loc_140318FE1                                            ; +0x2f, 0x140318fbf\nmov     rax, [rcx]                                                     ; +0x31, 0x140318fc1\ncall    qword ptr [rax+0C8h]                                           ; +0x34, 0x140318fc4\nmov     rdx, rax                                                       ; +0x3a, 0x140318fca\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x3d, 0x140318fcd\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x42, 0x140318fd2\nlea     rsi, [rbp+0DC8h]                                               ; +0x48, 0x140318fd8\njmp     short loc_140319039                                            ; +0x4f, 0x140318fdf\nlea     rsi, [rbp+0DC8h]                                               ; +0x51, 0x140318fe1\nmov     rax, [rsi]                                                     ; +0x58, 0x140318fe8\nmov     edx, [rax+1C4h]                                                ; +0x5b, 0x140318feb\ntest    edx, edx                                                       ; +0x61, 0x140318ff1\njle     short loc_140319039                                            ; +0x63, 0x140318ff3\nmov     rcx, rbp                                                       ; +0x65, 0x140318ff5\ncall    GJBaseGameLayer__tryGetObject                                  ; +0x68, 0x140318ff8\ntest    rax, rax                                                       ; +0x6d, 0x140318ffd\njz      short loc_140319039                                            ; +0x70, 0x140319000\nmov     rcx, [rax]                                                     ; +0x72, 0x140319002\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x75, 0x140319005\nmov     r8, [rcx+4B8h]                                                 ; +0x7a, 0x14031900a\nmov     rcx, rax                                                       ; +0x81, 0x140319011\ncall    r8                                                             ; +0x84, 0x140319014\nmov     rdx, rax                                                       ; +0x87, 0x140319017\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x8a, 0x14031901a\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x8f, 0x14031901f\nmov     rax, [rsi]                                                     ; +0x95, 0x140319025\ncmp     byte ptr [rax+155h], 0                                         ; +0x98, 0x140319028\njnz     short loc_140319039                                            ; +0x9f, 0x14031902f\nmov     [rsp+38h+arg_0], 0                                             ; +0xa1, 0x140319031\nmov     rdi, [rbp+0DB8h]                                               ; +0xa9, 0x140319039\nlea     rdx, [rsp+38h+arg_0]                                           ; +0xb0, 0x140319040\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xb5, 0x140319045\nmov     rbx, [rdi]                                                     ; +0xba, 0x14031904a\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xbd, 0x14031904d\nmov     rdx, rax                                                       ; +0xc3, 0x140319053\nmov     rcx, rdi                                                       ; +0xc6, 0x140319056\ncall    qword ptr [rbx+4C0h]                                           ; +0xc9, 0x140319059\nmov     rcx, [rbp+0DB8h]                                               ; +0xcf, 0x14031905f\nmov     rax, [rcx]                                                     ; +0xd6, 0x140319066\ncall    qword ptr [rax+470h]                                           ; +0xd9, 0x140319069\nmov     rdi, [rbp+0DC0h]                                               ; +0xdf, 0x14031906f\nlea     rdx, [rsp+38h+arg_0]                                           ; +0xe6, 0x140319076\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xeb, 0x14031907b\nmov     rbx, [rdi]                                                     ; +0xf0, 0x140319080\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xf3, 0x140319083\nmov     rdx, rax                                                       ; +0xf9, 0x140319089\nmov     rcx, rdi                                                       ; +0xfc, 0x14031908c\ncall    qword ptr [rbx+4C0h]                                           ; +0xff, 0x14031908f\nmov     rcx, [rbp+0DC0h]                                               ; +0x105, 0x140319095\nmov     rax, [rcx]                                                     ; +0x10c, 0x14031909c\ncall    qword ptr [rax+470h]                                           ; +0x10f, 0x14031909f\nmov     rax, [rsi]                                                     ; +0x115, 0x1403190a5\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x118, 0x1403190a8\ncmp     byte ptr [rax+1D5h], 0                                         ; +0x11d, 0x1403190ad\nmov     rax, [rbp+0DB8h]                                               ; +0x124, 0x1403190b4\nsetz    cl                                                             ; +0x12b, 0x1403190bb\nmov     [rax+0A30h], cl                                                ; +0x12e, 0x1403190be\nmov     rax, [rsi]                                                     ; +0x134, 0x1403190c4\ncmp     byte ptr [rax+1D5h], 0                                         ; +0x137, 0x1403190c7\nmov     rax, [rbp+0DC0h]                                               ; +0x13e, 0x1403190ce\nsetz    cl                                                             ; +0x145, 0x1403190d5\nmov     [rax+0A30h], cl                                                ; +0x148, 0x1403190d8\nadd     rsp, 20h                                                       ; +0x14e, 0x1403190de\npop     rdi                                                            ; +0x152, 0x1403190e2\npop     rsi                                                            ; +0x153, 0x1403190e3\npop     rbp                                                            ; +0x154, 0x1403190e4\nretn                                                                   ; +0x155, 0x1403190e5", "xrefs": ["GJBaseGameLayer::resetLevelVariables @ 0x1403458c9", "LevelEditorLayer::onPlaytest @ 0x1403feec7", "PlayLayer::setupHasCompleted @ 0x140504e60", "<???> @ 0x14091eab8"], "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"}