Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text:00498590 ; STD_String *__thiscall std::CreateString(STD_String *this, void *data, size_t Size)
- .text:00498590 std__CreateString proc near ; CODE XREF: sub_462150+53p
- .text:00498590 ; sub_462150+90p ...
- .text:00498590
- .text:00498590 data = dword ptr 8
- .text:00498590 Size = dword ptr 0Ch
- .text:00498590
- .text:00498590 000 push ebp
- .text:00498591 004 mov ebp, esp
- .text:00498593 004 push ebx
- .text:00498594 008 mov ebx, [ebp+data]
- .text:00498597 008 push esi
- .text:00498598 00C mov esi, ecx
- .text:0049859A 00C test ebx, ebx
- .text:0049859C 00C jz short loc_4985F5
- .text:0049859E 00C mov ecx, [esi+14h]
- .text:004985A1 00C cmp ecx, 10h
- .text:004985A4 00C jb short loc_4985AA
- .text:004985A6 00C mov eax, [esi]
- .text:004985A8 00C jmp short loc_4985AC
- .text:004985AA ; ---------------------------------------------------------------------------
- .text:004985AA
- .text:004985AA loc_4985AA: ; CODE XREF: std__CreateString+14j
- .text:004985AA 00C mov eax, esi
- .text:004985AC
- .text:004985AC loc_4985AC: ; CODE XREF: std__CreateString+18j
- .text:004985AC 00C cmp ebx, eax
- .text:004985AE 00C jb short loc_4985F5
- .text:004985B0 00C cmp ecx, 10h
- .text:004985B3 00C jb short loc_4985B9
- .text:004985B5 00C mov edx, [esi]
- .text:004985B7 00C jmp short loc_4985BB
- .text:004985B9 ; ---------------------------------------------------------------------------
- .text:004985B9
- .text:004985B9 loc_4985B9: ; CODE XREF: std__CreateString+23j
- .text:004985B9 00C mov edx, esi
- .text:004985BB
- .text:004985BB loc_4985BB: ; CODE XREF: std__CreateString+27j
- .text:004985BB 00C mov eax, [esi+10h]
- .text:004985BE 00C add eax, edx
- .text:004985C0 00C cmp eax, ebx
- .text:004985C2 00C jbe short loc_4985F5
- .text:004985C4 00C cmp ecx, 10h
- .text:004985C7 00C jb short loc_4985DF
- .text:004985C9 00C push [ebp+Size] ; size
- .text:004985CC 010 mov eax, [esi]
- .text:004985CE 010 mov ecx, esi ; this
- .text:004985D0 010 sub ebx, eax
- .text:004985D2 010 push ebx ; a3
- .text:004985D3 014 push esi ; a2
- .text:004985D4 018 call sub_498690
- .text:004985D9 00C pop esi
- .text:004985DA 008 pop ebx
- .text:004985DB 004 pop ebp
- .text:004985DC 000 retn 8
- .text:004985DF ; ---------------------------------------------------------------------------
- .text:004985DF
- .text:004985DF loc_4985DF: ; CODE XREF: std__CreateString+37j
- .text:004985DF 00C push [ebp+Size] ; size
- .text:004985E2 010 mov eax, esi
- .text:004985E4 010 mov ecx, esi ; this
- .text:004985E6 010 sub ebx, eax
- .text:004985E8 010 push ebx ; a3
- .text:004985E9 014 push esi ; a2
- .text:004985EA 018 call sub_498690
- .text:004985EF 00C pop esi
- .text:004985F0 008 pop ebx
- .text:004985F1 004 pop ebp
- .text:004985F2 000 retn 8
- .text:004985F5 ; ---------------------------------------------------------------------------
- .text:004985F5
- .text:004985F5 loc_4985F5: ; CODE XREF: std__CreateString+Cj
- .text:004985F5 ; std__CreateString+1Ej ...
- .text:004985F5 00C push edi
- .text:004985F6 010 mov edi, [ebp+Size]
- .text:004985F9 010 cmp edi, 0FFFFFFFEh
- .text:004985FC 010 jbe short loc_498609
- .text:004985FE 010 push offset aStringTooLong ; "string too long"
- .text:00498603 014 call ds:?_Xlength_error@std@@YAXPBD@Z ; std::_Xlength_error(char const *)
- .text:00498609
- .text:00498609 loc_498609: ; CODE XREF: std__CreateString+6Cj
- .text:00498609 010 cmp [esi+14h], edi
- .text:0049860C 010 jnb short loc_498627
- .text:0049860E 010 push dword ptr [esi+10h] ; Size
- .text:00498611 014 mov ecx, esi ; this
- .text:00498613 014 push edi ; a2
- .text:00498614 018 call sub_498DA0
- .text:00498619 010 test edi, edi
- .text:0049861B 010 jz short loc_49867D
- .text:0049861D
- .text:0049861D loc_49861D: ; CODE XREF: std__CreateString+99j
- .text:0049861D 010 cmp dword ptr [esi+14h], 10h
- .text:00498621 010 jb short loc_49864E
- .text:00498623 010 mov eax, [esi]
- .text:00498625 010 jmp short loc_498650
- .text:00498627 ; ---------------------------------------------------------------------------
- .text:00498627
- .text:00498627 loc_498627: ; CODE XREF: std__CreateString+7Cj
- .text:00498627 010 test edi, edi
- .text:00498629 010 jnz short loc_49861D
- .text:0049862B 010 cmp dword ptr [esi+14h], 10h
- .text:0049862F 010 mov [esi+10h], edi
- .text:00498632 010 jb short loc_498642
- .text:00498634 010 mov eax, [esi]
- .text:00498636 010 pop edi
- .text:00498637 00C mov byte ptr [eax], 0
- .text:0049863A 00C mov eax, esi
- .text:0049863C 00C pop esi
- .text:0049863D 008 pop ebx
- .text:0049863E 004 pop ebp
- .text:0049863F 000 retn 8
- .text:00498642 ; ---------------------------------------------------------------------------
- .text:00498642
- .text:00498642 loc_498642: ; CODE XREF: std__CreateString+A2j
- .text:00498642 010 mov eax, esi
- .text:00498644 010 pop edi
- .text:00498645 00C pop esi
- .text:00498646 008 pop ebx
- .text:00498647 004 mov byte ptr [eax], 0
- .text:0049864A 004 pop ebp
- .text:0049864B 000 retn 8
- .text:0049864E ; ---------------------------------------------------------------------------
- .text:0049864E
- .text:0049864E loc_49864E: ; CODE XREF: std__CreateString+91j
- .text:0049864E 010 mov eax, esi
- .text:00498650
- .text:00498650 loc_498650: ; CODE XREF: std__CreateString+95j
- .text:00498650 010 test edi, edi
- .text:00498652 010 jz short loc_49865F
- .text:00498654 010 push edi ; Size
- .text:00498655 014 push ebx ; Src
- .text:00498656 018 push eax ; Dst
- .text:00498657 01C call memcpy
- .text:0049865C 01C add esp, 0Ch
- .text:0049865F
- .text:0049865F loc_49865F: ; CODE XREF: std__CreateString+C2j
- .text:0049865F 010 cmp dword ptr [esi+14h], 10h
- .text:00498663 010 mov [esi+10h], edi
- .text:00498666 010 jb short loc_498677
- .text:00498668 010 mov eax, [esi]
- .text:0049866A 010 mov byte ptr [eax+edi], 0
- .text:0049866E 010 mov eax, esi
- .text:00498670 010 pop edi
- .text:00498671 00C pop esi
- .text:00498672 008 pop ebx
- .text:00498673 004 pop ebp
- .text:00498674 000 retn 8
- .text:00498677 ; ---------------------------------------------------------------------------
- .text:00498677
- .text:00498677 loc_498677: ; CODE XREF: std__CreateString+D6j
- .text:00498677 010 mov eax, esi
- .text:00498679 010 mov byte ptr [eax+edi], 0
- .text:0049867D
- .text:0049867D loc_49867D: ; CODE XREF: std__CreateString+8Bj
- .text:0049867D 010 pop edi
- .text:0049867E 00C mov eax, esi
- .text:00498680 00C pop esi
- .text:00498681 008 pop ebx
- .text:00498682 004 pop ebp
- .text:00498683 000 retn 8
- .text:00498683 std__CreateString endp
- .text:00498683
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement