{"type": "func", "start": 4300136144, "end": 4300136526, "name": "GameToolbox::getTimeString", "pseudocode": "// \n// GameToolbox::getTimeString from 0x1004eded0 to 0x1004ee04e (382 bytes)\n// \n// 6 xrefs:\n// > RewardsPage::updateTimers @ 0x1001fe80d\n// > RewardsPage::updateTimers @ 0x1001fe873\n// > DailyLevelPage::getDailyTimeString @ 0x100215611\n// > LevelInfoLayer::updateLabelValues @ 0x1002af8ad\n// > ChallengesPage::updateTimers @ 0x1003875ca\n// > GameLevelManager::onUploadCommentCompleted @ 0x100526cc8\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 12:31:23 +0000\n// \n\n_QWORD *__fastcall GameToolbox::getTimeString(_QWORD *a1, int a2, char a3, __m128 a4)\n{\n  char v4; // al\n  __m128 v5; // xmm2\n  __m128 v6; // xmm2\n  int v7; // esi\n  __m128 v8; // xmm1\n  int v9; // ecx\n  __m128 v10; // xmm1\n  int v11; // eax\n  char *v13; // rdi\n  __int64 v14; // rax\n  const char *CString; // r12\n  size_t v16; // rax\n  size_t v17; // r15\n  void *v18; // r14\n  size_t v19; // r13\n  char v21; // [rsp-8h] [rbp-30h]\n\n  v21 = v4;\n  a4.f32[0] = (float)a2;\n  v5 = a4;\n  v5.f32[0] = (float)a2 / 86400.0;\n  v6 = _mm_round_ss(v5, v5, 9);\n  v7 = (int)v6.f32[0];\n  a4.f32[0] = a4.f32[0] - (float)(_mm_cvtepi32_ps(_mm_cvttps_epi32(v6)).f32[0] * 86400.0);\n  v8 = a4;\n  v8.f32[0] = a4.f32[0] / 3600.0;\n  v9 = (int)_mm_round_ss(v8, v8, 9).f32[0];\n  a4.f32[0] = a4.f32[0] - (float)(3600 * v9);\n  v10 = a4;\n  v10.f32[0] = a4.f32[0] / 60.0;\n  v11 = (int)_mm_round_ss(v10, v10, 9).f32[0];\n  if ( (v11 + v9 + v7 < 0) ^ __OFADD__(v11, v9 + v7) | (v11 + v9 + v7 == 0) )\n  {\n    v13 = \"%isec\";\n  }\n  else if ( v9 + v7 <= 0 )\n  {\n    if ( a3 )\n      v13 = \"%imin\";\n    else\n      v13 = \"%imin %02dsec\";\n  }\n  else if ( v7 <= 0 )\n  {\n    v13 = \"%ih %imin\";\n  }\n  else\n  {\n    v13 = \"%idays %ih\";\n  }\n  v14 = sub_10088E820(v13, v21);\n  CString = (const char *)cocos2d::CCString::getCString(v14);\n  v16 = strlen(CString);\n  if ( v16 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v17 = v16;\n  if ( v16 >= 0x17 )\n  {\n    v19 = 26;\n    if ( (v16 | 7) != 0x17 )\n      v19 = (v16 | 7) + 1;\n    v18 = operator new(v19);\n    a1[2] = v18;\n    *a1 = v19 + 1;\n    a1[1] = v17;\n  }\n  else\n  {\n    *(_BYTE *)a1 = 2 * v16;\n    v18 = (char *)a1 + 1;\n    if ( !v16 )\n      goto LABEL_18;\n  }\n  memmove(v18, CString, v17);\nLABEL_18:\n  *((_BYTE *)v18 + v17) = 0;\n  return a1;\n}", "assembly": "; \n; GameToolbox::getTimeString from 0x1004eded0 to 0x1004ee04e (382 bytes)\n; \n; 6 xrefs:\n; > RewardsPage::updateTimers @ 0x1001fe80d\n; > RewardsPage::updateTimers @ 0x1001fe873\n; > DailyLevelPage::getDailyTimeString @ 0x100215611\n; > LevelInfoLayer::updateLabelValues @ 0x1002af8ad\n; > ChallengesPage::updateTimers @ 0x1003875ca\n; > GameLevelManager::onUploadCommentCompleted @ 0x100526cc8\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 12:31:23 +0000\n; \npush    rbp                                                            ; +0x0, 0x1004eded0\nmov     rbp, rsp                                                       ; +0x1, 0x1004eded1\npush    r15                                                            ; +0x4, 0x1004eded4\npush    r14                                                            ; +0x6, 0x1004eded6\npush    r13                                                            ; +0x8, 0x1004eded8\npush    r12                                                            ; +0xa, 0x1004ededa\npush    rbx                                                            ; +0xc, 0x1004ededc\npush    rax; char                                                      ; +0xd, 0x1004ededd\ncvtsi2ss xmm0, esi                                                     ; +0xe, 0x1004edede\nmovss   xmm1, cs:dword_100A0C310                                       ; +0x12, 0x1004edee2\nmovaps  xmm2, xmm0                                                     ; +0x1a, 0x1004edeea\ndivss   xmm2, xmm1                                                     ; +0x1d, 0x1004edeed\nroundss xmm2, xmm2, 9                                                  ; +0x21, 0x1004edef1\ncvttss2si esi, xmm2                                                    ; +0x27, 0x1004edef7\ncvttps2dq xmm2, xmm2                                                   ; +0x2b, 0x1004edefb\ncvtdq2ps xmm2, xmm2                                                    ; +0x2f, 0x1004edeff\nmulss   xmm2, xmm1                                                     ; +0x32, 0x1004edf02\nsubss   xmm0, xmm2                                                     ; +0x36, 0x1004edf06\nmovaps  xmm1, xmm0                                                     ; +0x3a, 0x1004edf0a\ndivss   xmm1, cs:dword_100A04C9C                                       ; +0x3d, 0x1004edf0d\nroundss xmm1, xmm1, 9                                                  ; +0x45, 0x1004edf15\ncvttss2si ecx, xmm1                                                    ; +0x4b, 0x1004edf1b\nimul    eax, ecx, 0E10h                                                ; +0x4f, 0x1004edf1f\nxorps   xmm1, xmm1                                                     ; +0x55, 0x1004edf25\ncvtsi2ss xmm1, eax                                                     ; +0x58, 0x1004edf28\nsubss   xmm0, xmm1                                                     ; +0x5c, 0x1004edf2c\nmovaps  xmm1, xmm0                                                     ; +0x60, 0x1004edf30\ndivss   xmm1, cs:dword_100A03818                                       ; +0x63, 0x1004edf33\nroundss xmm1, xmm1, 9                                                  ; +0x6b, 0x1004edf3b\ncvttss2si eax, xmm1                                                    ; +0x71, 0x1004edf41\nimul    r8d, eax, 3Ch ; '<'                                            ; +0x75, 0x1004edf45\nxorps   xmm1, xmm1                                                     ; +0x79, 0x1004edf49\ncvtsi2ss xmm1, r8d                                                     ; +0x7c, 0x1004edf4c\nsubss   xmm0, xmm1                                                     ; +0x81, 0x1004edf51\ncvttss2si r8d, xmm0                                                    ; +0x85, 0x1004edf55\nmov     rbx, rdi                                                       ; +0x8a, 0x1004edf5a\nlea     edi, [rcx+rsi]                                                 ; +0x8d, 0x1004edf5d\nmov     r9d, edi                                                       ; +0x90, 0x1004edf60\nadd     r9d, eax                                                       ; +0x93, 0x1004edf63\njle     short loc_1004EDF7B                                            ; +0x96, 0x1004edf66\ntest    edi, edi                                                       ; +0x98, 0x1004edf68\njle     short loc_1004EDF87                                            ; +0x9a, 0x1004edf6a\ntest    esi, esi                                                       ; +0x9c, 0x1004edf6c\njle     short loc_1004EDF9D                                            ; +0x9e, 0x1004edf6e\nlea     rdi, aIdaysIh; \"%idays %ih\"                                    ; +0xa0, 0x1004edf70\nmov     edx, ecx                                                       ; +0xa7, 0x1004edf77\njmp     short loc_1004EDFB6                                            ; +0xa9, 0x1004edf79\nlea     rdi, aIsec; \"%isec\"                                            ; +0xab, 0x1004edf7b\nmov     esi, r8d                                                       ; +0xb2, 0x1004edf82\njmp     short loc_1004EDF94                                            ; +0xb5, 0x1004edf85\ntest    dl, dl                                                         ; +0xb7, 0x1004edf87\njz      short loc_1004EDFAA                                            ; +0xb9, 0x1004edf89\nlea     rdi, aImin; \"%imin\"                                            ; +0xbb, 0x1004edf8b\nmov     esi, eax                                                       ; +0xc2, 0x1004edf92\nxor     eax, eax                                                       ; +0xc4, 0x1004edf94\ncall    sub_10088E820                                                  ; +0xc6, 0x1004edf96\njmp     short loc_1004EDFBD                                            ; +0xcb, 0x1004edf9b\nlea     rdi, aIhImin; \"%ih %imin\"                                      ; +0xcd, 0x1004edf9d\nmov     esi, ecx                                                       ; +0xd4, 0x1004edfa4\nmov     edx, eax                                                       ; +0xd6, 0x1004edfa6\njmp     short loc_1004EDFB6                                            ; +0xd8, 0x1004edfa8\nlea     rdi, aImin02dsec; \"%imin %02dsec\"                              ; +0xda, 0x1004edfaa\nmov     esi, eax                                                       ; +0xe1, 0x1004edfb1\nmov     edx, r8d                                                       ; +0xe3, 0x1004edfb3\nxor     eax, eax                                                       ; +0xe6, 0x1004edfb6\ncall    sub_10088E820                                                  ; +0xe8, 0x1004edfb8\nmov     rdi, rax                                                       ; +0xed, 0x1004edfbd\ncall    cocos2d__CCString__getCString                                  ; +0xf0, 0x1004edfc0\nmov     r12, rax                                                       ; +0xf5, 0x1004edfc5\nmov     rdi, rax; __s                                                  ; +0xf8, 0x1004edfc8\ncall    _strlen                                                        ; +0xfb, 0x1004edfcb\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x100, 0x1004edfd0\njnb     short loc_1004EE049                                            ; +0x104, 0x1004edfd4\nmov     r15, rax                                                       ; +0x106, 0x1004edfd6\ncmp     rax, 17h                                                       ; +0x109, 0x1004edfd9\njnb     short loc_1004EDFF0                                            ; +0x10d, 0x1004edfdd\nlea     eax, [r15+r15]                                                 ; +0x10f, 0x1004edfdf\nmov     [rbx], al                                                      ; +0x113, 0x1004edfe3\nlea     r14, [rbx+1]                                                   ; +0x115, 0x1004edfe5\ntest    r15, r15                                                       ; +0x119, 0x1004edfe9\njnz     short loc_1004EE022                                            ; +0x11c, 0x1004edfec\njmp     short loc_1004EE030                                            ; +0x11e, 0x1004edfee\nmov     rax, r15                                                       ; +0x120, 0x1004edff0\nor      rax, 7                                                         ; +0x123, 0x1004edff3\nlea     rcx, [rax+1]                                                   ; +0x127, 0x1004edff7\ncmp     rax, 17h                                                       ; +0x12b, 0x1004edffb\nmov     r13d, 1Ah                                                      ; +0x12f, 0x1004edfff\ncmovnz  r13, rcx                                                       ; +0x135, 0x1004ee005\nmov     rdi, r13; __sz                                                 ; +0x139, 0x1004ee009\ncall    __Znwm; operator new(ulong)                                    ; +0x13c, 0x1004ee00c\nmov     r14, rax                                                       ; +0x141, 0x1004ee011\nmov     [rbx+10h], rax                                                 ; +0x144, 0x1004ee014\ninc     r13                                                            ; +0x148, 0x1004ee018\nmov     [rbx], r13                                                     ; +0x14b, 0x1004ee01b\nmov     [rbx+8], r15                                                   ; +0x14e, 0x1004ee01e\nmov     rdi, r14; __dst                                                ; +0x152, 0x1004ee022\nmov     rsi, r12; __src                                                ; +0x155, 0x1004ee025\nmov     rdx, r15; __len                                                ; +0x158, 0x1004ee028\ncall    _memmove                                                       ; +0x15b, 0x1004ee02b\nadd     r14, r15                                                       ; +0x160, 0x1004ee030\nmov     byte ptr [r14], 0                                              ; +0x163, 0x1004ee033\nmov     rax, rbx                                                       ; +0x167, 0x1004ee037\nadd     rsp, 8                                                         ; +0x16a, 0x1004ee03a\npop     rbx                                                            ; +0x16e, 0x1004ee03e\npop     r12                                                            ; +0x16f, 0x1004ee03f\npop     r13                                                            ; +0x171, 0x1004ee041\npop     r14                                                            ; +0x173, 0x1004ee043\npop     r15                                                            ; +0x175, 0x1004ee045\npop     rbp                                                            ; +0x177, 0x1004ee047\nretn                                                                   ; +0x178, 0x1004ee048\ncall    sub_100003630                                                  ; +0x179, 0x1004ee049", "xrefs": ["RewardsPage::updateTimers @ 0x1001fe80d", "RewardsPage::updateTimers @ 0x1001fe873", "DailyLevelPage::getDailyTimeString @ 0x100215611", "LevelInfoLayer::updateLabelValues @ 0x1002af8ad", "ChallengesPage::updateTimers @ 0x1003875ca", "GameLevelManager::onUploadCommentCompleted @ 0x100526cc8"], "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"}