boost::iostreams——谁叫你把0x0a转成0x0d 0x0a的混蛋东西

本文通过一个具体的例子介绍了Boost Iostreams库的应用,包括如何使用该库进行文本的压缩与解压缩,并分享了一个关于换行符处理的常见问题及解决方法。

先扯点背景知识:Boost Iostreams库是Boost库中一个流编程框架,它把字符流的处理泛化。使用者可以利用该库自行编写流过滤器(Filter)对流进行处理。

其实从学C++开始就一直对流这个概念感到费解,感觉太尼玛抽象了。但自从用了Iostreams这个库后,对流的认识开始深刻起来。说到流,现在我脑海里突然浮现出《疯狂动物城》中的一幕:一群交易员仓鼠排成一排,向狐狸购买冰棍。
这里写图片描述
萌出了一脸血啊!然而这个和我们的流有什么关系呢?这里我们的仓鼠队伍就可以看成一个流,你可以把仓鼠看成流中的元素,而我们的狐狸先生就是一个流处理器,对每个仓鼠都执行收钱,给冰棍的操作。

联系到实际运用中,比如我们经常要对一些文本进行压缩解压操作,其实就是对一个文本流中的字符进行重复的压缩解压操作。可能是来一个字符,进行一次处理,也有可能是来若干个字符,进行一次处理。你可以据此分别编写compressor和decompressor的filter。而用起来就更简单了,你只需要将这些filter排一排,然后让流经过就行,就像仓鼠们经过狐狸先生一样。

压缩过程的调用方式

#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/filtering_stream.hpp>

namespace io = boost::iostreams;

int main()
{   
    io::filtering_ostream out;
    out.push(compressor());
    out.push(base64_encoder());
    out.push(file_sink("my_file.txt"));
    // write to out using std::ostream interface
}

解压过程的调用方式

#include <boost/iostreams/device/file.hpp>
#include <boost/iostreams/filtering_stream.hpp>

namespace io = boost::iostreams;

int main()
{   
    io::filtering_istream in;
    in.push(decompressor());
    in.push(base64_decoder());
    in.push(file_source("my_file.txt"));
    // read from in using std::istream interface
}

这里我不表如何编写filter,大家可以参看iostreams的user manual,写的还是挺详尽的。我想谈谈今天使用iostreams遇到的坑。

我要对某段文本进行RSA加密,RSA算法用的是之前就写好的库,应该不会有问题才对,结果运行时加完密的文件死活解密不了,这怎么可能呢?我反复比对了公私钥对,没有任何错误。同时又单独测了一次RSA算法,也没错,同样的明文加密完还是可以正常解密的。

不知道是不是福尔摩斯说的,排除了一切可能,即使最后一种假设多不可能,那也是真相。折腾了半天,实在没法了,我把程序中RSA加密生成密文和解密时用到的密文比对,居然不一致,差了一位!神奇!再看,是一个0x0a被写成了0x0d 0x0a!

顿时醒悟,这不是对换行符进行了转换吗?艹,谁干的?我生成的文件是binary的,我不要转换什么换行符!
网上查了查,呵呵,原来标准库fstream是会自作聪明地帮我们进行转换换行符,http://blog.sina.com.cn/s/blog_68281ec80100n4jt.html。这位仁兄给出了解决方案,我赶紧试了试

fos.push(FMFileEncryptFilter());
fos.push(file_sink(strFileName.toStdString(), std::ios_base::out | std::ios_base::binary));

没用!哭了!

我怀着万分悲痛的心情,寄希望于在user manual中寻求帮助,于是第一页我就看到了如下两句:

[1]Strictly speaking, it would be better to use a file_descriptor_sink instead of a file_sink here, because file_descriptor_sink never performs code conversion.

[2]Strictly speaking, it would be better to use a file_descriptor_source instead of a file_source here, because file_descriptor_source never performs code conversion.

我滴天,code conversion?难道这就是症结所在吗?赶紧换成如下:

fos.push(FMFileEncryptFilter());    fos.push(file_descriptor_sink(strFileName.toStdString()));

一试,好了!激动之情溢于言表,这个bug我调了快两天了!

虽然我知道没人看,但我还是要写一写,一点一点积累吧。

请仔细阅读和分析下面函数,进行优化后,采用C/C++11标准,完整推导并重构可编译的全部代码 int (__cdecl *__cdecl isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream( int a1, int a2, int a3, int a4))(_DWORD *, _DWORD *, int) { _DWORD *v4; // edi _DWORD *v5; // eax volatile signed __int32 *v6; // edi int v7; // eax int (__cdecl *result)(_DWORD *, _DWORD *, int); // eax void *v9; // eax _DWORD v10[4]; // [esp+20h] [ebp-3Ch] BYREF unsigned int v11; // [esp+30h] [ebp-2Ch] BYREF _DWORD v12[10]; // [esp+34h] [ebp-28h] BYREF stlp_std::ios_base::ios_base((stlp_std::ios_base *)(a1 + 24)); *(_BYTE *)(a1 + 92) = 0; *(_DWORD *)(a1 + 96) = 0; *(_DWORD *)(a1 + 100) = 0; *(_DWORD *)(a1 + 4) = 0; *(_DWORD *)a1 = &`vtable for'boost::iostreams::access_control<boost::iostreams::detail::chain_client<boost::iostreams::chain<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>>>,boost::iostreams::public_,boost::iostreams::detail::pub_<boost::iostreams::detail::chain_client<boost::iostreams::chain<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>>>>> + 2; *(_DWORD *)(a1 + 8) = &off_21E652C; *(_DWORD *)(a1 + 24) = &off_21E652C + 5; *(_DWORD *)(a1 + 12) = 0; stlp_std::basic_ios<char,stlp_std::char_traits<char>>::init(a1 + 24, 0); *(_DWORD *)a1 = &off_21E656C; *(_DWORD *)(a1 + 8) = &off_21E656C + 6; *(_DWORD *)(a1 + 24) = &off_21E656C + 11; v4 = (_DWORD *)operator new(0x1Cu); *v4 = v4; v4[1] = v4; v4[2] = 0; v4[3] = 4096; v4[4] = 128; v4[5] = 4; v4[6] = 4; *(_DWORD *)(a1 + 16) = v4; *(_DWORD *)(a1 + 20) = 0; v5 = (_DWORD *)operator new(0x10u); v5[1] = 1; v5[2] = 1; *v5 = &`vtable for'boost::detail::sp_counted_impl_p<boost::iostreams::detail::chain_base<boost::iostreams::chain<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>>,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::input>::chain_impl> + 2; v5[3] = v4; v6 = *(volatile signed __int32 **)(a1 + 20); *(_DWORD *)(a1 + 20) = v5; if ( v6 ) { if ( _InterlockedExchangeAdd(v6 + 1, 0xFFFFFFFF) == 1 ) { (*(void (__cdecl **)(volatile signed __int32 *))(*v6 + 8))(v6); if ( _InterlockedExchangeAdd(v6 + 2, 0xFFFFFFFF) == 1 ) (*(void (__cdecl **)(volatile signed __int32 *))(*v6 + 12))(v6); } } *(_DWORD *)(a1 + 4) = a1 + 16; *(_DWORD *)(*(_DWORD *)(a1 + 16) + 8) = a1; *(_DWORD *)a1 = (char *)&`vtable for'isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_> + 12; *(_DWORD *)(a1 + 8) = (char *)&`vtable for'isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_> + 36; *(_DWORD *)(a1 + 24) = (char *)&`vtable for'isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_> + 56; *(_DWORD *)(a1 + 44) = a4; v7 = *(_DWORD *)(a1 + 32); if ( !*(_DWORD *)(a1 + 96) ) v7 = *(_DWORD *)(a1 + 32) | 1; *(_DWORD *)(a1 + 32) = v7; if ( (v7 & a4) != 0 ) { v9 = (void *)stlp_std::ios_base::_M_throw_failure((stlp_std::ios_base *)(a1 + 24)); __cxa_begin_catch(v9); __cxa_end_catch(); } v11 = 0; v10[0] = a3; if ( !(unsigned __int8)boost::detail::function::has_empty_target(v10) ) { v12[0] = a3; v11 = (unsigned int)boost::function2<void,char const*,isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_> &>::assign_to<isl::iostreams::xp_autodetect>(isl::iostreams::xp_autodetect)::stored_vtable + 1; } boost::function2<void,char const*,isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_> &>::operator()( &v11, a2, a1); result = (int (__cdecl *)(_DWORD *, _DWORD *, int))v11; if ( v11 && (v11 & 1) == 0 ) { result = *(int (__cdecl **)(_DWORD *, _DWORD *, int))(v11 & 0xFFFFFFFE); if ( result ) return (int (__cdecl *)(_DWORD *, _DWORD *, int))result(v12, v12, 2); } return result; }
最新发布
10-06
请仔细阅读和分析下面函数,进行优化后,采用C/C++11标准,完整推导并重构可编译的全部代码 特别注意: 1.保持所有原始逻辑功能不变 2.提高执行效率,降低计算复杂度 3.已经给定的结构体名字和元素不要更改,详细的中文注释 4.自动添加中文注释说明功能逻辑 5.不使用 auto,使用显式 for 循环 6.结构体采用32位定义 7.不要使用小函数,保持原始的函数定义 将 HDDMXng::Chip::Chip 映射为 message Chip { optional uint32 numsites = 1; optional uint32 numrows = 2; optional uint32 numcols = 3; optional uint32 rpmgridx = 4; optional uint32 rpmgridy = 5; optional sint32 extremaxmin = 6; optional sint32 extremaxmax = 7; optional sint32 extremaymin = 8; optional sint32 extremaymax = 9; optional string chip = 10; optional string arch = 11; } HDDMDevice *__cdecl HDDMDeviceCache::loadDevice( HDDMDeviceCache *this, const HSTString *deviceFilePath, const HSTString *archFilePath) { void *s1; // ecx size_t n; // esi int i; // edi HDDMDevice *v6; // ebp const void *s2; // edx int *v8; // edi bool v9; // al HDDMDevice *v10; // eax int Env; // edi unsigned __int16 word4; // si unsigned __int16 word6; // di unsigned int v14; // eax int v15; // ebp int v16; // edx int v17; // eax int v18; // edi int v19; // ecx int v20; // esi int v21; // edx unsigned int v22; // eax int v23; // ecx unsigned int v24; // eax int v25; // esi int v26; // edx int v27; // eax int v28; // ecx __int16 v29; // ax int v30; // esi int v31; // esi int v32; // esi HDDMTilePort *v33; // edi int v34; // esi int v35; // esi int v36; // esi int v37; // esi int v38; // esi int v39; // esi int v40; // eax int v41; // eax int v42; // edi int v43; // esi int v44; // eax int v45; // edi int v46; // edi int v47; // edi int v48; // edi int v49; // edi int v50; // edi int v51; // eax int v52; // eax unsigned __int8 *TileType; // edi unsigned __int16 v54; // ax int v55; // ecx int v56; // eax int v57; // esi int v58; // edx unsigned __int8 *v59; // edi unsigned __int16 v60; // ax int v61; // ecx int v62; // eax int v63; // esi int v64; // edx int v66; // edi int v67; // esi HDDMOracle *v68; // esi void *v69; // ebp _BYTE *v70; // esi int v71; // eax int v72; // eax int v73; // esi int v74; // edi char *v75; // eax int v76; // eax stlp_std::__malloc_alloc *v77; // edi _BYTE *v78; // eax int v79; // eax _BYTE *v80; // eax int v81; // edi void *exception; // esi HPAParamMgr *v83; // [esp+0h] [ebp-8DCh] void *s1a; // [esp+0h] [ebp-8DCh] void *s2b; // [esp+4h] [ebp-8D8h] const char *s2c; // [esp+4h] [ebp-8D8h] void *v87; // [esp+4h] [ebp-8D8h] unsigned int *s2a; // [esp+4h] [ebp-8D8h] _BYTE *v89; // [esp+8h] [ebp-8D4h] size_t na; // [esp+8h] [ebp-8D4h] size_t nd; // [esp+8h] [ebp-8D4h] char *nb; // [esp+8h] [ebp-8D4h] size_t ne; // [esp+8h] [ebp-8D4h] char *nc; // [esp+8h] [ebp-8D4h] HDDMTilePort **v95; // [esp+Ch] [ebp-8D0h] HDDMTilePort **v96; // [esp+Ch] [ebp-8D0h] _BYTE *v97; // [esp+10h] [ebp-8CCh] void *v98; // [esp+14h] [ebp-8C8h] char v99; // [esp+30h] [ebp-8ACh] unsigned int j; // [esp+30h] [ebp-8ACh] void *v101; // [esp+30h] [ebp-8ACh] int v102; // [esp+38h] [ebp-8A4h] int v103; // [esp+38h] [ebp-8A4h] int v104; // [esp+48h] [ebp-894h] int v105; // [esp+48h] [ebp-894h] int v106; // [esp+48h] [ebp-894h] int v107; // [esp+48h] [ebp-894h] stlp_std::__malloc_alloc *v108; // [esp+4Ch] [ebp-890h] stlp_std::__malloc_alloc *v109; // [esp+4Ch] [ebp-890h] stlp_std::__malloc_alloc *v110; // [esp+4Ch] [ebp-890h] unsigned __int16 v111; // [esp+50h] [ebp-88Ch] int v112; // [esp+50h] [ebp-88Ch] HDDMTile **ParamMgr; // [esp+54h] [ebp-888h] int v114; // [esp+5Ch] [ebp-880h] int v115; // [esp+60h] [ebp-87Ch] int v116; // [esp+60h] [ebp-87Ch] int v117; // [esp+64h] [ebp-878h] int v118; // [esp+6Ch] [ebp-870h] int v119; // [esp+6Ch] [ebp-870h] int v120; // [esp+74h] [ebp-868h] int v121; // [esp+7Ch] [ebp-860h] HDDMDevice *Device; // [esp+80h] [ebp-85Ch] int v123; // [esp+90h] [ebp-84Ch] char ValueAsBool; // [esp+9Bh] [ebp-841h] unsigned int v125; // [esp+9Ch] [ebp-840h] char v126; // [esp+B0h] [ebp-82Ch] BYREF char v127; // [esp+D0h] [ebp-80Ch] BYREF char v128; // [esp+DCh] [ebp-800h] BYREF char v129; // [esp+DDh] [ebp-7FFh] BYREF char v130; // [esp+DEh] [ebp-7FEh] BYREF unsigned __int16 deviceFileType[8]; // [esp+E0h] [ebp-7FCh] BYREF unsigned __int16 archFileVersion[6]; // [esp+F0h] [ebp-7ECh] BYREF unsigned __int16 deviceFileVersion; // [esp+FCh] [ebp-7E0h] BYREF unsigned __int16 archFileType; // [esp+FEh] [ebp-7DEh] BYREF HDDMTile *v135; // [esp+100h] [ebp-7DCh] BYREF HDDMTilePort *v136; // [esp+110h] [ebp-7CCh] BYREF HDDMTile *v137; // [esp+120h] [ebp-7BCh] BYREF HDDMTilePort *v138; // [esp+130h] [ebp-7ACh] BYREF _BYTE v139[16]; // [esp+140h] [ebp-79Ch] BYREF _BYTE *v140; // [esp+150h] [ebp-78Ch] unsigned int v141; // [esp+154h] [ebp-788h] _BYTE v142[16]; // [esp+160h] [ebp-77Ch] BYREF int v143; // [esp+170h] [ebp-76Ch] void *v144; // [esp+174h] [ebp-768h] _BYTE v145[16]; // [esp+180h] [ebp-75Ch] BYREF int v146; // [esp+190h] [ebp-74Ch] void *v147; // [esp+194h] [ebp-748h] _BYTE v148[16]; // [esp+1A0h] [ebp-73Ch] BYREF int v149; // [esp+1B0h] [ebp-72Ch] void *v150; // [esp+1B4h] [ebp-728h] _BYTE istream[16]; // [esp+1C0h] [ebp-71Ch] BYREF int v152; // [esp+1D0h] [ebp-70Ch] int v153; // [esp+1D4h] [ebp-708h] _BYTE v154[16]; // [esp+1E0h] [ebp-6FCh] BYREF char *v155; // [esp+1F0h] [ebp-6ECh] int v156; // [esp+1F4h] [ebp-6E8h] _DWORD v157[4]; // [esp+200h] [ebp-6DCh] BYREF int v158; // [esp+210h] [ebp-6CCh] void *v159; // [esp+214h] [ebp-6C8h] unsigned int v160[4]; // [esp+220h] [ebp-6BCh] BYREF unsigned int *v161; // [esp+230h] [ebp-6ACh] unsigned int *v162; // [esp+234h] [ebp-6A8h] _BYTE v163[16]; // [esp+240h] [ebp-69Ch] BYREF int v164; // [esp+250h] [ebp-68Ch] int v165; // [esp+254h] [ebp-688h] _DWORD v166[4]; // [esp+260h] [ebp-67Ch] BYREF int v167; // [esp+270h] [ebp-66Ch] void *v168; // [esp+274h] [ebp-668h] int v169[4]; // [esp+280h] [ebp-65Ch] BYREF int *v170; // [esp+290h] [ebp-64Ch] int *v171; // [esp+294h] [ebp-648h] _DWORD v172[4]; // [esp+2A0h] [ebp-63Ch] BYREF char *v173; // [esp+2B0h] [ebp-62Ch] char *v174; // [esp+2B4h] [ebp-628h] _BYTE v175[16]; // [esp+2C0h] [ebp-61Ch] BYREF int v176; // [esp+2D0h] [ebp-60Ch] int v177; // [esp+2D4h] [ebp-608h] _DWORD v178[4]; // [esp+2E0h] [ebp-5FCh] BYREF int v179; // [esp+2F0h] [ebp-5ECh] void *v180; // [esp+2F4h] [ebp-5E8h] _BYTE v181[24]; // [esp+300h] [ebp-5DCh] BYREF _BYTE v182[24]; // [esp+318h] [ebp-5C4h] BYREF _BYTE v183[24]; // [esp+330h] [ebp-5ACh] BYREF _BYTE v184[24]; // [esp+348h] [ebp-594h] BYREF _BYTE v185[24]; // [esp+360h] [ebp-57Ch] BYREF _BYTE v186[24]; // [esp+378h] [ebp-564h] BYREF int v187[6]; // [esp+390h] [ebp-54Ch] BYREF _BYTE v188[16]; // [esp+3D8h] [ebp-504h] BYREF int v189; // [esp+3E8h] [ebp-4F4h] void *v190; // [esp+3ECh] [ebp-4F0h] _BYTE v191[24]; // [esp+3F0h] [ebp-4ECh] BYREF _BYTE v192[24]; // [esp+408h] [ebp-4D4h] BYREF _BYTE v193[24]; // [esp+420h] [ebp-4BCh] BYREF _BYTE v194[24]; // [esp+438h] [ebp-4A4h] BYREF _BYTE v195[24]; // [esp+450h] [ebp-48Ch] BYREF _BYTE v196[24]; // [esp+468h] [ebp-474h] BYREF _BYTE v197[24]; // [esp+480h] [ebp-45Ch] BYREF _BYTE v198[24]; // [esp+498h] [ebp-444h] BYREF _BYTE v199[24]; // [esp+4B0h] [ebp-42Ch] BYREF _BYTE v200[24]; // [esp+4C8h] [ebp-414h] BYREF _BYTE v201[24]; // [esp+4E0h] [ebp-3FCh] BYREF _BYTE v202[24]; // [esp+4F8h] [ebp-3E4h] BYREF _BYTE v203[24]; // [esp+510h] [ebp-3CCh] BYREF _BYTE v204[24]; // [esp+528h] [ebp-3B4h] BYREF _BYTE v205[24]; // [esp+540h] [ebp-39Ch] BYREF _BYTE v206[24]; // [esp+558h] [ebp-384h] BYREF _BYTE v207[24]; // [esp+570h] [ebp-36Ch] BYREF _BYTE v208[24]; // [esp+588h] [ebp-354h] BYREF int v209[4]; // [esp+5A0h] [ebp-33Ch] BYREF int *v210; // [esp+5B0h] [ebp-32Ch] int *v211; // [esp+5B4h] [ebp-328h] _BYTE v212[28]; // [esp+5C4h] [ebp-318h] BYREF _BYTE v213[40]; // [esp+5E0h] [ebp-2FCh] BYREF int v214; // [esp+608h] [ebp-2D4h] int v215; // [esp+60Ch] [ebp-2D0h] _BYTE v216[8]; // [esp+650h] [ebp-28Ch] BYREF int v217; // [esp+658h] [ebp-284h] BYREF _BYTE *v218; // [esp+660h] [ebp-27Ch] void *v219; // [esp+664h] [ebp-278h] _BYTE v220[8]; // [esp+668h] [ebp-274h] BYREF char v221; // [esp+670h] [ebp-26Ch] _BYTE *v222; // [esp+678h] [ebp-264h] _BYTE *v223; // [esp+67Ch] [ebp-260h] __int16 v224; // [esp+680h] [ebp-25Ch] __int16 v225; // [esp+682h] [ebp-25Ah] __int16 v226; // [esp+684h] [ebp-258h] __int16 v227; // [esp+686h] [ebp-256h] __int16 v228; // [esp+688h] [ebp-254h] __int16 v229; // [esp+68Ah] [ebp-252h] int v230[148]; // [esp+68Ch] [ebp-250h] BYREF HUTRuntime::HUTRuntime((HUTRuntime *)v212, 1); ParamMgr = (HDDMTile **)HPAParamMgr::getParamMgr(v83); v89 = v216; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v181, "device.trackDeviceDataLoading"); ValueAsBool = HPAParamMgr::getValueAsBool(ParamMgr, v181); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v181); if ( ValueAsBool ) { stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v199, "trackDeviceDataLoading"); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v198, "device"); v98 = &locret_1000002; v97 = v199; v95 = (HDDMTilePort **)v198; v89 = (_BYTE *)(elf_hash_bucket + 454); ComMsgMgr::sendScopedMsg::eval(2, "device/devmodel/HDDMDevice.cxx"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v198); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v199); } stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v182, (int)deviceFilePath); sub_8D7F97(s1a, s2b, v89, v95, v97, v98); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v182); s1 = v219; n = v218 - (_BYTE *)v219; for ( i = 0; i != 16; ++i ) { v6 = this->m_devices[i]; if ( v6 ) { s2 = (const void *)v6->dwordD8; if ( n == v6->dwordD4 - (_DWORD)s2 ) { v101 = s1; v51 = memcmp(s1, s2, n); s1 = v101; if ( !v51 ) { ++v6->nCurrDevice; if ( ValueAsBool ) { stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v201, "trackDeviceDataLoading"); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v200, "device"); ComMsgMgr::sendScopedMsg::eval(2, "device/devmodel/HDDMDevice.cxx"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v200); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v201); } stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216); goto LABEL_88; } } } } stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v184, ""); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v183, ""); Device = (HDDMDevice *)HDDMDeviceCache::createDevice(this, (const HSTString *)v183, (const HSTString *)v184); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v183); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v184); ++Device->nCurrDevice; deviceFileType[0] = 0; deviceFileVersion = 0; HDDMDeviceCache::getFileTypeAndVersion(this, deviceFilePath, deviceFileType, &deviceFileVersion); if ( (unsigned __int16)(deviceFileType[0] - 2) > 1u ) { exception = __cxa_allocate_exception(0x20u); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v186, (int)deviceFilePath); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v185, "File is not a chip or device XNG:"); sub_68FB83(v186); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v185); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v186); __cxa_throw( exception, (struct type_info *)&`typeinfo for'HEXDataException, (void (*)(void *))HEXDataException::~HEXDataException); } v140 = v139; v141 = (unsigned int)v139; v139[0] = 0; v8 = (int *)v142; v143 = (int)v142; v144 = v142; v142[0] = 0; if ( deviceFileType[0] == 2 ) { isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream( v216, *((_DWORD *)deviceFilePath + 5), 4, 0); sub_8D8DC4(); HDDMXng::Chip::Chip((HDDMXng::Chip *)v213); HDDMDevice::readMessage((int)&v217, (google::protobuf::MessageLite *)v213); if ( (_BYTE *)v215 != v139 ) stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v139, *(void **)(v215 + 20), *(_DWORD *)(v215 + 16)); if ( (_BYTE *)v214 != v142 ) stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v142, *(void **)(v214 + 20), *(_DWORD *)(v214 + 16)); HDDMXng::Chip::~Chip((HDDMXng::Chip *)v213); isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216); } else { stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v187, (int)deviceFilePath); v8 = (int *)v216; HUBSimpleScanner::HUBSimpleScanner((HUBSimpleScanner *)v216, (int)v187); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v187); HUBSimpleScanner::scanTargetWord((HUBSimpleScanner *)v216, "xngd", 1); HUBSimpleScanner::scanInt((HUBSimpleScanner *)v216, 1, "version number"); HUBSimpleScanner::scanWord((HUBSimpleScanner *)v145, (bool)v216, (const char *)&dword_0 + 1); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign((int)v139, v147, v146); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v145); HUBSimpleScanner::scanWord((HUBSimpleScanner *)v148, (bool)v216, (const char *)&dword_0 + 1); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign((int)v142, v150, v149); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v148); HUBSimpleScanner::~HUBSimpleScanner((HUBSimpleScanner *)v216); } stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( istream, (int)archFilePath); if ( v153 == v152 ) { stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v154, (int)deviceFilePath); v158 = (int)v157; v159 = v157; v70 = &v140[-v141 + 5]; if ( &v140[-v141] != (_BYTE *)-5 ) { if ( (unsigned int)v70 <= 0x10 ) { v71 = (int)v157; } else { v71 = stlp_std::__malloc_alloc::allocate((stlp_std::__malloc_alloc *)&v140[-v141 + 5], (unsigned int)v87); v159 = (void *)v71; v158 = v71; v157[0] = &v70[v71]; } *(_BYTE *)v71 = 0; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(v157, v141, v140); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>( (int)v157, ".xng", (int)""); v108 = (stlp_std::__malloc_alloc *)"/"; v72 = stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::rfind(v154, "/", -1, 1); if ( v72 != -1 ) { v104 = v72 + 1; v73 = v156; if ( v72 + 1 <= (unsigned int)&v155[-v156] ) { if ( v158 - (int)v159 > (unsigned int)(-3 - v72) ) { v66 = sub_68FB2C(); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v73); v67 = v66; LABEL_89: stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(istream); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v142); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v139); HUTRuntime::~HUTRuntime((HUTRuntime *)v212); _Unwind_Resume(v67, s2a, nc, v96); } stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_replace( (int)v154, (void *)(v104 + v156), v155, v159, v158, 0); v70 = v213; isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream( v213, v156, 4, 0); if ( (v213[32] & 5) == 0 ) { LABEL_106: isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v70); LABEL_107: stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v188, (int)v154); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v157); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v154); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)istream, v190, v189); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v188); goto LABEL_11; } v170 = v169; v171 = v169; stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_allocate_block( (int)v169, (stlp_std::__malloc_alloc *)&v140[-v141 + 7]); *(_BYTE *)v170 = 0; v96 = (HDDMTilePort **)&v126; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>( (int)v169, "../../", (int)""); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v169, v141, v140); v173 = (char *)v172; v174 = (char *)v172; v74 = (char *)v170 - (char *)v171 + 2; if ( (char *)v170 - (char *)v171 == -2 ) { v81 = sub_68FB2C(); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v169); LABEL_124: isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v70); v67 = v81; goto LABEL_108; } if ( (unsigned int)((char *)v170 - (char *)v171 + 2) <= 0x10 ) { v75 = (char *)v172; } else { v75 = (char *)stlp_std::__malloc_alloc::allocate( (stlp_std::__malloc_alloc *)((char *)v170 - (char *)v171 + 2), (unsigned int)s2a); v174 = v75; v173 = v75; v172[0] = &v75[v74]; } *v75 = 0; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v172, v171, v170); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>( (int)v172, "/", (int)""); v8 = v209; v210 = v209; v211 = v209; stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_allocate_block( (int)v209, (stlp_std::__malloc_alloc *)(v173 - v174 + v158 - (_DWORD)v159 + 1)); *(_BYTE *)v210 = 0; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v209, v174, v173); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v209, v159, v158); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v172); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v169); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::replace( v154, v104, -1, v209); isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream( v216, v156, 4, 0); if ( (v221 & 5) == 0 ) goto LABEL_105; LABEL_120: v161 = v160; v162 = v160; stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_allocate_block( (int)v160, (stlp_std::__malloc_alloc *)&v140[-v141 + 10]); *(_BYTE *)v161 = 0; v96 = (HDDMTilePort **)&v127; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>( (int)v160, "../../../", (int)""); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v160, v141, v140); nc = (char *)v108; s2a = v160; stlp_std::operator+<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v163); v79 = v164 - v165 + v158 - (_DWORD)v159; v167 = (int)v166; v168 = v166; v110 = (stlp_std::__malloc_alloc *)(v79 + 1); if ( v79 != -1 ) { if ( (unsigned int)v110 <= 0x10 ) { v80 = v166; } else { v80 = (_BYTE *)stlp_std::__malloc_alloc::allocate(v110, (unsigned int)v160); v168 = v80; v167 = (int)v80; v166[0] = (char *)v110 + (_DWORD)v80; } *v80 = 0; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v166, v165, v164); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v166, v159, v158); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v8, v168, v167); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v166); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v163); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v160); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::replace( v154, v104, -1, v8); LABEL_105: isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v8); goto LABEL_106; } v103 = sub_68FB2C(); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v160); isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v8); v81 = v103; goto LABEL_124; } stlp_std::__stl_throw_out_of_range((stlp_std *)"basic_string", (const char *)s2a); } stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v154, v159, v158); isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream( v216, v156, 4, 0); if ( (v221 & 5) != 0 ) { nc = "_"; s2a = (unsigned int *)v139; stlp_std::operator+<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v175); v76 = *((_DWORD *)deviceFilePath + 4) - *((_DWORD *)deviceFilePath + 5); v179 = (int)v178; v180 = v178; v77 = (stlp_std::__malloc_alloc *)(v76 + v176 - v177 + 1); if ( !v77 ) { v67 = sub_68FB2C(); isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216); LABEL_108: stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v157); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v154); goto LABEL_89; } v78 = v178; if ( (unsigned int)v77 > 0x10 ) { v78 = (_BYTE *)stlp_std::__malloc_alloc::allocate(v77, (unsigned int)v139); v180 = v78; v179 = (int)v78; v178[0] = (char *)v77 + (_DWORD)v78; } *v78 = 0; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(v178, v177, v176); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append( v178, *((_DWORD *)deviceFilePath + 5), *((_DWORD *)deviceFilePath + 4)); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v154, v180, v179); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v178); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v175); } isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216); goto LABEL_107; } sub_68FB2C(); goto LABEL_120; } LABEL_11: stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v191, (int)istream); HDDMDevice::setloadpaths(Device, deviceFilePath, (const HSTString *)v191); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v191); archFileType = 0; archFileVersion[0] = 0; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v192, (int)istream); HDDMDeviceCache::getFileTypeAndVersion(this, (const HSTString *)v192, &archFileType, archFileVersion); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v192); if ( archFileType != 1 ) { v69 = __cxa_allocate_exception(0x20u); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v194, (int)istream); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v193, "File is not an architecture XNG:"); sub_68FB83(v194); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v193); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v194); __cxa_throw( v69, (struct type_info *)&`typeinfo for'HEXDataException, (void (*)(void *))HEXDataException::~HEXDataException); } HDDMDevice::readarch_pb(Device, (int)istream, archFileVersion[0]); v9 = deviceFileType[0] == 3; Device->isLoadArchXng = deviceFileType[0] == 3; if ( v9 ) { HDDMDevice::readdevice(Device, (int)deviceFilePath); } else { v218 = v216; v219 = v216; v216[0] = 0; v222 = v220; v223 = v220; v220[0] = 0; v224 = -1; v225 = -1; v226 = -1; v227 = -1; v228 = -1; v229 = -1; v230[4] = (int)v230; v230[5] = (int)v230; LOBYTE(v230[0]) = 0; memset(&v230[6], 0, 16); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v220, "chip", (int)""); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign((int)v216, v144, v143); if ( deviceFilePath != (const HSTString *)v230 ) stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign( (int)v230, *((void **)deviceFilePath + 5), *((_DWORD *)deviceFilePath + 4)); v224 = 0; v225 = 0; v226 = 0; v227 = 0; v228 = 0; v229 = 0; HDDMDevice::readchip_pb(Device, (HDDMChipDesc *)v216); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v230); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v220); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216); } v10 = Device; if ( !Device->hddmRPMGrid ) { HDDMDevice::createRPMGrid(Device); v10 = Device; } HDDMDevice::createRoutingDS(v10); HDDMDevice::setrecursivedeviceid(Device, Device->nDeviceCode & 0xF); HDDMDevice::postprocess(Device); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v195, "device.disableTemplateLoading"); v99 = HPAParamMgr::getValueAsBool(ParamMgr, v195); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v195); if ( !v99 ) { HDDMTemplateIO::HDDMTemplateIO((HDDMTemplateIO *)v216); HDDMTemplateIO::loadTemplateData((HDDMTemplateIO *)v216, Device); HDDMTemplateIO::~HDDMTemplateIO((HDDMTemplateIO *)v216); } HDDMNodeAdjuster::HDDMNodeAdjuster((HDDMNodeAdjuster *)v216, Device); HDDMNodeAdjuster::performAdjustments((HPAParamMgr *)v216, (int)&Device->charC4); HDDMNodeAdjuster::~HDDMNodeAdjuster((HDDMNodeAdjuster *)v216); HDDMDevice::suppressCostcodes(Device); HUTEnv::HUTEnv((HUTEnv *)&v130); Env = HUTEnv::getEnv((HUTEnv *)"DEVMODEL_CHECKTILEPORTS", s2c); HUTEnv::~HUTEnv((HUTEnv *)&v130); if ( Env ) { sub_8D99FC(); word4 = Device->word4; if ( !((unsigned __int16)Device->word6 * word4) ) goto LABEL_70; word6 = Device->word6; v125 = 0; v14 = 0; while ( 1 ) { v15 = Device->dword9C + 48 * v14; v16 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v15 + 3) >> 4] + 136) + 4 * (*(_WORD *)(v15 + 6) >> 6)); v17 = *(_DWORD *)(v16 + 332); if ( !(unsigned __int16)((*(_DWORD *)(v16 + 336) - v17) >> 2) ) goto LABEL_69; v18 = *(_DWORD *)(v16 + 336); v123 = 0; do { v121 = *(_DWORD *)(v17 + 4 * v123); v19 = *(_DWORD *)(v121 + 32); v20 = *(_DWORD *)(v121 + 36); if ( !(unsigned __int16)((v20 - v19) >> 2) ) goto LABEL_67; v120 = 0; do { v102 = *(_DWORD *)(v19 + 4 * v120); v21 = *(_DWORD *)(v102 + 32); v22 = (*(_DWORD *)(v102 + 36) - v21) >> 2; if ( !v22 ) goto LABEL_65; for ( j = 0; j < v22; ++j ) { v33 = 0; if ( v22 > (unsigned __int16)j ) v33 = *(HDDMTilePort **)(v21 + 4 * (unsigned __int16)j); v135 = 0; v136 = 0; if ( (unsigned __int8)HDDMTile::getMatchingPort((HDDMTile *)v15, v33, &v135, &v136) ) { v107 = *((_DWORD *)v136 + 1); v117 = *(_DWORD *)v136 + 8; HDDMTile::getName((HDDMTile *)v208); v112 = *((_DWORD *)v33 + 1); HDDMTile::getName((HDDMTile *)v207); sub_8D99FC(); v34 = sub_8D9601(); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v34, "."); v35 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v34, v102 + 8); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v35, "["); v36 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v35, v112, na); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v36, "]"); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v36, " => "); v37 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v36, v208); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v37, "."); v38 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v37, v117); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v38, "["); v39 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v38, v107, nd); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v39, "]"); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v39, "\n"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v207); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v208); v137 = 0; v138 = 0; HDDMTile::getMatchingPort(v135, v136, &v137, &v138); if ( v138 ) v114 = *(_DWORD *)v138; else v114 = 0; if ( (HDDMTile *)v15 != v137 ) { HDDMTile::getName((HDDMTile *)v206); if ( v137 ) { HDDMTile::getName((HDDMTile *)v205); } else { nb = &v129; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v205, "NULL"); } sub_8D99FC(); v118 = sub_8D9601(); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v118, " should be "); v40 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v118, v206); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v40, "\n"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v205); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v206); } if ( v102 != v114 ) { if ( v114 ) { stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v204, v114 + 8); } else { nb = &v128; stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v204, "NULL"); } sub_8D99FC(); v115 = sub_8D9601(); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v115, " should be "); v41 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v115, v102 + 8); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v41, "\n"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v204); } if ( v33 != v138 ) { v42 = *((_DWORD *)v33 + 1); sub_8D99FC(); v43 = sub_8D97CB(); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v43, " should be "); v44 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v43, v42, nb); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v44, "\n"); v33 = v138; } v116 = *((_DWORD *)v33 + 1); HDDMTile::getName((HDDMTile *)v203); v119 = *((_DWORD *)v136 + 1); HDDMTile::getName((HDDMTile *)v202); sub_8D99FC(); v45 = sub_8D9601(); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v45, "."); v46 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v45, v117); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v46, "["); v47 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v46, v119, nb); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v47, "]"); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v47, " => "); v48 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v47, v203); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v48, "."); v49 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v48, v114 + 8); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v49, "["); v50 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v49, v116, ne); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v50, "]"); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v50, "\n"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v202); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v203); } else { if ( !v135 ) goto LABEL_34; v23 = HDDMDeviceCache::m_devcache[*(_BYTE *)(v15 + 3) >> 4]; v24 = -1431655765 * ((v15 - *(_DWORD *)(v23 + 156)) >> 4); v109 = (stlp_std::__malloc_alloc *)*(unsigned __int16 *)(v23 + 6); v105 = v24 % (unsigned int)v109; v25 = *(unsigned __int16 *)(v23 + 4); v26 = v25 - 1 - v24 / (unsigned int)v109; v27 = *(_DWORD *)(*(_DWORD *)(v23 + 136) + 4 * (*(_WORD *)(v15 + 6) >> 6)); v28 = *(unsigned __int16 *)(v27 + 24); v111 = *(_WORD *)(v27 + 26); v29 = ***(_WORD ***)v33; if ( v29 == 1 ) { if ( (stlp_std::__malloc_alloc *)(v105 + v28) != v109 ) goto LABEL_33; } else if ( v29 ) { if ( v29 == 2 ) { if ( (_WORD)v26 ) goto LABEL_33; } else if ( v29 == 3 && (_WORD)v105 ) { LABEL_33: v106 = *((_DWORD *)v33 + 1); HDDMTile::getName((HDDMTile *)v209); sub_8D99FC(); v30 = sub_8D9601(); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v30, "."); v31 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v30, v102 + 8); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v31, "["); v32 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v31, v106, na); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v32, "]"); stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v32, "\n"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v209); } } else if ( v111 + (unsigned __int16)v26 != (unsigned __int16)v25 ) { goto LABEL_33; } } LABEL_34: v21 = *(_DWORD *)(v102 + 32); v22 = (*(_DWORD *)(v102 + 36) - v21) >> 2; } v19 = *(_DWORD *)(v121 + 32); v20 = *(_DWORD *)(v121 + 36); LABEL_65: ++v120; } while ( v120 < (unsigned __int16)((v20 - v19) >> 2) ); v52 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v15 + 3) >> 4] + 136) + 4 * (*(_WORD *)(v15 + 6) >> 6)); v18 = *(_DWORD *)(v52 + 336); v17 = *(_DWORD *)(v52 + 332); LABEL_67: ++v123; } while ( v123 < (unsigned __int16)((v18 - v17) >> 2) ); word4 = Device->word4; word6 = Device->word6; LABEL_69: v14 = ++v125; if ( v125 >= word6 * (unsigned int)word4 ) { LABEL_70: sub_8D99FC(); break; } } } if ( !Device->hddmOracle ) { v68 = (HDDMOracle *)operator new(0x64u); HDDMOracle::HDDMOracle(v68, Device); Device->hddmOracle = v68; } stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v196, "RCLK_INT_L"); TileType = (unsigned __int8 *)HDDMDevice::getTileType(Device, (const HSTString *)v196); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v196); if ( TileType ) { v54 = *((_WORD *)TileType + 1) >> 2; v55 = (unsigned __int16)(v54 | (*TileType << 14)); if ( v54 | (unsigned __int16)(*TileType << 14) ) { v56 = 0; v57 = 0; do { v58 = v56 + *((_DWORD *)TileType + 41); if ( (*(_BYTE *)(v58 + 3) & 8) != 0 ) *(_BYTE *)(v58 + 1) |= 0x10u; ++v57; v56 += 24; } while ( v55 > v57 ); } } stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v197, "RCLK_INT_R"); v59 = (unsigned __int8 *)HDDMDevice::getTileType(Device, (const HSTString *)v197); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v197); if ( v59 ) { v60 = *((_WORD *)v59 + 1) >> 2; v61 = (unsigned __int16)(v60 | (*v59 << 14)); if ( v60 | (unsigned __int16)(*v59 << 14) ) { v62 = 0; v63 = 0; do { v64 = v62 + *((_DWORD *)v59 + 41); if ( (*(_BYTE *)(v64 + 3) & 8) != 0 ) *(_BYTE *)(v64 + 1) |= 0x10u; ++v63; v62 += 24; } while ( v61 > v63 ); } } if ( ValueAsBool ) { HUTRuntime::getWallSecs((HUTRuntime *)v212); HUTRuntime::getUserSecs((HUTRuntime *)v212); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string( v216, "trackDeviceDataLoading"); stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v213, "device"); ComMsgMgr::sendScopedMsg::eval(3, "device/devmodel/HDDMDevice.cxx"); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v213); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216); } stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(istream); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v142); stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v139); v6 = Device; LABEL_88: HUTRuntime::~HUTRuntime((HUTRuntime *)v212); return v6; }
10-06
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值