// // PlatformToolbox::saveAndEncryptStringToFile from 0x1004bd0a0 to 0x1004bd26d (461 bytes) // // 1 xrefs: // > sub_1004A5450 @ 0x1004a5492 // // 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:03 +0000 // bool __fastcall PlatformToolbox::saveAndEncryptStringToFile(unsigned __int8 *a1, __int64 a2) { unsigned int v2; // ecx NSData *v3; // rax NSArray *v4; // rax id v5; // rax id v6; // r12 NSFileManager *v7; // rax NSFileManager *v8; // rax NSString *v9; // rax id v10; // r14 NSString *v11; // rax NSString *v12; // rax NSData *v13; // rax id v14; // rax NSData *v16; // [rsp+0h] [rbp-30h] v2 = *a1; if ( (v2 & 1) != 0 ) v3 = +[NSData dataWithBytes:length:]( &OBJC_CLASS___NSData, "dataWithBytes:length:", *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 1)); else v3 = +[NSData dataWithBytes:length:](&OBJC_CLASS___NSData, "dataWithBytes:length:", a1 + 1, v2 >> 1); v16 = v3; if ( (*a1 & 1) != 0 ) { **((_BYTE **)a1 + 2) = 0; *((_QWORD *)a1 + 1) = 0; } else { *(_WORD *)a1 = 0; } v4 = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, 1u, 1); v5 = -[NSArray objectAtIndex:](v4, "objectAtIndex:", 0); v6 = objc_msgSend(v5, "stringByAppendingPathComponent:", CFSTR("GeometryDash")); v7 = +[NSFileManager defaultManager](&OBJC_CLASS___NSFileManager, "defaultManager"); if ( !-[NSFileManager fileExistsAtPath:](v7, "fileExistsAtPath:", v6) ) { v8 = +[NSFileManager defaultManager](&OBJC_CLASS___NSFileManager, "defaultManager"); -[NSFileManager createDirectoryAtPath:withIntermediateDirectories:attributes:error:]( v8, "createDirectoryAtPath:withIntermediateDirectories:attributes:error:", v6, 0, 0, 0); } v9 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", a2); v10 = objc_msgSend(v6, "stringByAppendingPathComponent:", v9); v11 = +[NSString stringWithFormat:]( &OBJC_CLASS___NSString, "stringWithFormat:", CFSTR("%c%c%s%@%c%s%c%s%@%s"), 105, 112, "u9TUv54y", CFSTR("v]isFM"), 104, "5@;t.5w3", 52, "E2Ry@{", CFSTR("lXrRCGEN"), "IiB@"); v12 = +[NSString stringWithString:](&OBJC_CLASS___NSString, "stringWithString:", v11); v13 = -[NSString dataUsingEncoding:](v12, "dataUsingEncoding:", 4); v14 = -[NSData encryptedWithKey:](v16, "encryptedWithKey:", v13); return (unsigned __int8)objc_msgSend(v14, "writeToFile:atomically:", v10, 1) != 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source