// // GameToolbox::timestampToHumanReadable from 0x1004f5850 to 0x1004f5a4c (508 bytes) // // 7 xrefs: // > GJCompactUserCell::buildUserRow @ 0x10023f928 // > GJLevelList::showListInfo @ 0x10058fada // > GJLevelList::showListInfo @ 0x10058fb4d // > sub_100907740 @ 0x10090797d // > sub_100907740 @ 0x1009079f0 // > sub_100998310 @ 0x10099888f // > sub_100998310 @ 0x10099927d // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:31:26 +0000 // char *__fastcall GameToolbox::timestampToHumanReadable(char *a1, time_t a2) { time_t v2; // rax double v3; // xmm0_8 const std::string::value_type *v4; // rsi std::string *v5; // rax std::string v7; // [rsp+0h] [rbp-30h] BYREF v2 = time(nullptr); v3 = difftime(v2, a2); if ( v3 >= 60.0 ) { if ( v3 >= 3600.0 ) { if ( v3 >= 86400.0 ) { if ( v3 >= 2592000.0 ) { if ( v3 >= 31536000.0 ) { GameToolbox::intToString((size_t *)&v7, (int)(v3 / 31536000.0)); v4 = " year ago"; if ( (int)(v3 / 31536000.0) >= 2 ) v4 = " years ago"; } else { GameToolbox::intToString((size_t *)&v7, (int)(v3 / 2592000.0)); v4 = " month ago"; if ( (int)(v3 / 2592000.0) >= 2 ) v4 = " months ago"; } } else { GameToolbox::intToString((size_t *)&v7, (int)(v3 / 86400.0)); v4 = " day ago"; if ( (int)(v3 / 86400.0) >= 2 ) v4 = " days ago"; } } else { GameToolbox::intToString((size_t *)&v7, (int)(v3 / 3600.0)); v4 = " hour ago"; if ( (int)(v3 / 3600.0) >= 2 ) v4 = " hours ago"; } } else { GameToolbox::intToString((size_t *)&v7, (int)(v3 / 60.0)); v4 = " minute ago"; if ( (int)(v3 / 60.0) >= 2 ) v4 = " minutes ago"; } v5 = std::string::append(&v7, v4); *(std::string *)a1 = *v5; *(_OWORD *)&v5->__r_.__value_.__l.0 = 0; v5->__r_.__value_.__r.__words[2] = 0; if ( (*(_BYTE *)&v7.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v7.__r_.__value_.__l.__data_); } else { strcpy(a1, ",Less than 1 minute ago"); } return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source