// // -[NSData makeCryptedVersionWithKeyData:ofLength:decrypt:] from 0x100281790 to 0x100281920 (400 bytes) // // 1 xrefs: // > @ 0x100bdc230 // // 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:27:43 +0000 // id __cdecl -[NSData makeCryptedVersionWithKeyData:ofLength:decrypt:]( NSData *self, SEL a2, const void *a3, int a4, bool a5) { int v5; // eax char *v6; // r13 void *v7; // r14 id v8; // r15 char v9; // r12 id v10; // rax CCCryptorStatus v11; // eax __int64 v12; // rdx __CFString *v13; // rdi void *v14; // rbx const char *v15; // rsi size_t dataOutMoved; // [rsp+0h] [rbp-60h] BYREF CCOperation op; // [rsp+Ch] [rbp-54h] _OWORD key[2]; // [rsp+10h] [rbp-50h] BYREF op = a5; memset(key, 0, sizeof(key)); v5 = 32; if ( a4 < 32 ) v5 = a4; __memcpy_chk(key, a3, v5, 32); v6 = (char *)-[NSData length](self, "length") + 16; v7 = malloc((size_t)v6); v8 = -[NSData bytes](self, "bytes"); v9 = op; v10 = -[NSData length](self, "length"); v11 = CCCrypt(op, 0, 3u, key, 0x20u, nullptr, v8, (size_t)v10, v7, (size_t)v6, &dataOutMoved); switch ( v11 ) { case -4305: v13 = CFSTR("Error: NSData: Could not %s data: Unimplemented"); goto LABEL_13; case -4304: v13 = CFSTR("Error: NSData: Could not %s data: Decode error"); goto LABEL_13; case -4303: v13 = CFSTR("Error: NSData: Could not %s data: Alignment error"); goto LABEL_13; case -4302: v13 = CFSTR("Error: NSData: Could not %s data: Memory failure"); goto LABEL_13; case -4301: v13 = CFSTR("Error: NSData: Could not %s data: Buffer too small"); goto LABEL_13; case -4300: v13 = (__CFString *)CFSTR("Error: NSData: Could not %s data: Param error"); goto LABEL_13; default: if ( !v11 ) return +[NSData dataWithBytesNoCopy:length:]( &OBJC_CLASS___NSData, "dataWithBytesNoCopy:length:", v7, dataOutMoved); v13 = CFSTR("Error: NSData: Could not %s data: Unknown error"); LABEL_13: v15 = "encrypt"; if ( v9 ) v15 = "decrypt"; v14 = nullptr; NSLog(&v13->isa, v15, v12, (unsigned int)(v11 + 4305)); free(v7); return v14; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source