{"type": "func", "start": 5372125888, "end": 5372126421, "name": "GJBaseGameLayer::updatePlatformerTime", "pseudocode": "// \n// GJBaseGameLayer::updatePlatformerTime from 0x1403422c0 to 0x1403424d5 (533 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::updateSpecialLabels @ 0x140342010\n// > PlayLayer::toggleProgressbar @ 0x140511384\n// > <???> @ 0x14091fd90\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:40 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall GJBaseGameLayer::updatePlatformerTime(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n  unsigned int v5; // ebx\n  __int64 v6; // rsi\n  __int64 v7; // rdx\n  __int64 v8; // rax\n  cocos2d::CCString *v9; // rax\n  const char *CString; // rax\n  size_t v11; // r8\n  __int64 v12; // rax\n  __int64 *v13; // rbx\n  __int64 *i; // rsi\n  __int64 v15; // rdi\n  void **v16; // rdx\n  __int64 v17; // rax\n  void *v18; // rcx\n  int v19; // [rsp+30h] [rbp-78h] BYREF\n  _BYTE v20[32]; // [rsp+38h] [rbp-70h] BYREF\n  void *Block[2]; // [rsp+58h] [rbp-50h] BYREF\n  __int128 v22; // [rsp+68h] [rbp-40h]\n  _QWORD v23[4]; // [rsp+78h] [rbp-30h] BYREF\n\n  v5 = (int)(float)((float)(int)(*(double *)(a1 + 13920) * 1000.0) / 1000.0);\n  v6 = (unsigned int)(int)(float)((float)(int)((int)(*(double *)(a1 + 13920) * 1000.0) - 1000 * v5) / 10.0);\n  LOBYTE(a4) = 1;\n  (*(void (__fastcall **)(__int64, _QWORD, __int64, __int64))(*(_QWORD *)a1 + 1400LL))(a1, v5, v6, a4);\n  v7 = *(_QWORD *)(a1 + 4400);\n  v8 = *(_QWORD *)(v7 + 16 * (*(_QWORD *)(a1 + 4424) & 0x994F76653E2A3951uLL) + 8);\n  if ( v8 != *(_QWORD *)(a1 + 4384) )\n  {\n    if ( *(_DWORD *)(v8 + 16) == -1 )\n      goto LABEL_7;\n    while ( v8 != *(_QWORD *)(v7 + 16 * (*(_QWORD *)(a1 + 4424) & 0x994F76653E2A3951uLL)) )\n    {\n      v8 = *(_QWORD *)(v8 + 8);\n      if ( *(_DWORD *)(v8 + 16) == -1 )\n        goto LABEL_7;\n    }\n  }\n  v8 = 0;\nLABEL_7:\n  if ( v8 )\n  {\n    v9 = cocos2d::CCString::createWithFormat(\"%i.%02d\", v5, v6);\n    CString = cocos2d::CCString::getCString(v9);\n    *(_OWORD *)Block = 0;\n    v22 = 0;\n    v11 = -1;\n    do\n      ++v11;\n    while ( CString[v11] );\n    sub_14003D230(Block, CString, v11);\n    GameToolbox::intToString(v23, v5);\n    v19 = -1;\n    v12 = sub_1403572D0(a1 + 4376, v20, &v19);\n    v13 = *(__int64 **)(*(_QWORD *)v12 + 24LL);\n    for ( i = *(__int64 **)(*(_QWORD *)v12 + 32LL); v13 != i; ++v13 )\n    {\n      v15 = *v13;\n      if ( *(_BYTE *)(*v13 + 773) )\n      {\n        v16 = (void **)v23;\n        if ( !*(_BYTE *)(v15 + 1912) )\n          v16 = Block;\n        v17 = sub_14003F4F0((__int64)v20, (__int64)v16);\n        LabelGameObject::updateLabel(v15, v17);\n      }\n    }\n    sub_14003D310((__int64)v23);\n    if ( *((_QWORD *)&v22 + 1) > 0xFu )\n    {\n      v18 = Block[0];\n      if ( (unsigned __int64)(*((_QWORD *)&v22 + 1) + 1LL) >= 0x1000 )\n      {\n        v18 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v18 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v18);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updatePlatformerTime from 0x1403422c0 to 0x1403424d5 (533 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::updateSpecialLabels @ 0x140342010\n; > PlayLayer::toggleProgressbar @ 0x140511384\n; > <???> @ 0x14091fd90\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:40 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403422c0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1403422c5\npush    rdi                                                            ; +0xa, 0x1403422ca\nsub     rsp, 0A0h                                                      ; +0xb, 0x1403422cb\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x1403422d2\nxor     rax, rsp                                                       ; +0x19, 0x1403422d9\nmov     [rsp+0A8h+var_10], rax                                         ; +0x1c, 0x1403422dc\nmov     rdi, rcx                                                       ; +0x24, 0x1403422e4\nmovsd   xmm0, qword ptr [rcx+3660h]                                    ; +0x27, 0x1403422e7\nmulsd   xmm0, cs:qword_140835460                                       ; +0x2f, 0x1403422ef\ncvttsd2si edx, xmm0                                                    ; +0x37, 0x1403422f7\nmovd    xmm1, edx                                                      ; +0x3b, 0x1403422fb\ncvtdq2ps xmm1, xmm1                                                    ; +0x3f, 0x1403422ff\ndivss   xmm1, cs:dword_140835AA4                                       ; +0x42, 0x140342302\ncvttss2si ebx, xmm1                                                    ; +0x4a, 0x14034230a\nimul    eax, ebx, 3E8h                                                 ; +0x4e, 0x14034230e\nsub     edx, eax                                                       ; +0x54, 0x140342314\nmovd    xmm0, edx                                                      ; +0x56, 0x140342316\ncvtdq2ps xmm0, xmm0                                                    ; +0x5a, 0x14034231a\ndivss   xmm0, cs:flt_1408354EC                                         ; +0x5d, 0x14034231d\ncvttss2si esi, xmm0                                                    ; +0x65, 0x140342325\nmov     rax, [rcx]                                                     ; +0x69, 0x140342329\nmov     r9b, 1                                                         ; +0x6c, 0x14034232c\nmov     r8d, esi                                                       ; +0x6f, 0x14034232f\nmov     edx, ebx                                                       ; +0x72, 0x140342332\ncall    qword ptr [rax+578h]                                           ; +0x74, 0x140342334\nmov     rcx, [rdi+1148h]                                               ; +0x7a, 0x14034233a\nmov     rax, 994F76653E2A3951h                                         ; +0x81, 0x140342341\nand     rcx, rax                                                       ; +0x8b, 0x14034234b\nadd     rcx, rcx                                                       ; +0x8e, 0x14034234e\nmov     rdx, [rdi+1130h]                                               ; +0x91, 0x140342351\nmov     rax, [rdx+rcx*8+8]                                             ; +0x98, 0x140342358\ncmp     rax, [rdi+1120h]                                               ; +0x9d, 0x14034235d\njz      short loc_140342381                                            ; +0xa4, 0x140342364\nmov     rcx, [rdx+rcx*8]                                               ; +0xa6, 0x140342366\ncmp     dword ptr [rax+10h], 0FFFFFFFFh                                ; +0xaa, 0x14034236a\njz      short loc_140342383                                            ; +0xae, 0x14034236e\ncmp     rax, rcx                                                       ; +0xb0, 0x140342370\njz      short loc_140342381                                            ; +0xb3, 0x140342373\nmov     rax, [rax+8]                                                   ; +0xb5, 0x140342375\ncmp     dword ptr [rax+10h], 0FFFFFFFFh                                ; +0xb9, 0x140342379\njnz     short loc_140342370                                            ; +0xbd, 0x14034237d\njmp     short loc_140342383                                            ; +0xbf, 0x14034237f\nxor     eax, eax                                                       ; +0xc1, 0x140342381\ntest    rax, rax                                                       ; +0xc3, 0x140342383\njz      loc_1403424B0                                                  ; +0xc6, 0x140342386\nmov     r8d, esi                                                       ; +0xcc, 0x14034238c\nmov     edx, ebx                                                       ; +0xcf, 0x14034238f\nlea     rcx, aI02d; \"%i.%02d\"                                          ; +0xd1, 0x140342391\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xd8, 0x140342398\nmov     rcx, rax                                                       ; +0xde, 0x14034239e\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xe1, 0x1403423a1\nxorps   xmm0, xmm0                                                     ; +0xe7, 0x1403423a7\nmovups  xmmword ptr [rsp+0A8h+Block], xmm0                             ; +0xea, 0x1403423aa\nxorps   xmm1, xmm1                                                     ; +0xef, 0x1403423af\nmovdqu  [rsp+0A8h+var_40], xmm1                                        ; +0xf2, 0x1403423b2\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xf8, 0x1403423b8\nnop                                                                    ; +0xff, 0x1403423bf\ninc     r8                                                             ; +0x100, 0x1403423c0\ncmp     byte ptr [rax+r8], 0                                           ; +0x103, 0x1403423c3\njnz     short loc_1403423C0                                            ; +0x108, 0x1403423c8\nmov     rdx, rax                                                       ; +0x10a, 0x1403423ca\nlea     rcx, [rsp+0A8h+Block]                                          ; +0x10d, 0x1403423cd\ncall    sub_14003D230                                                  ; +0x112, 0x1403423d2\nnop                                                                    ; +0x117, 0x1403423d7\nmov     edx, ebx                                                       ; +0x118, 0x1403423d8\nlea     rcx, [rsp+0A8h+var_30]                                         ; +0x11a, 0x1403423da\ncall    GameToolbox__intToString                                       ; +0x11f, 0x1403423df\nnop                                                                    ; +0x124, 0x1403423e4\nmov     [rsp+0A8h+var_78], 0FFFFFFFFh                                  ; +0x125, 0x1403423e5\nlea     rcx, [rdi+1118h]                                               ; +0x12d, 0x1403423ed\nlea     r8, [rsp+0A8h+var_78]                                          ; +0x134, 0x1403423f4\nlea     rdx, [rsp+0A8h+var_70]                                         ; +0x139, 0x1403423f9\ncall    sub_1403572D0                                                  ; +0x13e, 0x1403423fe\nmov     rcx, [rax]                                                     ; +0x143, 0x140342403\nmov     rbx, [rcx+18h]                                                 ; +0x146, 0x140342406\nmov     rsi, [rcx+20h]                                                 ; +0x14a, 0x14034240a\ncmp     rbx, rsi                                                       ; +0x14e, 0x14034240e\njz      short loc_140342452                                            ; +0x151, 0x140342411\nmov     rdi, [rbx]                                                     ; +0x153, 0x140342413\ncmp     byte ptr [rdi+305h], 0                                         ; +0x156, 0x140342416\njz      short loc_140342449                                            ; +0x15d, 0x14034241d\nlea     rdx, [rsp+0A8h+var_30]                                         ; +0x15f, 0x14034241f\nlea     rax, [rsp+0A8h+Block]                                          ; +0x164, 0x140342424\ncmp     byte ptr [rdi+778h], 0                                         ; +0x169, 0x140342429\ncmovz   rdx, rax                                                       ; +0x170, 0x140342430\nlea     rcx, [rsp+0A8h+var_70]                                         ; +0x174, 0x140342434\ncall    sub_14003F4F0                                                  ; +0x179, 0x140342439\nmov     rdx, rax                                                       ; +0x17e, 0x14034243e\nmov     rcx, rdi                                                       ; +0x181, 0x140342441\ncall    LabelGameObject__updateLabel                                   ; +0x184, 0x140342444\nadd     rbx, 8                                                         ; +0x189, 0x140342449\ncmp     rbx, rsi                                                       ; +0x18d, 0x14034244d\njnz     short loc_140342413                                            ; +0x190, 0x140342450\nlea     rcx, [rsp+0A8h+var_30]                                         ; +0x192, 0x140342452\ncall    sub_14003D310                                                  ; +0x197, 0x140342457\nnop                                                                    ; +0x19c, 0x14034245c\nmov     rdx, qword ptr [rsp+0A8h+var_40+8]                             ; +0x19d, 0x14034245d\ncmp     rdx, 0Fh                                                       ; +0x1a2, 0x140342462\njbe     short loc_1403424B0                                            ; +0x1a6, 0x140342466\ninc     rdx                                                            ; +0x1a8, 0x140342468\nmov     rcx, [rsp+0A8h+Block]; Block                                   ; +0x1ab, 0x14034246b\nmov     rax, rcx                                                       ; +0x1b0, 0x140342470\ncmp     rdx, 1000h                                                     ; +0x1b3, 0x140342473\njb      short loc_1403424AB                                            ; +0x1ba, 0x14034247a\nadd     rdx, 27h ; '''                                                 ; +0x1bc, 0x14034247c\nmov     rcx, [rcx-8]                                                   ; +0x1c0, 0x140342480\nsub     rax, rcx                                                       ; +0x1c4, 0x140342484\nsub     rax, 8                                                         ; +0x1c7, 0x140342487\ncmp     rax, 1Fh                                                       ; +0x1cb, 0x14034248b\njbe     short loc_1403424AB                                            ; +0x1cf, 0x14034248f\nmov     [rsp+0A8h+Reserved], 0; Reserved                               ; +0x1d1, 0x140342491\nxor     r9d, r9d; LineNo                                               ; +0x1da, 0x14034249a\nxor     r8d, r8d; FileName                                             ; +0x1dd, 0x14034249d\nxor     edx, edx; FunctionName                                         ; +0x1e0, 0x1403424a0\nxor     ecx, ecx; Expression                                           ; +0x1e2, 0x1403424a2\ncall    cs:_invoke_watson                                              ; +0x1e4, 0x1403424a4\ndb 0CCh                                                                ; +0x1ea, 0x1403424aa\ncall    j_j_free                                                       ; +0x1eb, 0x1403424ab\nmov     rcx, [rsp+0A8h+var_10]                                         ; +0x1f0, 0x1403424b0\nxor     rcx, rsp; StackCookie                                          ; +0x1f8, 0x1403424b8\ncall    __security_check_cookie                                        ; +0x1fb, 0x1403424bb\nlea     r11, [rsp+0A8h+var_8]                                          ; +0x200, 0x1403424c0\nmov     rbx, [r11+18h]                                                 ; +0x208, 0x1403424c8\nmov     rsi, [r11+20h]                                                 ; +0x20c, 0x1403424cc\nmov     rsp, r11                                                       ; +0x210, 0x1403424d0\npop     rdi                                                            ; +0x213, 0x1403424d3\nretn                                                                   ; +0x214, 0x1403424d4", "xrefs": ["GJBaseGameLayer::updateSpecialLabels @ 0x140342010", "PlayLayer::toggleProgressbar @ 0x140511384", "<???> @ 0x14091fd90"], "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"}