Advertisement
PikMike

Untitled

Apr 18th, 2016
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 23.61 KB | None | 0 0
  1. /* This file has been generated by the Hex-Rays decompiler.
  2.    Copyright (c) 2007-2015 Hex-Rays <info@hex-rays.com>
  3.  
  4.    Detected compiler: GNU C++
  5. */
  6.  
  7. #include <defs.h>
  8.  
  9.  
  10. //-------------------------------------------------------------------------
  11. // Function declarations
  12.  
  13. int init_proc();
  14. // int __gmon_start__(void); weak
  15. // _QWORD std::string::size(std::string *this); idb
  16. // _QWORD std::ios_base::Init::Init(std::ios_base::Init *this); idb
  17. // int __fastcall __cxa_atexit(_QWORD, _QWORD, _QWORD); weak
  18. _QWORD __cdecl std::ios_base::Init::~Init(std::ios_base::Init *__hidden this); // weak
  19. // int __fastcall std::string::string(_QWORD, _QWORD, _QWORD, _QWORD); weak
  20. // _QWORD __cdecl std::string::~string(std::string *this); idb
  21. // _QWORD __cdecl std::string::insert(std::string *this, unsigned __int64, const std::string *); idb
  22. // int __fastcall std::allocator<char>::~allocator(_QWORD); weak
  23. // _QWORD std::string::capacity(std::string *this); idb
  24. // int __fastcall std::allocator<char>::allocator(_QWORD); weak
  25. // int __fastcall std::string::string(_QWORD, _QWORD); weak
  26. // _QWORD __cdecl std::string::append(std::string *this, const std::string *); idb
  27. int deregister_tm_clones();
  28. int register_tm_clones();
  29. int _do_global_dtors_aux();
  30. int frame_dummy();
  31. __int64 flag(void); // idb
  32. int __cdecl main(int argc, const char **argv, const char **envp);
  33. int __fastcall __static_initialization_and_destruction_0(int a1, int a2);
  34. int GLOBAL__sub_I__Z4flagv();
  35. __int64 __fastcall std::move<std::string &>(__int64 a1);
  36. __int64 __fastcall std::operator+<char,std::char_traits<char>,std::allocator<char>>(__int64 a1, std::string *a2, std::string *a3);
  37. void __fastcall _libc_csu_init(unsigned int a1, __int64 a2, __int64 a3);
  38. void term_proc();
  39.  
  40. //-------------------------------------------------------------------------
  41. // Data declarations
  42.  
  43. __int64 (__fastcall *_frame_dummy_init_array_entry[3])() = { &frame_dummy, &GLOBAL__sub_I__Z4flagv, &_do_global_dtors_aux }; // weak
  44. __int64 (__fastcall *_do_global_dtors_aux_fini_array_entry)() = &_do_global_dtors_aux; // weak
  45. _UNKNOWN _dso_handle; // weak
  46. char edata; // weak
  47. _UNKNOWN std::__ioinit; // weak
  48. _UNKNOWN unk_6030AF; // weak
  49. // extern _UNKNOWN _gmon_start__; weak
  50.  
  51.  
  52. //----- (00000000004008C8) ----------------------------------------------------
  53. int init_proc()
  54. {
  55.   void *v0; // rax@1
  56.  
  57.   v0 = &_gmon_start__;
  58.   if ( &_gmon_start__ )
  59.     LODWORD(v0) = __gmon_start__();
  60.   return (unsigned __int64)v0;
  61. }
  62. // 400900: using guessed type int __gmon_start__(void);
  63.  
  64. //----- (0000000000400A00) ----------------------------------------------------
  65. #error "400A06: positive sp value has been found (funcsize=3)"
  66.  
  67. //----- (0000000000400A30) ----------------------------------------------------
  68. int deregister_tm_clones()
  69. {
  70.   signed __int64 v0; // rax@1
  71.  
  72.   v0 = &unk_6030AF - (_UNKNOWN *)&edata;
  73.   if ( (unsigned __int64)(&unk_6030AF - (_UNKNOWN *)&edata) > 0xE )
  74.     LODWORD(v0) = 0;
  75.   return v0;
  76. }
  77. // 6030A8: using guessed type char edata;
  78.  
  79. //----- (0000000000400A60) ----------------------------------------------------
  80. int register_tm_clones()
  81. {
  82.   return 0;
  83. }
  84.  
  85. //----- (0000000000400AA0) ----------------------------------------------------
  86. int _do_global_dtors_aux()
  87. {
  88.   int result; // eax@2
  89.  
  90.   if ( !edata )
  91.   {
  92.     result = deregister_tm_clones();
  93.     edata = 1;
  94.   }
  95.   return result;
  96. }
  97. // 6030A8: using guessed type char edata;
  98.  
  99. //----- (0000000000400AC0) ----------------------------------------------------
  100. int frame_dummy()
  101. {
  102.   return register_tm_clones();
  103. }
  104. // 400AC0: could not find valid save-restore pair for rbp
  105.  
  106. //----- (0000000000400AED) ----------------------------------------------------
  107. std::string::string flag(void)
  108. {
  109.   char v1; // [sp+0h] [bp-3D2h]@0
  110.   char v2; // [sp+Ah] [bp-3C8h]@0
  111.   char v3; // [sp+Bh] [bp-3C7h]@0
  112.   char v4; // [sp+12h] [bp-3C0h]@0
  113.   char v5; // [sp+14h] [bp-3BEh]@0
  114.   char v6; // [sp+17h] [bp-3BBh]@0
  115.   char v7; // [sp+1Ah] [bp-3B8h]@0
  116.   char v8; // [sp+1Ch] [bp-3B6h]@0
  117.   char v9; // [sp+1Dh] [bp-3B5h]@0
  118.   char v10; // [sp+1Eh] [bp-3B4h]@0
  119.   char v11; // [sp+20h] [bp-3B2h]@0
  120.   char v12; // [sp+24h] [bp-3AEh]@0
  121.   char v13; // [sp+26h] [bp-3ACh]@0
  122.   char v14; // [sp+27h] [bp-3ABh]@0
  123.   char v15; // [sp+28h] [bp-3AAh]@0
  124.   char v16; // [sp+2Ah] [bp-3A8h]@0
  125.   char v17; // [sp+2Fh] [bp-3A3h]@1
  126.   char v18; // [sp+30h] [bp-3A2h]@1
  127.   char v19; // [sp+31h] [bp-3A1h]@1
  128.   char v20; // [sp+32h] [bp-3A0h]@1
  129.   char v21; // [sp+33h] [bp-39Fh]@1
  130.   char v22; // [sp+34h] [bp-39Eh]@1
  131.   char v23; // [sp+35h] [bp-39Dh]@1
  132.   char v24; // [sp+36h] [bp-39Ch]@1
  133.   char v25; // [sp+37h] [bp-39Bh]@1
  134.   char v26; // [sp+38h] [bp-39Ah]@1
  135.   char v27; // [sp+39h] [bp-399h]@1
  136.   char v28; // [sp+3Ah] [bp-398h]@1
  137.   char v29; // [sp+3Bh] [bp-397h]@1
  138.   char v30; // [sp+3Ch] [bp-396h]@1
  139.   char v31; // [sp+3Dh] [bp-395h]@1
  140.   char v32; // [sp+3Eh] [bp-394h]@1
  141.   char v33; // [sp+3Fh] [bp-393h]@1
  142.   char v34; // [sp+40h] [bp-392h]@1
  143.   char v35; // [sp+41h] [bp-391h]@1
  144.   char v36; // [sp+42h] [bp-390h]@1
  145.   char v37; // [sp+43h] [bp-38Fh]@1
  146.   char v38; // [sp+44h] [bp-38Eh]@1
  147.   char v39; // [sp+45h] [bp-38Dh]@1
  148.   char v40; // [sp+46h] [bp-38Ch]@1
  149.   char v41; // [sp+47h] [bp-38Bh]@1
  150.   char v42; // [sp+48h] [bp-38Ah]@1
  151.   char v43; // [sp+49h] [bp-389h]@1
  152.   char v44; // [sp+4Ah] [bp-388h]@1
  153.   char v45; // [sp+4Bh] [bp-387h]@1
  154.   char v46; // [sp+4Ch] [bp-386h]@1
  155.   char v47; // [sp+4Dh] [bp-385h]@1
  156.   char v48; // [sp+4Eh] [bp-384h]@1
  157.   char v49; // [sp+4Fh] [bp-383h]@1
  158.   char v50; // [sp+50h] [bp-382h]@1
  159.   char v51; // [sp+51h] [bp-381h]@1
  160.   char v52; // [sp+52h] [bp-380h]@1
  161.   char v53; // [sp+53h] [bp-37Fh]@1
  162.   char v54; // [sp+54h] [bp-37Eh]@1
  163.   char v55; // [sp+55h] [bp-37Dh]@1
  164.   char v56; // [sp+56h] [bp-37Ch]@1
  165.   char v57; // [sp+57h] [bp-37Bh]@1
  166.   char v58; // [sp+58h] [bp-37Ah]@1
  167.   char v59; // [sp+59h] [bp-379h]@1
  168.   char v60; // [sp+5Ah] [bp-378h]@1
  169.   char v61; // [sp+5Bh] [bp-377h]@1
  170.   char v62; // [sp+5Ch] [bp-376h]@1
  171.   char v63; // [sp+5Dh] [bp-375h]@1
  172.   char v64; // [sp+5Eh] [bp-374h]@1
  173.   char v65; // [sp+5Fh] [bp-373h]@1
  174.   char v66; // [sp+60h] [bp-372h]@1
  175.   char v67; // [sp+61h] [bp-371h]@1
  176.   char v68; // [sp+62h] [bp-370h]@1
  177.   char v69; // [sp+63h] [bp-36Fh]@1
  178.   char v70; // [sp+64h] [bp-36Eh]@1
  179.   char v71; // [sp+65h] [bp-36Dh]@1
  180.   char v72; // [sp+66h] [bp-36Ch]@1
  181.   char v73; // [sp+67h] [bp-36Bh]@1
  182.   char v74; // [sp+68h] [bp-36Ah]@1
  183.   char v75; // [sp+69h] [bp-369h]@1
  184.   char v76; // [sp+6Ah] [bp-368h]@1
  185.   char v77; // [sp+6Bh] [bp-367h]@1
  186.   char v78; // [sp+6Ch] [bp-366h]@1
  187.   char v79; // [sp+6Dh] [bp-365h]@1
  188.   char v80; // [sp+6Eh] [bp-364h]@1
  189.   char v81; // [sp+6Fh] [bp-363h]@1
  190.   char v82; // [sp+70h] [bp-362h]@1
  191.   char v83; // [sp+71h] [bp-361h]@1
  192.   char v84; // [sp+72h] [bp-360h]@1
  193.   char v85; // [sp+73h] [bp-35Fh]@1
  194.   char v86; // [sp+74h] [bp-35Eh]@1
  195.   char v87; // [sp+75h] [bp-35Dh]@1
  196.   char v88; // [sp+76h] [bp-35Ch]@1
  197.   char v89; // [sp+77h] [bp-35Bh]@1
  198.   char v90; // [sp+78h] [bp-35Ah]@1
  199.   char v91; // [sp+79h] [bp-359h]@1
  200.   char v92; // [sp+7Ah] [bp-358h]@1
  201.   char v93; // [sp+7Bh] [bp-357h]@1
  202.   char v94; // [sp+7Ch] [bp-356h]@1
  203.   char v95; // [sp+7Dh] [bp-355h]@1
  204.   char v96; // [sp+7Eh] [bp-354h]@1
  205.   char v97; // [sp+7Fh] [bp-353h]@1
  206.   char v98; // [sp+80h] [bp-352h]@1
  207.   char v99; // [sp+81h] [bp-351h]@1
  208.   char v100; // [sp+82h] [bp-350h]@1
  209.   char v101; // [sp+83h] [bp-34Fh]@1
  210.   char v102; // [sp+84h] [bp-34Eh]@1
  211.   char v103; // [sp+85h] [bp-34Dh]@1
  212.   char v104; // [sp+86h] [bp-34Ch]@1
  213.   char v105; // [sp+87h] [bp-34Bh]@1
  214.   char v106; // [sp+88h] [bp-34Ah]@1
  215.   char v107; // [sp+89h] [bp-349h]@1
  216.   char v108; // [sp+8Ah] [bp-348h]@1
  217.   char v109; // [sp+8Bh] [bp-347h]@1
  218.   char v110; // [sp+8Ch] [bp-346h]@1
  219.   char v111; // [sp+8Dh] [bp-345h]@1
  220.   char v112; // [sp+8Eh] [bp-344h]@1
  221.   char v113; // [sp+8Fh] [bp-343h]@1
  222.   char v114; // [sp+90h] [bp-342h]@1
  223.   char v115; // [sp+91h] [bp-341h]@1
  224.   char v116; // [sp+92h] [bp-340h]@1
  225.   char v117; // [sp+A2h] [bp-330h]@1
  226.   char v118; // [sp+B2h] [bp-320h]@1
  227.   char v119; // [sp+C2h] [bp-310h]@1
  228.   char v120; // [sp+D2h] [bp-300h]@1
  229.   char v121; // [sp+E2h] [bp-2F0h]@1
  230.   char v122; // [sp+F2h] [bp-2E0h]@1
  231.   char v123; // [sp+102h] [bp-2D0h]@1
  232.   char v124; // [sp+112h] [bp-2C0h]@1
  233.   char v125; // [sp+122h] [bp-2B0h]@1
  234.   char v126; // [sp+132h] [bp-2A0h]@1
  235.   char v127; // [sp+142h] [bp-290h]@1
  236.   char v128; // [sp+152h] [bp-280h]@1
  237.   char v129; // [sp+162h] [bp-270h]@1
  238.   char v130; // [sp+172h] [bp-260h]@1
  239.   char v131; // [sp+182h] [bp-250h]@1
  240.   char v132; // [sp+192h] [bp-240h]@1
  241.   char v133; // [sp+1A2h] [bp-230h]@1
  242.   char v134; // [sp+1B2h] [bp-220h]@1
  243.   char v135; // [sp+1C2h] [bp-210h]@1
  244.   char v136; // [sp+1D2h] [bp-200h]@1
  245.   char v137; // [sp+1E2h] [bp-1F0h]@1
  246.   char v138; // [sp+1F2h] [bp-1E0h]@1
  247.   char v139; // [sp+202h] [bp-1D0h]@1
  248.   char v140; // [sp+212h] [bp-1C0h]@1
  249.   char v141; // [sp+222h] [bp-1B0h]@1
  250.   char v142; // [sp+232h] [bp-1A0h]@1
  251.   char v143; // [sp+242h] [bp-190h]@1
  252.   char v144; // [sp+252h] [bp-180h]@1
  253.   char v145; // [sp+262h] [bp-170h]@1
  254.   char v146; // [sp+272h] [bp-160h]@1
  255.   char v147; // [sp+282h] [bp-150h]@1
  256.   char v148; // [sp+292h] [bp-140h]@1
  257.   char v149; // [sp+2A2h] [bp-130h]@1
  258.   char v150; // [sp+2B2h] [bp-120h]@1
  259.   char v151; // [sp+2C2h] [bp-110h]@1
  260.   char v152; // [sp+2D2h] [bp-100h]@1
  261.   char v153; // [sp+2E2h] [bp-F0h]@1
  262.   char v154; // [sp+2F2h] [bp-E0h]@1
  263.   char v155; // [sp+302h] [bp-D0h]@1
  264.   char v156; // [sp+312h] [bp-C0h]@1
  265.   char v157; // [sp+322h] [bp-B0h]@1
  266.   char v158; // [sp+332h] [bp-A0h]@1
  267.   char v159; // [sp+342h] [bp-90h]@1
  268.   char v160; // [sp+352h] [bp-80h]@1
  269.   char v161; // [sp+362h] [bp-70h]@1
  270.   char v162; // [sp+372h] [bp-60h]@1
  271.   char v163; // [sp+382h] [bp-50h]@1
  272.   char v164; // [sp+392h] [bp-40h]@1
  273.   char v165; // [sp+3A2h] [bp-30h]@1
  274.   char v166; // [sp+3B2h] [bp-20h]@1
  275.  
  276.   v43 = 113;
  277.   v44 = 122;
  278.   v45 = 115;
  279.   v46 = 97;
  280.   v47 = 120;
  281.   v48 = 119;
  282.   v49 = 99;
  283.   v50 = 101;
  284.   v51 = 102;
  285.   v52 = 100;
  286.   v53 = 118;
  287.   v54 = 114;
  288.   v55 = 98;
  289.   v56 = 116;
  290.   v57 = 110;
  291.   v58 = 103;
  292.   v59 = 104;
  293.   v60 = 123;
  294.   v61 = 121;
  295.   v62 = 109;
  296.   v63 = 106;
  297.   v64 = 117;
  298.   v65 = 107;
  299.   v66 = 105;
  300.   v67 = 108;
  301.   v68 = 111;
  302.   v69 = 112;
  303.   v70 = 49;
  304.   v71 = 54;
  305.   v72 = 50;
  306.   v73 = 53;
  307.   v74 = 51;
  308.   v75 = 57;
  309.   v76 = 53;
  310.   v77 = 48;
  311.   v78 = 125;
  312.   v79 = 52;
  313.   v80 = 57;
  314.   v81 = 50;
  315.   v82 = 56;
  316.   v83 = 51;
  317.   v84 = 55;
  318.   v85 = 52;
  319.   v86 = 97;
  320.   v87 = 102;
  321.   v88 = 95;
  322.   v89 = 45;
  323.   v90 = v6;
  324.   v91 = v1;
  325.   v92 = v3;
  326.   v93 = v16;
  327.   v94 = v9;
  328.   v95 = v1;
  329.   v96 = v11;
  330.   v97 = v16;
  331.   v98 = v1;
  332.   v99 = v14;
  333.   v100 = v9;
  334.   v101 = v13;
  335.   v102 = v13;
  336.   v103 = v7;
  337.   v104 = v8;
  338.   v105 = v15;
  339.   v106 = v12;
  340.   v107 = v16;
  341.   v108 = v11;
  342.   v109 = v1;
  343.   v110 = v7;
  344.   v111 = v5;
  345.   v112 = v4;
  346.   v113 = v2;
  347.   v114 = v14;
  348.   v115 = v10;
  349.   std::allocator<char>::allocator(&v42);
  350.   std::string::string(&v166, 1LL, (unsigned int)v113, &v42);
  351.   std::allocator<char>::allocator(&v41);
  352.   std::string::string(&v164, 1LL, (unsigned int)v103, &v41);
  353.   std::allocator<char>::allocator(&v40);
  354.   std::string::string(&v162, 1LL, (unsigned int)v102, &v40);
  355.   std::allocator<char>::allocator(&v39);
  356.   std::string::string(&v160, 1LL, (unsigned int)v110, &v39);
  357.   std::allocator<char>::allocator(&v38);
  358.   std::string::string(&v158, 1LL, (unsigned int)v109, &v38);
  359.   std::allocator<char>::allocator(&v37);
  360.   std::string::string(&v156, 1LL, (unsigned int)v108, &v37);
  361.   std::allocator<char>::allocator(&v36);
  362.   std::string::string(&v154, 1LL, (unsigned int)v107, &v36);
  363.   std::allocator<char>::allocator(&v35);
  364.   std::string::string(&v152, 1LL, (unsigned int)v106, &v35);
  365.   std::allocator<char>::allocator(&v34);
  366.   std::string::string(&v150, 1LL, (unsigned int)v91, &v34);
  367.   std::allocator<char>::allocator(&v33);
  368.   std::string::string(&v148, 1LL, (unsigned int)v90, &v33);
  369.   std::allocator<char>::allocator(&v32);
  370.   std::string::string(&v146, 1LL, (unsigned int)v114, &v32);
  371.   std::allocator<char>::allocator(&v31);
  372.   std::string::string(&v144, 1LL, (unsigned int)v101, &v31);
  373.   std::allocator<char>::allocator(&v30);
  374.   std::string::string(&v142, 1LL, (unsigned int)v100, &v30);
  375.   std::allocator<char>::allocator(&v29);
  376.   std::string::string(&v140, 1LL, (unsigned int)v99, &v29);
  377.   std::allocator<char>::allocator(&v28);
  378.   std::string::string(&v138, 1LL, (unsigned int)v98, &v28);
  379.   std::allocator<char>::allocator(&v27);
  380.   std::string::string(&v136, 1LL, (unsigned int)v97, &v27);
  381.   std::allocator<char>::allocator(&v26);
  382.   std::string::string(&v134, 1LL, (unsigned int)v96, &v26);
  383.   std::allocator<char>::allocator(&v25);
  384.   std::string::string(&v132, 1LL, (unsigned int)v112, &v25);
  385.   std::allocator<char>::allocator(&v24);
  386.   std::string::string(&v130, 1LL, (unsigned int)v111, &v24);
  387.   std::allocator<char>::allocator(&v23);
  388.   std::string::string(&v128, 1LL, (unsigned int)v115, &v23);
  389.   std::allocator<char>::allocator(&v22);
  390.   std::string::string(&v126, 1LL, (unsigned int)v95, &v22);
  391.   std::allocator<char>::allocator(&v21);
  392.   std::string::string(&v124, 1LL, (unsigned int)v94, &v21);
  393.   std::allocator<char>::allocator(&v20);
  394.   std::string::string(&v122, 1LL, (unsigned int)v93, &v20);
  395.   std::allocator<char>::allocator(&v19);
  396.   std::string::string(&v120, 1LL, (unsigned int)v92, &v19);
  397.   std::allocator<char>::allocator(&v18);
  398.   std::string::string(&v118, 1LL, (unsigned int)v105, &v18);
  399.   std::allocator<char>::allocator(&v17);
  400.   std::string::string(&v117, 1LL, (unsigned int)v104, &v17);
  401.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  402.     (__int64)&v119,
  403.     (std::string *)&v117,
  404.     (std::string *)&v118);
  405.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  406.     (__int64)&v121,
  407.     (std::string *)&v119,
  408.     (std::string *)&v120);
  409.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  410.     (__int64)&v123,
  411.     (std::string *)&v121,
  412.     (std::string *)&v122);
  413.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  414.     (__int64)&v125,
  415.     (std::string *)&v123,
  416.     (std::string *)&v124);
  417.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  418.     (__int64)&v127,
  419.     (std::string *)&v125,
  420.     (std::string *)&v126);
  421.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  422.     (__int64)&v129,
  423.     (std::string *)&v127,
  424.     (std::string *)&v128);
  425.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  426.     (__int64)&v131,
  427.     (std::string *)&v129,
  428.     (std::string *)&v130);
  429.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  430.     (__int64)&v133,
  431.     (std::string *)&v131,
  432.     (std::string *)&v132);
  433.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  434.     (__int64)&v135,
  435.     (std::string *)&v133,
  436.     (std::string *)&v134);
  437.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  438.     (__int64)&v137,
  439.     (std::string *)&v135,
  440.     (std::string *)&v136);
  441.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  442.     (__int64)&v139,
  443.     (std::string *)&v137,
  444.     (std::string *)&v138);
  445.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  446.     (__int64)&v141,
  447.     (std::string *)&v139,
  448.     (std::string *)&v140);
  449.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  450.     (__int64)&v143,
  451.     (std::string *)&v141,
  452.     (std::string *)&v142);
  453.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  454.     (__int64)&v145,
  455.     (std::string *)&v143,
  456.     (std::string *)&v144);
  457.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  458.     (__int64)&v147,
  459.     (std::string *)&v145,
  460.     (std::string *)&v146);
  461.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  462.     (__int64)&v149,
  463.     (std::string *)&v147,
  464.     (std::string *)&v148);
  465.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  466.     (__int64)&v151,
  467.     (std::string *)&v149,
  468.     (std::string *)&v150);
  469.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  470.     (__int64)&v153,
  471.     (std::string *)&v151,
  472.     (std::string *)&v152);
  473.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  474.     (__int64)&v155,
  475.     (std::string *)&v153,
  476.     (std::string *)&v154);
  477.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  478.     (__int64)&v157,
  479.     (std::string *)&v155,
  480.     (std::string *)&v156);
  481.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  482.     (__int64)&v159,
  483.     (std::string *)&v157,
  484.     (std::string *)&v158);
  485.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  486.     (__int64)&v161,
  487.     (std::string *)&v159,
  488.     (std::string *)&v160);
  489.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  490.     (__int64)&v163,
  491.     (std::string *)&v161,
  492.     (std::string *)&v162);
  493.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  494.     (__int64)&v165,
  495.     (std::string *)&v163,
  496.     (std::string *)&v164);
  497.   std::operator+<char,std::char_traits<char>,std::allocator<char>>(
  498.     (__int64)&v116,
  499.     (std::string *)&v165,
  500.     (std::string *)&v166);
  501.   std::string::~string((std::string *)&v165);
  502.   std::string::~string((std::string *)&v163);
  503.   std::string::~string((std::string *)&v161);
  504.   std::string::~string((std::string *)&v159);
  505.   std::string::~string((std::string *)&v157);
  506.   std::string::~string((std::string *)&v155);
  507.   std::string::~string((std::string *)&v153);
  508.   std::string::~string((std::string *)&v151);
  509.   std::string::~string((std::string *)&v149);
  510.   std::string::~string((std::string *)&v147);
  511.   std::string::~string((std::string *)&v145);
  512.   std::string::~string((std::string *)&v143);
  513.   std::string::~string((std::string *)&v141);
  514.   std::string::~string((std::string *)&v139);
  515.   std::string::~string((std::string *)&v137);
  516.   std::string::~string((std::string *)&v135);
  517.   std::string::~string((std::string *)&v133);
  518.   std::string::~string((std::string *)&v131);
  519.   std::string::~string((std::string *)&v129);
  520.   std::string::~string((std::string *)&v127);
  521.   std::string::~string((std::string *)&v125);
  522.   std::string::~string((std::string *)&v123);
  523.   std::string::~string((std::string *)&v121);
  524.   std::string::~string((std::string *)&v119);
  525.   std::string::~string((std::string *)&v117);
  526.   std::allocator<char>::~allocator(&v17);
  527.   std::string::~string((std::string *)&v118);
  528.   std::allocator<char>::~allocator(&v18);
  529.   std::string::~string((std::string *)&v120);
  530.   std::allocator<char>::~allocator(&v19);
  531.   std::string::~string((std::string *)&v122);
  532.   std::allocator<char>::~allocator(&v20);
  533.   std::string::~string((std::string *)&v124);
  534.   std::allocator<char>::~allocator(&v21);
  535.   std::string::~string((std::string *)&v126);
  536.   std::allocator<char>::~allocator(&v22);
  537.   std::string::~string((std::string *)&v128);
  538.   std::allocator<char>::~allocator(&v23);
  539.   std::string::~string((std::string *)&v130);
  540.   std::allocator<char>::~allocator(&v24);
  541.   std::string::~string((std::string *)&v132);
  542.   std::allocator<char>::~allocator(&v25);
  543.   std::string::~string((std::string *)&v134);
  544.   std::allocator<char>::~allocator(&v26);
  545.   std::string::~string((std::string *)&v136);
  546.   std::allocator<char>::~allocator(&v27);
  547.   std::string::~string((std::string *)&v138);
  548.   std::allocator<char>::~allocator(&v28);
  549.   std::string::~string((std::string *)&v140);
  550.   std::allocator<char>::~allocator(&v29);
  551.   std::string::~string((std::string *)&v142);
  552.   std::allocator<char>::~allocator(&v30);
  553.   std::string::~string((std::string *)&v144);
  554.   std::allocator<char>::~allocator(&v31);
  555.   std::string::~string((std::string *)&v146);
  556.   std::allocator<char>::~allocator(&v32);
  557.   std::string::~string((std::string *)&v148);
  558.   std::allocator<char>::~allocator(&v33);
  559.   std::string::~string((std::string *)&v150);
  560.   std::allocator<char>::~allocator(&v34);
  561.   std::string::~string((std::string *)&v152);
  562.   std::allocator<char>::~allocator(&v35);
  563.   std::string::~string((std::string *)&v154);
  564.   std::allocator<char>::~allocator(&v36);
  565.   std::string::~string((std::string *)&v156);
  566.   std::allocator<char>::~allocator(&v37);
  567.   std::string::~string((std::string *)&v158);
  568.   std::allocator<char>::~allocator(&v38);
  569.   std::string::~string((std::string *)&v160);
  570.   std::allocator<char>::~allocator(&v39);
  571.   std::string::~string((std::string *)&v162);
  572.   std::allocator<char>::~allocator(&v40);
  573.   std::string::~string((std::string *)&v164);
  574.   std::allocator<char>::~allocator(&v41);
  575.   std::string::~string((std::string *)&v166);
  576.   std::allocator<char>::~allocator(&v42);
  577.   return std::string::~string((std::string *)&v116);
  578. }
  579. // 400960: using guessed type int __fastcall std::string::string(_QWORD, _QWORD, _QWORD, _QWORD);
  580. // 400990: using guessed type int __fastcall std::allocator<char>::~allocator(_QWORD);
  581. // 4009B0: using guessed type int __fastcall std::allocator<char>::allocator(_QWORD);
  582.  
  583. //----- (0000000000401F6F) ----------------------------------------------------
  584. int __cdecl main(int argc, const char **argv, const char **envp)
  585. {
  586.   printf("%s", flag());
  587.   return 1;
  588. }
  589.  
  590. //----- (0000000000401F8A) ----------------------------------------------------
  591. int __fastcall __static_initialization_and_destruction_0(int a1, int a2)
  592. {
  593.   int result; // eax@3
  594.  
  595.   if ( a1 == 1 && a2 == 0xFFFF )
  596.   {
  597.     std::ios_base::Init::Init((std::ios_base::Init *)&std::__ioinit);
  598.     result = __cxa_atexit(std::ios_base::Init::~Init, &std::__ioinit, &_dso_handle);
  599.   }
  600.   return result;
  601. }
  602. // 400940: using guessed type int __fastcall __cxa_atexit(_QWORD, _QWORD, _QWORD);
  603. // 400950: using guessed type _QWORD __cdecl std::ios_base::Init::~Init(std::ios_base::Init *__hidden this);
  604.  
  605. //----- (0000000000401FC7) ----------------------------------------------------
  606. int GLOBAL__sub_I__Z4flagv()
  607. {
  608.   return __static_initialization_and_destruction_0(1, 0xFFFF);
  609. }
  610.  
  611. //----- (0000000000401FDC) ----------------------------------------------------
  612. __int64 __fastcall std::move<std::string &>(__int64 a1)
  613. {
  614.   return a1;
  615. }
  616.  
  617. //----- (0000000000401FEA) ----------------------------------------------------
  618. __int64 __fastcall std::operator+<char,std::char_traits<char>,std::allocator<char>>(__int64 a1, std::string *a2, std::string *a3)
  619. {
  620.   __int64 v3; // rbx@1
  621.   bool v4; // al@3
  622.   __int64 v5; // rax@6
  623.   __int64 v6; // rax@6
  624.   __int64 v7; // rax@7
  625.   __int64 v8; // rax@7
  626.   std::string *v10; // [sp+8h] [bp-38h]@1
  627.   __int64 v11; // [sp+28h] [bp-18h]@1
  628.  
  629.   v10 = a3;
  630.   v3 = std::string::size(a2);
  631.   v11 = v3 + std::string::size(v10);
  632.   v4 = std::string::capacity(a2) < (unsigned __int64)v11 && std::string::capacity(v10) >= (unsigned __int64)v11;
  633.   if ( v4 )
  634.   {
  635.     v5 = std::string::insert(v10, 0LL, a2);
  636.     v6 = std::move<std::string &>(v5);
  637.     std::string::string(a1, v6);
  638.   }
  639.   else
  640.   {
  641.     v7 = std::string::append(a2, v10);
  642.     v8 = std::move<std::string &>(v7);
  643.     std::string::string(a1, v8);
  644.   }
  645.   return a1;
  646. }
  647. // 4009D0: using guessed type int __fastcall std::string::string(_QWORD, _QWORD);
  648.  
  649. //----- (00000000004020D0) ----------------------------------------------------
  650. void __fastcall _libc_csu_init(unsigned int a1, __int64 a2, __int64 a3)
  651. {
  652.   __int64 v3; // r13@1
  653.   __int64 v4; // rbx@1
  654.   signed __int64 v5; // rbp@1
  655.  
  656.   v3 = a3;
  657.   v4 = 0LL;
  658.   v5 = &_do_global_dtors_aux_fini_array_entry - _frame_dummy_init_array_entry;
  659.   init_proc();
  660.   if ( v5 )
  661.   {
  662.     do
  663.       ((void (__fastcall *)(_QWORD, __int64, __int64))_frame_dummy_init_array_entry[v4++])(a1, a2, v3);
  664.     while ( v4 != v5 );
  665.   }
  666. }
  667. // 602DE8: using guessed type __int64 (__fastcall *_frame_dummy_init_array_entry[3])();
  668. // 602DF8: using guessed type __int64 (__fastcall *_do_global_dtors_aux_fini_array_entry)();
  669.  
  670. //----- (0000000000402144) ----------------------------------------------------
  671. void term_proc()
  672. {
  673.   ;
  674. }
  675.  
  676. #error "There were 1 decompilation failure(s) on 14 function(s)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement