std::vector<int> __fastcall Encode6BitBuf(std::vector<int> result, unsigned int a3, unsigned int* a4)
{
int v4; // r8
int v5; // r5
unsigned int v6; // r12
unsigned int v7; // r7
int v8; // r6
bool v9; // cc
char v10; // r4
unsigned int v11; // r5
std::vector<int> buffer;
if (a3)
{
LOBYTE(v4) = 0;
v5 = 0;
v6 = 0;
int i = 0;
do
{
v7 = EncodeBitMasks[result] ^ 9;
v8 = v5 + 2;
v9 = v5 + 2 < 6;
auto code = (((v7 >> (v5 + 2)) | v4) & 0x3F) + 0x3C;
buffer.push_back(code);
v10 = 6 - v5;
v11 = v6 + 1;
v4 = (unsigned __int8)(v7 << v10) >> 2;
if (v9)
{
++v6;
v5 = v8;
}
else
{
v6 += 2;
auto code2 = v4 + 0x3C;
buffer.push_back(code2);
v5 = 0;
v4 = 0;
}
--a3;
++i;
} while (a3);
if (v5 > 0)
{
auto code3 = v4 + 0x3C;
buffer.push_back(code3);
}
}
else
{
v6 = 0;
}
*a4 = v6;
return buffer;
}
std::vector<int> __fastcall Decode6BitBuf(std::vector<int> result, unsigned int a3, unsigned int* a4)
{
int v4; // r12
int v5; // r4
int v6; // r10
unsigned int v7; // lr
int v8; // r6
unsigned int v9; // r5
unsigned __int8 v10; // r5
std::vector<int> buffer;
if (a3)
{
v4 = 0;
v5 = 2;
LOBYTE(v6) = 0;
v7 = 0;
v8 = 0;
while (1)
{
v9 = result[v4];
if (v9 < 0x3C)
goto LABEL_12;
v10 = v9 - 0x3C;
if (v8 >= 2)
{
unsigned char code = DecodeBitMasks[(((unsigned __int8)(v10 & 0x3F) >> (6 - v5)) | (unsigned __int8)v6) ^ 0x9E] ^ 0x34;
buffer.push_back(code);
if (v5 > 5)
{
v5 = 2;
v8 = 0;
goto LABEL_9;
}
v5 += 2;
v8 = 0;
}
v6 = Decode6BitMask[v5 - 2] & (v10 << v5);
v8 = v8 + 8 - v5;
LABEL_9:
if (++v4 >= a3)
goto LABEL_12;
}
}
v7 = 0;
LABEL_12:
*a4 = v7;
return buffer;
}
|