//
// DES_set_key_unchecked from 0x1003734 to 0x1003944 (528 bytes)
//
// 12 xrefs:
// > DES_set_key_checked @ 0x100397c
// > DES_set_key @ 0x10039c0
// > sub_102441C @ 0x1024448
// > sub_1024D9C @ 0x1024dc0
// > sub_1024D9C @ 0x1024dcc
// > sub_1024D9C @ 0x1024dd8
// > sub_1024DEC @ 0x1024e10
// > sub_1024DEC @ 0x1024e1c
// > sub_10DEBC4 @ 0x10debe4
// > sub_10E1018 @ 0x10e10e4
// > sub_10E1018 @ 0x10e1108
// > ??> @ 0x6e860
//
// This function is hookable on this platform (idp: arm, 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 13:15:55 +0000
//
unsigned __int64 __fastcall DES_set_key_unchecked(unsigned __int64 result, _DWORD *a2)
{
int *v2; // x15
unsigned int v3; // w6
int v4; // w3
int v5; // w5
unsigned int v6; // w0
unsigned int v7; // w6
int v8; // w2
unsigned int v9; // w3
int v10; // w2
int v11; // w0
unsigned int v12; // w4
int v13; // w0
int v14; // w2
int v15; // w0
int v16; // w2
int v17; // w4
unsigned __int64 v18; // x4
int v19; // w8
int v20; // t1
unsigned int v21; // w5
unsigned int v22; // w0
unsigned int v23; // w7
unsigned int v24; // w5
unsigned int v25; // w4
unsigned int v26; // w3
unsigned int v27; // w19
unsigned int v28; // w18
unsigned int v29; // w9
int v30; // w3
unsigned int v31; // w2
unsigned __int64 v32; // t2
v2 = (int *)&unk_11FAB60;
v3 = (*(unsigned __int8 *)(result + 6) << 16)
| (*(unsigned __int8 *)(result + 5) << 8)
| *(unsigned __int8 *)(result + 4)
| (*(unsigned __int8 *)(result + 7) << 24);
v4 = (*(unsigned __int8 *)(result + 2) << 16)
| (*(unsigned __int8 *)(result + 1) << 8)
| *(unsigned __int8 *)result
| (*(unsigned __int8 *)(result + 3) << 24);
v5 = (v4 ^ (v3 >> 4)) & 0xF0F0F0F;
v6 = (v5 ^ v4 ^ ((v5 ^ v4) << 18)) & 0xCCCC0000 ^ v5 ^ v4 ^ (((v5 ^ v4 ^ ((v5 ^ v4) << 18)) & 0xCCCC0000) >> 18);
v7 = (v3
^ (16 * v5)
^ ((v3 ^ (16 * v5)) << 18))
& 0xCCCC0000
^ v3
^ (16 * v5)
^ (((v3 ^ (16 * v5) ^ ((v3 ^ (16 * v5)) << 18)) & 0xCCCC0000) >> 18);
v8 = (v6 ^ (v7 >> 1)) & 0x55555555;
v9 = v8 ^ v6;
v10 = v7 ^ (2 * v8);
v11 = (v10 ^ (v9 >> 8)) & 0xFF00FF;
v12 = v11 ^ v10;
v13 = v9 ^ (v11 << 8);
v14 = (v13 ^ (v12 >> 1)) & 0x55555555;
v15 = v14 ^ v13;
v16 = v12 ^ (2 * v14);
v17 = v16 & 0xFF00 | ((__int64)(v15 & 0xF0000000) >> 4) | ((unsigned __int8)v16 << 16);
LODWORD(result) = v15 & 0xFFFFFFF;
LODWORD(v18) = v17 | BYTE2(v16);
do
{
v20 = *v2++;
v19 = v20;
v21 = ((_DWORD)result << 26) | ((unsigned int)result >> 2);
v22 = ((_DWORD)result << 27) | ((unsigned int)result >> 1);
if ( v20 )
v23 = v21;
else
v23 = v22;
result = v23 & 0xFFFFFFF;
v24 = ((_DWORD)v18 << 26) | ((unsigned int)v18 >> 2);
v25 = ((_DWORD)v18 << 27) | ((unsigned int)v18 >> 1);
if ( v19 )
v26 = v24;
else
v26 = v25;
v18 = v26 & 0xFFFFFFF;
v27 = ((unsigned int)result >> 7) & 0x3C;
v28 = ((unsigned int)result >> 14) & 0x30;
v29 = dword_11FABA0[v23 & 0x3F];
v30 = dword_11FABA0[((v18 >> 15) & 0x3F) + 384]
| dword_11FABA0[(v26 & 0x3F) + 256]
| dword_11FABA0[(((unsigned int)v18 >> 8) & 0x3C | ((v26 & 0xFFFFFFF) >> 7) & 3) + 320]
| dword_11FABA0[(((unsigned int)v18 >> 22) & 0x30 | ((v26 & 0xFFFFFFF) >> 21) & 0xF) + 448];
v31 = v30 & 0xFFFF0000
| ((dword_11FABA0[(v27 | ((unsigned __int8)result >> 6)) + 64]
| dword_11FABA0[(v28 | (result >> 13) & 0xF) + 128]
| v29
| dword_11FABA0[(((unsigned int)result >> 21) & 6 | (result >> 20) & 1 | ((unsigned int)result >> 22) & 0x38)
+ 192]) >> 16);
HIDWORD(v32) = (unsigned __int16)(LOWORD(dword_11FABA0[(v27 | ((unsigned __int8)result >> 6)) + 64])
| LOWORD(dword_11FABA0[(v28 | (result >> 13) & 0xF) + 128])
| v29
| LOWORD(dword_11FABA0[(((unsigned int)result >> 21) & 6
| (result >> 20) & 1
| ((unsigned int)result >> 22) & 0x38)
+ 192]))
| (v30 << 16);
LODWORD(v32) = HIDWORD(v32);
*a2 = v32 >> 30;
a2 += 2;
HIDWORD(v32) = v31;
LODWORD(v32) = v31;
*(a2 - 1) = v32 >> 26;
}
while ( v2 != dword_11FABA0 );
return result;
}