Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.25 KB | None | 0 0
  1. .text:00498590 ; STD_String *__thiscall std::CreateString(STD_String *this, void *data, size_t Size)
  2. .text:00498590 std__CreateString proc near ; CODE XREF: sub_462150+53p
  3. .text:00498590 ; sub_462150+90p ...
  4. .text:00498590
  5. .text:00498590 data = dword ptr 8
  6. .text:00498590 Size = dword ptr 0Ch
  7. .text:00498590
  8. .text:00498590 000 push ebp
  9. .text:00498591 004 mov ebp, esp
  10. .text:00498593 004 push ebx
  11. .text:00498594 008 mov ebx, [ebp+data]
  12. .text:00498597 008 push esi
  13. .text:00498598 00C mov esi, ecx
  14. .text:0049859A 00C test ebx, ebx
  15. .text:0049859C 00C jz short loc_4985F5
  16. .text:0049859E 00C mov ecx, [esi+14h]
  17. .text:004985A1 00C cmp ecx, 10h
  18. .text:004985A4 00C jb short loc_4985AA
  19. .text:004985A6 00C mov eax, [esi]
  20. .text:004985A8 00C jmp short loc_4985AC
  21. .text:004985AA ; ---------------------------------------------------------------------------
  22. .text:004985AA
  23. .text:004985AA loc_4985AA: ; CODE XREF: std__CreateString+14j
  24. .text:004985AA 00C mov eax, esi
  25. .text:004985AC
  26. .text:004985AC loc_4985AC: ; CODE XREF: std__CreateString+18j
  27. .text:004985AC 00C cmp ebx, eax
  28. .text:004985AE 00C jb short loc_4985F5
  29. .text:004985B0 00C cmp ecx, 10h
  30. .text:004985B3 00C jb short loc_4985B9
  31. .text:004985B5 00C mov edx, [esi]
  32. .text:004985B7 00C jmp short loc_4985BB
  33. .text:004985B9 ; ---------------------------------------------------------------------------
  34. .text:004985B9
  35. .text:004985B9 loc_4985B9: ; CODE XREF: std__CreateString+23j
  36. .text:004985B9 00C mov edx, esi
  37. .text:004985BB
  38. .text:004985BB loc_4985BB: ; CODE XREF: std__CreateString+27j
  39. .text:004985BB 00C mov eax, [esi+10h]
  40. .text:004985BE 00C add eax, edx
  41. .text:004985C0 00C cmp eax, ebx
  42. .text:004985C2 00C jbe short loc_4985F5
  43. .text:004985C4 00C cmp ecx, 10h
  44. .text:004985C7 00C jb short loc_4985DF
  45. .text:004985C9 00C push [ebp+Size] ; size
  46. .text:004985CC 010 mov eax, [esi]
  47. .text:004985CE 010 mov ecx, esi ; this
  48. .text:004985D0 010 sub ebx, eax
  49. .text:004985D2 010 push ebx ; a3
  50. .text:004985D3 014 push esi ; a2
  51. .text:004985D4 018 call sub_498690
  52. .text:004985D9 00C pop esi
  53. .text:004985DA 008 pop ebx
  54. .text:004985DB 004 pop ebp
  55. .text:004985DC 000 retn 8
  56. .text:004985DF ; ---------------------------------------------------------------------------
  57. .text:004985DF
  58. .text:004985DF loc_4985DF: ; CODE XREF: std__CreateString+37j
  59. .text:004985DF 00C push [ebp+Size] ; size
  60. .text:004985E2 010 mov eax, esi
  61. .text:004985E4 010 mov ecx, esi ; this
  62. .text:004985E6 010 sub ebx, eax
  63. .text:004985E8 010 push ebx ; a3
  64. .text:004985E9 014 push esi ; a2
  65. .text:004985EA 018 call sub_498690
  66. .text:004985EF 00C pop esi
  67. .text:004985F0 008 pop ebx
  68. .text:004985F1 004 pop ebp
  69. .text:004985F2 000 retn 8
  70. .text:004985F5 ; ---------------------------------------------------------------------------
  71. .text:004985F5
  72. .text:004985F5 loc_4985F5: ; CODE XREF: std__CreateString+Cj
  73. .text:004985F5 ; std__CreateString+1Ej ...
  74. .text:004985F5 00C push edi
  75. .text:004985F6 010 mov edi, [ebp+Size]
  76. .text:004985F9 010 cmp edi, 0FFFFFFFEh
  77. .text:004985FC 010 jbe short loc_498609
  78. .text:004985FE 010 push offset aStringTooLong ; "string too long"
  79. .text:00498603 014 call ds:?_Xlength_error@std@@YAXPBD@Z ; std::_Xlength_error(char const *)
  80. .text:00498609
  81. .text:00498609 loc_498609: ; CODE XREF: std__CreateString+6Cj
  82. .text:00498609 010 cmp [esi+14h], edi
  83. .text:0049860C 010 jnb short loc_498627
  84. .text:0049860E 010 push dword ptr [esi+10h] ; Size
  85. .text:00498611 014 mov ecx, esi ; this
  86. .text:00498613 014 push edi ; a2
  87. .text:00498614 018 call sub_498DA0
  88. .text:00498619 010 test edi, edi
  89. .text:0049861B 010 jz short loc_49867D
  90. .text:0049861D
  91. .text:0049861D loc_49861D: ; CODE XREF: std__CreateString+99j
  92. .text:0049861D 010 cmp dword ptr [esi+14h], 10h
  93. .text:00498621 010 jb short loc_49864E
  94. .text:00498623 010 mov eax, [esi]
  95. .text:00498625 010 jmp short loc_498650
  96. .text:00498627 ; ---------------------------------------------------------------------------
  97. .text:00498627
  98. .text:00498627 loc_498627: ; CODE XREF: std__CreateString+7Cj
  99. .text:00498627 010 test edi, edi
  100. .text:00498629 010 jnz short loc_49861D
  101. .text:0049862B 010 cmp dword ptr [esi+14h], 10h
  102. .text:0049862F 010 mov [esi+10h], edi
  103. .text:00498632 010 jb short loc_498642
  104. .text:00498634 010 mov eax, [esi]
  105. .text:00498636 010 pop edi
  106. .text:00498637 00C mov byte ptr [eax], 0
  107. .text:0049863A 00C mov eax, esi
  108. .text:0049863C 00C pop esi
  109. .text:0049863D 008 pop ebx
  110. .text:0049863E 004 pop ebp
  111. .text:0049863F 000 retn 8
  112. .text:00498642 ; ---------------------------------------------------------------------------
  113. .text:00498642
  114. .text:00498642 loc_498642: ; CODE XREF: std__CreateString+A2j
  115. .text:00498642 010 mov eax, esi
  116. .text:00498644 010 pop edi
  117. .text:00498645 00C pop esi
  118. .text:00498646 008 pop ebx
  119. .text:00498647 004 mov byte ptr [eax], 0
  120. .text:0049864A 004 pop ebp
  121. .text:0049864B 000 retn 8
  122. .text:0049864E ; ---------------------------------------------------------------------------
  123. .text:0049864E
  124. .text:0049864E loc_49864E: ; CODE XREF: std__CreateString+91j
  125. .text:0049864E 010 mov eax, esi
  126. .text:00498650
  127. .text:00498650 loc_498650: ; CODE XREF: std__CreateString+95j
  128. .text:00498650 010 test edi, edi
  129. .text:00498652 010 jz short loc_49865F
  130. .text:00498654 010 push edi ; Size
  131. .text:00498655 014 push ebx ; Src
  132. .text:00498656 018 push eax ; Dst
  133. .text:00498657 01C call memcpy
  134. .text:0049865C 01C add esp, 0Ch
  135. .text:0049865F
  136. .text:0049865F loc_49865F: ; CODE XREF: std__CreateString+C2j
  137. .text:0049865F 010 cmp dword ptr [esi+14h], 10h
  138. .text:00498663 010 mov [esi+10h], edi
  139. .text:00498666 010 jb short loc_498677
  140. .text:00498668 010 mov eax, [esi]
  141. .text:0049866A 010 mov byte ptr [eax+edi], 0
  142. .text:0049866E 010 mov eax, esi
  143. .text:00498670 010 pop edi
  144. .text:00498671 00C pop esi
  145. .text:00498672 008 pop ebx
  146. .text:00498673 004 pop ebp
  147. .text:00498674 000 retn 8
  148. .text:00498677 ; ---------------------------------------------------------------------------
  149. .text:00498677
  150. .text:00498677 loc_498677: ; CODE XREF: std__CreateString+D6j
  151. .text:00498677 010 mov eax, esi
  152. .text:00498679 010 mov byte ptr [eax+edi], 0
  153. .text:0049867D
  154. .text:0049867D loc_49867D: ; CODE XREF: std__CreateString+8Bj
  155. .text:0049867D 010 pop edi
  156. .text:0049867E 00C mov eax, esi
  157. .text:00498680 00C pop esi
  158. .text:00498681 008 pop ebx
  159. .text:00498682 004 pop ebp
  160. .text:00498683 000 retn 8
  161. .text:00498683 std__CreateString endp
  162. .text:00498683
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement