Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Just one set of functions disassembled from AdobeSerialization referencing the command flags based on the 'DBCS' type attr in the EnigmaData tag.
int sub_27be(int arg0, int arg1) {
esi = ___stack_chk_guard;
var_10 = *esi;
if (geteuid() != 0x0) {
edi = sub_3dbe();
}
else {
var_46C = esi;
var_464 = sub_4b2f();
var_88 = std::string::_Rep::_S_empty_rep_storage + 0xc;
sub_40cd(var_88);
oobe::LogTargetDefault::LogTargetDefault(var_380);
oobe::LogTargetBase::setLogFile(var_380, "AdobeSerialization.log");
eax = oobe::LoggingCore::getInstance();
oobe::LoggingCore::registerTarget(eax);
var_460 = "";
oobe::Logger::Logger(var_3A0, "AdobeSerialization", "", "CreativeCloudPackager", "Utilities");
var_468 = "\n";
oobe::Logger::info(var_3A0, "\n");
var_45C = "##################################################";
oobe::Logger::info(var_3A0, "##################################################");
oobe::Logger::info(var_3A0, "Launching the AdobeSerialization in elevated mode ...");
var_3A8 = std::string::_Rep::_S_empty_rep_storage + 0xc;
esi = var_3A8;
eax = sub_49fd(esi);
if (eax != 0x0) {
std::string::append(esi, "/", 0x1);
edi = var_3B0;
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(edi, esi);
std::string::append(edi, "helper.bin", 0xa);
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_3B8, esi);
esi = var_3A0;
std::string::append(var_3B8, "prov.xml", 0x8);
eax = sub_469f(edi);
if (eax != 0x0) {
eax = sub_4788(edi);
if (eax == 0x0) {
eax = sub_469f(var_3B8);
if (eax != 0x0) {
eax = sub_4788(var_3B8);
if (eax != 0x0) {
edi = 0x41;
oobe::Logger::error(esi, var_460, "Package seems corrupted. Failed to find required files (%s) (%s)", var_3B0, var_3B8);
}
else {
sub_4c40(var_3C0);
eax = sub_4cc8(var_3C0, var_3B8);
if (eax != 0x0) {
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_3C8, "/Provisioning/EnigmaData", var_3D0);
eax = sub_4f14(var_3C0, var_3C8);
ecx = var_3C8;
edx = ecx + 0xfffffff4;
esi = var_3A0;
if (edx != std::string::_Rep::_S_empty_rep_storage) {
var_470 = eax;
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
edx = edx;
eax = var_470;
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(edx, var_30);
eax = var_470;
}
}
if (eax != 0x0) {
sub_4ff8(var_3E8, var_3C0, eax);
esp = esp - 0x4;
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_3F0, "type", var_3F8);
eax = sub_378e(var_3E8, var_3F0);
ecx = var_3F0;
esi = ecx + 0xfffffff4;
if (esi != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
stack[2048] = esi;
esi = eax;
std::string::_Rep::_M_destroy(stack[2048], var_30);
eax = esi;
}
}
if (var_3E4 != eax) {
COND = std::string::compare(eax + 0x14, "DBCS") == 0x0;
eax = "--tool=GetPackagePools";
esi = "--tool=VolumeSerialize";
if (COND) {
esi = eax;
}
}
else {
esi = "--tool=VolumeSerialize";
}
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_410, "\"", var_418);
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_420, esi, var_428);
sub_55a0(0x0, var_420, var_428);
ecx = var_420;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_30);
}
}
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_430, "--stream", var_438);
sub_55a0(0x0, var_430, var_438);
ecx = var_430;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_30);
}
}
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_440, "--provfile=", var_448);
std::string::append(var_440, var_3B8);
sub_55a0(0x0, var_440, var_448);
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(var_450, var_460, var_458);
eax = sub_39c5(edi, 0x0, var_44C, var_450);
ecx = var_450;
edi = ecx + 0xfffffff4;
esi = var_3A0;
if (edi != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
stack[2048] = edi;
edi = eax;
std::string::_Rep::_M_destroy(stack[2048], var_30);
eax = edi;
}
}
if (eax != 0x0) {
edi = 0x43;
stack[2046] = "Failed to launch the Provisioning Tool. Return value (%d)";
oobe::Logger::error(esi, var_460, stack[2046], eax);
}
else {
stack[2046] = var_44C;
oobe::Logger::info(esi, "The return Code from Provisioning Tool (%d).", stack[2046]);
edi = var_44C;
}
ecx = var_440;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_30);
}
}
ecx = var_410;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_30);
}
}
sub_4340(0x0);
loc_44f0(var_3E8, var_3E0, stack[2046]);
}
else {
edi = 0x42;
oobe::Logger::error(esi, var_460, "File is corrupted (%s).", var_3B8);
}
}
else {
edi = 0x42;
oobe::Logger::error(esi, var_460, "File is corrupted (%s).", var_3B8);
}
sub_4c4e();
}
}
else {
edi = 0x41;
oobe::Logger::error(esi, var_460, "Package seems corrupted. Failed to find required files (%s) (%s)", var_3B0, var_3B8);
}
}
else {
edi = 0x41;
oobe::Logger::error(esi, var_460, "Package seems corrupted. Failed to find required files (%s) (%s)", var_3B0, var_3B8);
}
}
else {
edi = 0x41;
oobe::Logger::error(esi, var_460, "Package seems corrupted. Failed to find required files (%s) (%s)", var_3B0, var_3B8);
}
ecx = var_3B8;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_30);
}
}
ecx = var_3B0;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_48);
}
}
}
else {
edi = 0x7f;
oobe::Logger::error(var_3A0, var_460, "Failed to get self path.\n");
}
oobe::Logger::info(var_3A0, var_45C);
oobe::Logger::info(var_3A0, "Adobe Serialization exit code (%d).", edi);
oobe::Logger::info(var_3A0, var_45C);
oobe::Logger::info(var_3A0, var_45C);
oobe::Logger::info(var_3A0, var_468);
sub_4b6c(var_464);
ecx = var_3A8;
eax = ecx + 0xfffffff4;
if (eax != std::string::_Rep::_S_empty_rep_storage) {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_30);
}
}
sub_37fc(var_3A0);
oobe::LogTargetDefault::~LogTargetDefault();
ecx = var_88;
eax = ecx + 0xfffffff4;
if (eax == std::string::_Rep::_S_empty_rep_storage) {
esi = var_46C;
}
else {
*(ecx + 0xfffffffc) = lock intrinsic_xadd(*(ecx + 0xfffffffc), 0xffffffff);
esi = var_46C;
if (0xffffffff <= 0x0) {
std::string::_Rep::_M_destroy(eax, var_80);
}
}
}
if (*esi == var_10) {
eax = edi;
}
else {
eax = __stack_chk_fail();
}
return eax;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.