Advertisement
Guest User

Untitled

a guest
Aug 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. onst void *__thiscall sub_414CE0(const void **this, unsigned int a2)
  2. {
  3. const void **v2; // esi
  4. unsigned int v3; // ebx
  5. unsigned int v4; // edi
  6. unsigned int v5; // ecx
  7. void *v6; // ecx
  8. const void *result; // eax
  9. size_t v8; // [esp-4h] [ebp-30h]
  10. const void *v9; // [esp+18h] [ebp-14h]
  11.  
  12. v2 = this;
  13. if ( a2 > 0x7FFFFFFE )
  14. sub_41E6EA();
  15. v3 = (unsigned int)this[5];
  16. v4 = a2 | 7;
  17. if ( (a2 | 7) <= 0x7FFFFFFE )
  18. {
  19. v5 = v3 >> 1;
  20. if ( v3 >> 1 > v4 / 3 )
  21. {
  22. v4 = 2147483646;
  23. if ( v3 <= 2147483646 - v5 )
  24. v4 = v5 + v3;
  25. }
  26. }
  27. else
  28. {
  29. v4 = a2;
  30. }
  31. v6 = std::_Allocate(v4 + 1, 2u, 1);
  32. v9 = v6;
  33. v8 = 2 * (_DWORD)v2[4] + 2;
  34. if ( (unsigned int)v2[5] < 8 )
  35. {
  36. memmove_0(v6, v2, v8);
  37. }
  38. else
  39. {
  40. memmove_0(v6, *v2, v8);
  41. std::_Deallocate((void *)*v2, v3 + 1, 2u);
  42. }
  43. result = v9;
  44. *v2 = v9;
  45. v2[5] = (const void *)v4;
  46. return result;
  47. }
  48. void **__thiscall sub_414E9E(void **this, void **a2, unsigned int a3, unsigned int a4)
  49. {
  50. _DWORD *v4; // ebx
  51. void **v5; // esi
  52. unsigned int v6; // edi
  53. unsigned int v7; // edi
  54. void *v8; // ecx
  55. _WORD *v9; // eax
  56.  
  57. v4 = a2;
  58. v5 = this;
  59. v6 = (unsigned int)a2[4];
  60. if ( v6 < a3 )
  61. sub_414E93();
  62. v7 = v6 - a3;
  63. if ( v7 >= a4 )
  64. v7 = a4;
  65. if ( this == a2 )
  66. {
  67. std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::erase(v7 + a3);
  68. std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::erase(0, a3);
  69. }
  70. else if ( (unsigned __int8)std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>::_Grow(v7) )
  71. {
  72. if ( (unsigned int)a2[5] >= 8 )
  73. v4 = *a2;
  74. if ( (unsigned int)v5[5] < 8 )
  75. v8 = v5;
  76. else
  77. v8 = *v5;
  78. memmove_0(v8, (char *)v4 + 2 * a3, 2 * v7);
  79. v5[4] = (void *)v7;
  80. if ( (unsigned int)v5[5] < 8 )
  81. v9 = v5;
  82. else
  83. v9 = *v5;
  84. v9[v7] = 0;
  85. }
  86. return v5;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement