// // GameToolbox::timestampToHumanReadable from 0x3d3748 to 0x3d38de (406 bytes) // // 7 xrefs: // > GJCompactUserCell::buildUserRow @ 0x42e4a0 // > GJLevelList::showListInfo @ 0x4bcb46 // > GJLevelList::showListInfo @ 0x4bcb90 // > AccountReviewPopup::updateCard @ 0x73873e // > AccountReviewPopup::updateCard @ 0x738c38 // > GJEditorSoundConfig::showSoundInfo @ 0x78de2a // > GJEditorSoundConfig::showSoundInfo @ 0x78de74 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 11:46:42 +0000 // GameToolbox *__fastcall GameToolbox::timestampToHumanReadable(GameToolbox *this, time_t a2) { time_t v4; // r0 double v5; // r0 double v6; // d7 char *v7; // r1 _DWORD *v8; // r0 int v9; // r1 int v10; // r2 _DWORD v12[3]; // [sp+0h] [bp-14h] BYREF v4 = time(nullptr); v5 = difftime(v4, a2); v6 = v5; if ( v5 >= 60.0 ) { if ( v5 >= 3600.0 ) { if ( v5 >= 86400.0 ) { if ( v5 >= 2592000.0 ) { if ( v5 >= 31536000.0 ) { GameToolbox::intToString((GameToolbox *)v12, (int)(v5 / 31536000.0)); if ( (int)(v6 / 31536000.0) > 1 ) v7 = " years ago"; else v7 = " year ago"; } else { GameToolbox::intToString((GameToolbox *)v12, (int)(v5 / 2592000.0)); if ( (int)(v6 / 2592000.0) > 1 ) v7 = " months ago"; else v7 = " month ago"; } } else { GameToolbox::intToString((GameToolbox *)v12, (int)(v5 / 86400.0)); if ( (int)(v6 / 86400.0) > 1 ) v7 = " days ago"; else v7 = " day ago"; } } else { GameToolbox::intToString((GameToolbox *)v12, (int)(v5 / 3600.0)); if ( (int)(v6 / 3600.0) > 1 ) v7 = " hours ago"; else v7 = " hour ago"; } } else { GameToolbox::intToString((GameToolbox *)v12, (int)(v5 / 60.0)); if ( (int)(v6 / 60.0) > 1 ) v7 = " minutes ago"; else v7 = " minute ago"; } v8 = std::string::append(v12, v7); v9 = v8[1]; v10 = v8[2]; *(_DWORD *)this = *v8; *((_DWORD *)this + 1) = v9; *((_DWORD *)this + 2) = v10; *v8 = 0; v8[1] = 0; v8[2] = 0; std::string::~string((int)v12); } else { *(_DWORD *)this = 0; *((_DWORD *)this + 1) = 0; *((_DWORD *)this + 2) = 0; std::string::__init((int *)this, "Less than 1 minute ago", 0x16u); } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source