//
// DES_encrypt3 from 0x10a685c to 0x10a696c (272 bytes)
//
// 9 xrefs:
// > DES_ede3_cfb64_encrypt @ 0x10a2ef4
// > DES_ede3_cfb64_encrypt @ 0x10a2fd8
// > DES_ede3_cfb_encrypt @ 0x10a314c
// > DES_ede3_cfb_encrypt @ 0x10a3470
// > DES_ede3_cbc_encrypt @ 0x10a7154
// > DES_ede3_cbc_encrypt @ 0x10a74d8
// > DES_ecb3_encrypt @ 0x10a76f8
// > DES_ede3_ofb64_encrypt @ 0x10a785c
// > ??> @ 0x43ff0
//
// 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:17:36 +0000
//
__int64 __fastcall DES_encrypt3(int *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
unsigned int v4; // w6
int v6; // w4
int v7; // w7
int v9; // w4
int v10; // w5
unsigned int v11; // w6
int v12; // w5
int v13; // w4
unsigned int v14; // w5
int v15; // w4
int v16; // w6
unsigned int v17; // w4
int v18; // w5
int v19; // w6
unsigned int v20; // w2
int v21; // w0
unsigned int v22; // w3
int v23; // w0
int v24; // w1
unsigned int v25; // w2
int v26; // w1
int v27; // w0
int v28; // w1
int v29; // w0
int v30; // w2
unsigned int v31; // w0
int v32; // w1
int v33; // w2
__int64 result; // x0
v4 = a1[1];
v6 = (*a1 ^ (v4 >> 4)) & 0xF0F0F0F;
v7 = v6 ^ *a1;
v9 = v4 ^ (16 * v6);
v10 = (unsigned __int16)(v9 ^ HIWORD(v7));
v11 = v10 ^ v9;
v12 = v7 ^ (v10 << 16);
v13 = (v12 ^ (v11 >> 2)) & 0x33333333;
v14 = v13 ^ v12;
v15 = v11 ^ (4 * v13);
v16 = (v15 ^ (v14 >> 8)) & 0xFF00FF;
v17 = v16 ^ v15;
v18 = v14 ^ (v16 << 8);
v19 = (v18 ^ (v17 >> 1)) & 0x55555555;
*a1 = v19 ^ v18;
a1[1] = v17 ^ (2 * v19);
DES_encrypt2(a1, a2, 1);
DES_encrypt2(a1, a3, 0);
DES_encrypt2(a1, a4, 1);
v20 = a1[1];
v21 = (*a1 ^ (v20 >> 1)) & 0x55555555;
v22 = v21 ^ *a1;
v23 = v20 ^ (2 * v21);
v24 = (v23 ^ (v22 >> 8)) & 0xFF00FF;
v25 = v24 ^ v23;
v26 = v22 ^ (v24 << 8);
v27 = (v26 ^ (v25 >> 2)) & 0x33333333;
v28 = v27 ^ v26;
v29 = v25 ^ (4 * v27);
v30 = (unsigned __int16)(v29 ^ HIWORD(v28));
v31 = v30 ^ v29;
v32 = v28 ^ (v30 << 16);
v33 = (v32 ^ (v31 >> 4)) & 0xF0F0F0F;
*a1 = v33 ^ v32;
result = v31 ^ (16 * v33);
a1[1] = result;
return result;
}