SmsCenter/Release_Unicode/CBase64Coding.cod
2025-01-03 16:47:25 +08:00

7032 lines
234 KiB
Plaintext
Raw Blame History

; Listing generated by Microsoft (R) Optimizing Compiler Version 19.34.31933.0
TITLE D:\Works\Corpsms_2010\SmsCenter\Release_Unicode\CBase64Coding.obj
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
PUBLIC ?__empty_global_delete@@YAXPAX@Z ; __empty_global_delete
PUBLIC ?__empty_global_delete@@YAXPAXI@Z ; __empty_global_delete
PUBLIC ?__empty_global_delete@@YAXPAXW4align_val_t@std@@@Z ; __empty_global_delete
PUBLIC ?__empty_global_delete@@YAXPAXIW4align_val_t@std@@@Z ; __empty_global_delete
PUBLIC ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
PUBLIC ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
PUBLIC ?IsShared@CStringData@ATL@@QBE_NXZ ; ATL::CStringData::IsShared
PUBLIC ?Release@CStringData@ATL@@QAEXXZ ; ATL::CStringData::Release
PUBLIC ?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z ; ATL::CSimpleStringT<wchar_t,0>::GetBuffer
PUBLIC ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
PUBLIC ?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z ; ATL::CSimpleStringT<wchar_t,0>::StringLengthN
PUBLIC ?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<wchar_t,0>::ThrowMemoryException
PUBLIC ?Attach@?$CSimpleStringT@_W$0A@@ATL@@AAEXPAUCStringData@2@@Z ; ATL::CSimpleStringT<wchar_t,0>::Attach
PUBLIC ?Fork@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::Fork
PUBLIC ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
PUBLIC ?PrepareWrite@?$CSimpleStringT@_W$0A@@ATL@@AAEPA_WH@Z ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite
PUBLIC ?PrepareWrite2@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite2
PUBLIC ?Reallocate@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::Reallocate
PUBLIC ?SetLength@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::SetLength
PUBLIC ?GetSize@CByteArray@@QBEHXZ ; CByteArray::GetSize
PUBLIC ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
PUBLIC ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
PUBLIC ?GetData@CByteArray@@QBEPBEXZ ; CByteArray::GetData
PUBLIC ??B?$CSimpleStringT@D$0A@@ATL@@QBEPBDXZ ; ATL::CSimpleStringT<char,0>::operator char const *
PUBLIC ?GetBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEPADH@Z ; ATL::CSimpleStringT<char,0>::GetBuffer
PUBLIC ?GetLength@?$CSimpleStringT@D$0A@@ATL@@QBEHXZ ; ATL::CSimpleStringT<char,0>::GetLength
PUBLIC ?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<char,0>::ReleaseBuffer
PUBLIC ?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z ; ATL::CSimpleStringT<char,0>::StringLengthN
PUBLIC ?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<char,0>::ThrowMemoryException
PUBLIC ?Attach@?$CSimpleStringT@D$0A@@ATL@@AAEXPAUCStringData@2@@Z ; ATL::CSimpleStringT<char,0>::Attach
PUBLIC ?Fork@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::Fork
PUBLIC ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
PUBLIC ?PrepareWrite@?$CSimpleStringT@D$0A@@ATL@@AAEPADH@Z ; ATL::CSimpleStringT<char,0>::PrepareWrite
PUBLIC ?PrepareWrite2@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::PrepareWrite2
PUBLIC ?Reallocate@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::Reallocate
PUBLIC ?SetLength@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::SetLength
PUBLIC ?m_InitializeDecoderTable@CBase64Coding@@MAEXXZ ; CBase64Coding::m_InitializeDecoderTable
PUBLIC ??0CBase64Coding@@QAE@XZ ; CBase64Coding::CBase64Coding
PUBLIC ??1CBase64Coding@@UAE@XZ ; CBase64Coding::~CBase64Coding
PUBLIC ?Decode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z ; CBase64Coding::Decode
PUBLIC ?Decode@CBase64Coding@@UAEHABV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@AAVCByteArray@@@Z ; CBase64Coding::Decode
PUBLIC ?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z ; CBase64Coding::Encode
PUBLIC ?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ; CBase64Coding::Encode
PUBLIC ?Encode@CBase64Coding@@UAEHPAEJAAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ; CBase64Coding::Encode
PUBLIC ?EncodeA@CBase64Coding@@UAEHPAEJAAV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z ; CBase64Coding::EncodeA
PUBLIC ?Encode2@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ; CBase64Coding::Encode2
PUBLIC ??_GCBase64Coding@@UAEPAXI@Z ; CBase64Coding::`scalar deleting destructor'
PUBLIC ??_7CBase64Coding@@6B@ ; CBase64Coding::`vftable'
PUBLIC ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@ ; `string'
PUBLIC ??_R4CBase64Coding@@6B@ ; CBase64Coding::`RTTI Complete Object Locator'
PUBLIC ??_R0?AVCBase64Coding@@@8 ; CBase64Coding `RTTI Type Descriptor'
PUBLIC ??_R3CBase64Coding@@8 ; CBase64Coding::`RTTI Class Hierarchy Descriptor'
PUBLIC ??_R2CBase64Coding@@8 ; CBase64Coding::`RTTI Base Class Array'
PUBLIC ??_R1A@?0A@EA@CBase64Coding@@8 ; CBase64Coding::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC __real@3fe8000000000000
EXTRN ??3@YAXPAXI@Z:PROC ; operator delete
EXTRN __invalid_parameter_noinfo:PROC
EXTRN __errno:PROC
EXTRN _memcpy:PROC
EXTRN _memset:PROC
EXTRN _wcsnlen:PROC
EXTRN _strnlen:PROC
EXTRN ?AfxThrowMemoryException@@YGXXZ:PROC ; AfxThrowMemoryException
EXTRN ?AfxThrowInvalidArgException@@YGXXZ:PROC ; AfxThrowInvalidArgException
EXTRN ?AfxThrowOleException@@YGXJ@Z:PROC ; AfxThrowOleException
EXTRN ?SetSize@CByteArray@@QAEXHH@Z:PROC ; CByteArray::SetSize
EXTRN ??_ECBase64Coding@@UAEPAXI@Z:PROC ; CBase64Coding::`vector deleting destructor'
EXTRN @__security_check_cookie@4:PROC
EXTRN ___CxxFrameHandler3:PROC
EXTRN __dtol3:PROC
EXTRN ??_7type_info@@6B@:QWORD ; type_info::`vftable'
EXTRN ___security_cookie:DWORD
EXTRN __fltused:DWORD
; COMDAT __real@3fe8000000000000
CONST SEGMENT
__real@3fe8000000000000 DQ 03fe8000000000000r ; 0.75
CONST ENDS
; COMDAT ??_R1A@?0A@EA@CBase64Coding@@8
rdata$r SEGMENT
??_R1A@?0A@EA@CBase64Coding@@8 DD FLAT:??_R0?AVCBase64Coding@@@8 ; CBase64Coding::`RTTI Base Class Descriptor at (0,-1,0,64)'
DD 00H
DD 00H
DD 0ffffffffH
DD 00H
DD 040H
DD FLAT:??_R3CBase64Coding@@8
rdata$r ENDS
; COMDAT ??_R2CBase64Coding@@8
rdata$r SEGMENT
??_R2CBase64Coding@@8 DD FLAT:??_R1A@?0A@EA@CBase64Coding@@8 ; CBase64Coding::`RTTI Base Class Array'
rdata$r ENDS
; COMDAT ??_R3CBase64Coding@@8
rdata$r SEGMENT
??_R3CBase64Coding@@8 DD 00H ; CBase64Coding::`RTTI Class Hierarchy Descriptor'
DD 00H
DD 01H
DD FLAT:??_R2CBase64Coding@@8
rdata$r ENDS
; COMDAT ??_R0?AVCBase64Coding@@@8
data$rs SEGMENT
??_R0?AVCBase64Coding@@@8 DD FLAT:??_7type_info@@6B@ ; CBase64Coding `RTTI Type Descriptor'
DD 00H
DB '.?AVCBase64Coding@@', 00H
data$rs ENDS
; COMDAT ??_R4CBase64Coding@@6B@
rdata$r SEGMENT
??_R4CBase64Coding@@6B@ DD 00H ; CBase64Coding::`RTTI Complete Object Locator'
DD 00H
DD 00H
DD FLAT:??_R0?AVCBase64Coding@@@8
DD FLAT:??_R3CBase64Coding@@8
rdata$r ENDS
; COMDAT ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@
CONST SEGMENT
??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@ DB 'ABCDEFGHIJKLMNOPQ'
DB 'RSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', 00H ; `string'
CONST ENDS
; COMDAT ??_7CBase64Coding@@6B@
CONST SEGMENT
??_7CBase64Coding@@6B@ DD FLAT:??_R4CBase64Coding@@6B@ ; CBase64Coding::`vftable'
DD FLAT:?m_InitializeDecoderTable@CBase64Coding@@MAEXXZ
DD FLAT:??_ECBase64Coding@@UAEPAXI@Z
DD FLAT:?Decode@CBase64Coding@@UAEHABV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@AAVCByteArray@@@Z
DD FLAT:?Decode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z
DD FLAT:?Encode@CBase64Coding@@UAEHPAEJAAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z
DD FLAT:?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z
DD FLAT:?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z
DD FLAT:?EncodeA@CBase64Coding@@UAEHPAEJAAV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z
DD FLAT:?Encode2@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z
CONST ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW 010H
DW 02ccH
voltbl ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW 010H
DW 0292H
voltbl ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW 010H
DW 02cfH
voltbl ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW 010H
DW 0319H
voltbl ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DW 010H
DW 02dfH
voltbl ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DB 09H
voltbl ENDS
; COMDAT xdata$x
xdata$x SEGMENT
__ehfuncinfo$?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z DD 019930522H
DD 00H
DD 00H
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 04H
xdata$x ENDS
; COMDAT voltbl
voltbl SEGMENT
_volmd DB 09H
voltbl ENDS
; COMDAT xdata$x
xdata$x SEGMENT
__ehfuncinfo$?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z DD 019930522H
DD 00H
DD 00H
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 04H
xdata$x ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?__get_character@@YAEPBE0AAHH@Z
_TEXT SEGMENT
_return_value$ = -1 ; size = 1
_buffer$ = 8 ; size = 4
_decoder_table$ = 12 ; size = 4
_index$ = 16 ; size = 4
_size_of_buffer$ = 20 ; size = 4
?__get_character@@YAEPBE0AAHH@Z PROC ; __get_character, COMDAT
; 41 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
; 42 : BYTE return_value = 0;
00009 c6 45 ff 00 mov BYTE PTR _return_value$[ebp], 0
$LN4@get_charac:
; 43 :
; 44 : do
; 45 : {
; 46 : if ( index >= size_of_buffer )
0000d 8b 45 10 mov eax, DWORD PTR _index$[ebp]
00010 8b 08 mov ecx, DWORD PTR [eax]
00012 3b 4d 14 cmp ecx, DWORD PTR _size_of_buffer$[ebp]
00015 7c 04 jl SHORT $LN5@get_charac
; 47 : {
; 48 : return( BASE64_END_OF_BUFFER );
00017 b0 fd mov al, 253 ; 000000fdH
00019 eb 3a jmp SHORT $LN1@get_charac
$LN5@get_charac:
; 49 : }
; 50 :
; 51 : return_value = buffer[ index ];
0001b 8b 45 10 mov eax, DWORD PTR _index$[ebp]
0001e 8b 08 mov ecx, DWORD PTR [eax]
00020 8b 55 08 mov edx, DWORD PTR _buffer$[ebp]
00023 8a 04 0a mov al, BYTE PTR [edx+ecx]
00026 88 45 ff mov BYTE PTR _return_value$[ebp], al
; 52 : index++;
00029 8b 45 10 mov eax, DWORD PTR _index$[ebp]
0002c 8b 08 mov ecx, DWORD PTR [eax]
0002e 83 c1 01 add ecx, 1
00031 8b 55 10 mov edx, DWORD PTR _index$[ebp]
00034 89 0a mov DWORD PTR [edx], ecx
; 53 : }
; 54 : while( return_value != END_OF_BASE64_ENCODED_DATA &&
00036 0f b6 45 ff movzx eax, BYTE PTR _return_value$[ebp]
0003a 83 f8 3d cmp eax, 61 ; 0000003dH
0003d 74 13 je SHORT $LN3@get_charac
0003f 0f b6 45 ff movzx eax, BYTE PTR _return_value$[ebp]
00043 8b 4d 0c mov ecx, DWORD PTR _decoder_table$[ebp]
00046 0f b6 14 01 movzx edx, BYTE PTR [ecx+eax]
0004a 81 fa fe 00 00
00 cmp edx, 254 ; 000000feH
00050 74 bb je SHORT $LN4@get_charac
$LN3@get_charac:
; 55 : decoder_table[ return_value ] == BASE64_IGNORABLE_CHARACTER );
; 56 :
; 57 : return( return_value );
00052 8a 45 ff mov al, BYTE PTR _return_value$[ebp]
$LN1@get_charac:
; 58 : }
00055 5f pop edi
00056 5e pop esi
00057 5b pop ebx
00058 8b e5 mov esp, ebp
0005a 5d pop ebp
0005b c3 ret 0
?__get_character@@YAEPBE0AAHH@Z ENDP ; __get_character
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; COMDAT ??_GCBase64Coding@@UAEPAXI@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
___flags$ = 8 ; size = 4
??_GCBase64Coding@@UAEPAXI@Z PROC ; CBase64Coding::`scalar deleting destructor', COMDAT
; _this$ = ecx
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ??1CBase64Coding@@UAE@XZ ; CBase64Coding::~CBase64Coding
00014 8b 45 08 mov eax, DWORD PTR ___flags$[ebp]
00017 83 e0 01 and eax, 1
0001a 74 11 je SHORT $LN2@scalar
0001c 68 04 01 00 00 push 260 ; 00000104H
00021 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00024 50 push eax
00025 e8 00 00 00 00 call ??3@YAXPAXI@Z ; operator delete
0002a 83 c4 08 add esp, 8
$LN2@scalar:
0002d 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00030 5f pop edi
00031 5e pop esi
00032 5b pop ebx
00033 8b e5 mov esp, ebp
00035 5d pop ebp
00036 c2 04 00 ret 4
??_GCBase64Coding@@UAEPAXI@Z ENDP ; CBase64Coding::`scalar deleting destructor'
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?Encode2@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z
_TEXT SEGMENT
_destination$ = -100 ; size = 4
_number_of_bytes_encoded$ = -96 ; size = 4
_input_buffer$ = -92 ; size = 4
_byte_3$ = -88 ; size = 1
_byte_2$ = -87 ; size = 1
_byte_1$ = -86 ; size = 1
_byte_to_add$ = -85 ; size = 1
_number_of_bytes_to_encode$ = -84 ; size = 4
_loop_index$ = -80 ; size = 4
_alphabet$ = -76 ; size = 65
_this$ = -8 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_source$ = 8 ; size = 4
_destination_string$ = 12 ; size = 4
?Encode2@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z PROC ; CBase64Coding::Encode2, COMDAT
; _this$ = ecx
; 980 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 81 ec a4 00 00
00 sub esp, 164 ; 000000a4H
00009 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0000e 33 c5 xor eax, ebp
00010 89 45 fc mov DWORD PTR __$ArrayPad$[ebp], eax
00013 53 push ebx
00014 56 push esi
00015 57 push edi
00016 89 4d f8 mov DWORD PTR _this$[ebp], ecx
; 981 :
; 982 : const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00019 b9 10 00 00 00 mov ecx, 16 ; 00000010H
0001e be 00 00 00 00 mov esi, OFFSET ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@
00023 8d 7d b4 lea edi, DWORD PTR _alphabet$[ebp]
00026 f3 a5 rep movsd
00028 a4 movsb
; 983 :
; 984 : int loop_index = 0;
00029 c7 45 b0 00 00
00 00 mov DWORD PTR _loop_index$[ebp], 0
; 985 : int number_of_bytes_to_encode = (int)source.GetSize();
00030 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00033 e8 00 00 00 00 call ?GetSize@CByteArray@@QBEHXZ ; CByteArray::GetSize
00038 89 45 ac mov DWORD PTR _number_of_bytes_to_encode$[ebp], eax
; 986 :
; 987 : BYTE byte_to_add = 0;
0003b c6 45 ab 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 988 : BYTE byte_1 = 0;
0003f c6 45 aa 00 mov BYTE PTR _byte_1$[ebp], 0
; 989 : BYTE byte_2 = 0;
00043 c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 990 : BYTE byte_3 = 0;
00047 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 991 :
; 992 : const BYTE * input_buffer = source.GetData();
0004b 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
0004e e8 00 00 00 00 call ?GetData@CByteArray@@QBEPBEXZ ; CByteArray::GetData
00053 89 45 a4 mov DWORD PTR _input_buffer$[ebp], eax
; 993 :
; 994 : DWORD number_of_bytes_encoded = (DWORD) ( (double) number_of_bytes_to_encode / (double) 0.75 ) + 1;
00056 f2 0f 2a 45 ac cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_encode$[ebp]
0005b f2 0f 5e 05 00
00 00 00 divsd xmm0, QWORD PTR __real@3fe8000000000000
00063 e8 00 00 00 00 call __dtol3
00068 83 c0 01 add eax, 1
0006b 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 995 :
; 996 : // Now add in the CR/LF pairs, each line is truncated at 72 characters
; 997 :
; 998 : // 2000-05-12
; 999 : // Thanks go to Ilia Golubev (ilia@varicom.co.il) for finding a bug here.
; 1000 : // I was using number_of_bytes_to_encode rather than number_of_bytes_encoded.
; 1001 :
; 1002 : number_of_bytes_encoded+=2;
0006e 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00071 83 c0 02 add eax, 2
00074 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1003 : // number_of_bytes_encoded += (DWORD)( ( ( number_of_bytes_encoded / BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) + 1 ) * 2 );
; 1004 :
; 1005 : LPTSTR destination = destination_string.GetBuffer( number_of_bytes_encoded );
00077 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0007a 50 push eax
0007b 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
0007e e8 00 00 00 00 call ?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z ; ATL::CSimpleStringT<wchar_t,0>::GetBuffer
00083 89 45 9c mov DWORD PTR _destination$[ebp], eax
; 1006 :
; 1007 : number_of_bytes_encoded = 0;
00086 c7 45 a0 00 00
00 00 mov DWORD PTR _number_of_bytes_encoded$[ebp], 0
$LN2@Encode2:
; 1008 :
; 1009 : while( loop_index < number_of_bytes_to_encode )
0008d 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00090 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
00093 0f 8d 05 02 00
00 jge $LN3@Encode2
; 1010 : {
; 1011 : // Output the first byte
; 1012 :
; 1013 : byte_1 = input_buffer[ loop_index ];
00099 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0009c 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
0009f 8a 08 mov cl, BYTE PTR [eax]
000a1 88 4d aa mov BYTE PTR _byte_1$[ebp], cl
; 1014 : byte_to_add = alphabet[ ( byte_1 >> 2 ) ];
000a4 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000a8 c1 f8 02 sar eax, 2
000ab 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
000af 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 1015 :
; 1016 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
000b2 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
000b7 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
000ba 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
000bd 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1017 : number_of_bytes_encoded++;
000c1 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
000c4 83 c0 01 add eax, 1
000c7 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1018 :
; 1019 : loop_index++;
000ca 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000cd 83 c0 01 add eax, 1
000d0 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 1020 :
; 1021 : if ( loop_index >= number_of_bytes_to_encode )
000d3 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000d6 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
000d9 0f 8c 86 00 00
00 jl $LN4@Encode2
; 1022 : {
; 1023 : // We're at the end of the data to encode
; 1024 :
; 1025 : byte_2 = 0;
000df c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 1026 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
000e3 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000e7 83 e0 03 and eax, 3
000ea c1 e0 04 shl eax, 4
000ed 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
000f1 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
000f7 c1 f9 04 sar ecx, 4
000fa 0b c1 or eax, ecx
000fc 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00100 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 1027 :
; 1028 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00103 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00108 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0010b 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0010e 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1029 : number_of_bytes_encoded++;
00112 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00115 83 c0 01 add eax, 1
00118 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1030 :
; 1031 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
0011b b8 3d 00 00 00 mov eax, 61 ; 0000003dH
00120 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00123 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00126 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1032 : number_of_bytes_encoded++;
0012a 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0012d 83 c0 01 add eax, 1
00130 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1033 :
; 1034 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
00133 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
00138 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0013b 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0013e 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1035 :
; 1036 : // 1999-09-01
; 1037 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 1038 : // We must NULL terminate the string before letting CString have the buffer back.
; 1039 :
; 1040 : destination[ number_of_bytes_encoded + 1 ] = 0;
00142 33 c0 xor eax, eax
00144 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00147 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0014a 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 1041 :
; 1042 : destination_string.ReleaseBuffer( -1 );
0014f 6a ff push -1
00151 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
00154 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 1043 :
; 1044 : return( TRUE );
00159 b8 01 00 00 00 mov eax, 1
0015e e9 66 01 00 00 jmp $LN1@Encode2
; 1045 : }
00163 eb 0b jmp SHORT $LN5@Encode2
$LN4@Encode2:
; 1046 : else
; 1047 : {
; 1048 : byte_2 = input_buffer[ loop_index ];
00165 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
00168 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
0016b 8a 08 mov cl, BYTE PTR [eax]
0016d 88 4d a9 mov BYTE PTR _byte_2$[ebp], cl
$LN5@Encode2:
; 1049 : }
; 1050 :
; 1051 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
00170 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
00174 83 e0 03 and eax, 3
00177 c1 e0 04 shl eax, 4
0017a 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
0017e 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
00184 c1 f9 04 sar ecx, 4
00187 0b c1 or eax, ecx
00189 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0018d 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 1052 :
; 1053 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00190 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00195 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00198 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0019b 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1054 : number_of_bytes_encoded++;
0019f 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001a2 83 c0 01 add eax, 1
001a5 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1055 :
; 1056 : loop_index++;
001a8 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
001ab 83 c0 01 add eax, 1
001ae 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 1057 :
; 1058 : if ( loop_index >= number_of_bytes_to_encode )
001b1 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
001b4 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
001b7 7c 6e jl SHORT $LN6@Encode2
; 1059 : {
; 1060 : // We ran out of bytes, we need to add the last half of byte_2 and pad
; 1061 : byte_3 = 0;
001b9 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 1062 :
; 1063 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
001bd 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
001c1 83 e0 0f and eax, 15 ; 0000000fH
001c4 c1 e0 02 shl eax, 2
001c7 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
001cb 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
001d1 c1 f9 06 sar ecx, 6
001d4 0b c1 or eax, ecx
001d6 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
001da 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 1064 :
; 1065 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
001dd 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
001e2 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
001e5 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
001e8 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1066 : number_of_bytes_encoded++;
001ec 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001ef 83 c0 01 add eax, 1
001f2 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1067 :
; 1068 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
001f5 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
001fa 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
001fd 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00200 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1069 :
; 1070 : // 1999-09-01
; 1071 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 1072 : // We must NULL terminate the string before letting CString have the buffer back.
; 1073 :
; 1074 : destination[ number_of_bytes_encoded + 1 ] = 0;
00204 33 c0 xor eax, eax
00206 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00209 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0020c 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 1075 :
; 1076 : destination_string.ReleaseBuffer( -1 );
00211 6a ff push -1
00213 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
00216 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 1077 :
; 1078 : return( TRUE );
0021b b8 01 00 00 00 mov eax, 1
00220 e9 a4 00 00 00 jmp $LN1@Encode2
; 1079 : }
00225 eb 0b jmp SHORT $LN7@Encode2
$LN6@Encode2:
; 1080 : else
; 1081 : {
; 1082 : byte_3 = input_buffer[ loop_index ];
00227 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0022a 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
0022d 8a 08 mov cl, BYTE PTR [eax]
0022f 88 4d a8 mov BYTE PTR _byte_3$[ebp], cl
$LN7@Encode2:
; 1083 : }
; 1084 :
; 1085 : loop_index++;
00232 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00235 83 c0 01 add eax, 1
00238 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 1086 :
; 1087 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
0023b 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
0023f 83 e0 0f and eax, 15 ; 0000000fH
00242 c1 e0 02 shl eax, 2
00245 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
00249 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
0024f c1 f9 06 sar ecx, 6
00252 0b c1 or eax, ecx
00254 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00258 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 1088 :
; 1089 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
0025b 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00260 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00263 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00266 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1090 : number_of_bytes_encoded++;
0026a 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0026d 83 c0 01 add eax, 1
00270 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1091 :
; 1092 : byte_to_add = alphabet[ ( byte_3 & 0x3F ) ];
00273 0f b6 45 a8 movzx eax, BYTE PTR _byte_3$[ebp]
00277 83 e0 3f and eax, 63 ; 0000003fH
0027a 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
0027e 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 1093 :
; 1094 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00281 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00286 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00289 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0028c 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1095 : number_of_bytes_encoded++;
00290 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00293 83 c0 01 add eax, 1
00296 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 1096 :
; 1097 : // if ( ( number_of_bytes_encoded % BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) == 0 )
; 1098 : // {
; 1099 : // destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( CARRIAGE_RETURN );
; 1100 : // number_of_bytes_encoded++;
; 1101 : //
; 1102 : // destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( LINE_FEED );
; 1103 : // number_of_bytes_encoded++;
; 1104 : // }
; 1105 : }
00299 e9 ef fd ff ff jmp $LN2@Encode2
$LN3@Encode2:
; 1106 :
; 1107 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
0029e b8 3d 00 00 00 mov eax, 61 ; 0000003dH
002a3 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002a6 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002a9 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 1108 :
; 1109 : // 1999-09-01
; 1110 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 1111 : // We must NULL terminate the string before letting CString have the buffer back.
; 1112 :
; 1113 : destination[ number_of_bytes_encoded + 1 ] = 0;
002ad 33 c0 xor eax, eax
002af 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002b2 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002b5 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 1114 :
; 1115 : destination_string.ReleaseBuffer( -1 );
002ba 6a ff push -1
002bc 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
002bf e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 1116 :
; 1117 : return( TRUE );
002c4 b8 01 00 00 00 mov eax, 1
$LN1@Encode2:
; 1118 : }
002c9 5f pop edi
002ca 5e pop esi
002cb 5b pop ebx
002cc 8b 4d fc mov ecx, DWORD PTR __$ArrayPad$[ebp]
002cf 33 cd xor ecx, ebp
002d1 e8 00 00 00 00 call @__security_check_cookie@4
002d6 8b e5 mov esp, ebp
002d8 5d pop ebp
002d9 c2 08 00 ret 8
?Encode2@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ENDP ; CBase64Coding::Encode2
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?EncodeA@CBase64Coding@@UAEHPAEJAAV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z
_TEXT SEGMENT
_destination$ = -100 ; size = 4
_number_of_bytes_encoded$ = -96 ; size = 4
_input_buffer$ = -92 ; size = 4
_byte_3$ = -88 ; size = 1
_byte_2$ = -87 ; size = 1
_byte_1$ = -86 ; size = 1
_byte_to_add$ = -85 ; size = 1
_number_of_bytes_to_encode$ = -84 ; size = 4
_loop_index$ = -80 ; size = 4
_alphabet$ = -76 ; size = 65
_this$ = -8 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_pSource$ = 8 ; size = 4
_lSource$ = 12 ; size = 4
_destination_string$ = 16 ; size = 4
?EncodeA@CBase64Coding@@UAEHPAEJAAV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z PROC ; CBase64Coding::EncodeA, COMDAT
; _this$ = ecx
; 837 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 81 ec a4 00 00
00 sub esp, 164 ; 000000a4H
00009 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0000e 33 c5 xor eax, ebp
00010 89 45 fc mov DWORD PTR __$ArrayPad$[ebp], eax
00013 53 push ebx
00014 56 push esi
00015 57 push edi
00016 89 4d f8 mov DWORD PTR _this$[ebp], ecx
; 838 :
; 839 : const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00019 b9 10 00 00 00 mov ecx, 16 ; 00000010H
0001e be 00 00 00 00 mov esi, OFFSET ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@
00023 8d 7d b4 lea edi, DWORD PTR _alphabet$[ebp]
00026 f3 a5 rep movsd
00028 a4 movsb
; 840 :
; 841 : int loop_index = 0;
00029 c7 45 b0 00 00
00 00 mov DWORD PTR _loop_index$[ebp], 0
; 842 : int number_of_bytes_to_encode = lSource;
00030 8b 45 0c mov eax, DWORD PTR _lSource$[ebp]
00033 89 45 ac mov DWORD PTR _number_of_bytes_to_encode$[ebp], eax
; 843 :
; 844 : BYTE byte_to_add = 0;
00036 c6 45 ab 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 845 : BYTE byte_1 = 0;
0003a c6 45 aa 00 mov BYTE PTR _byte_1$[ebp], 0
; 846 : BYTE byte_2 = 0;
0003e c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 847 : BYTE byte_3 = 0;
00042 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 848 :
; 849 : const BYTE * input_buffer = pSource;
00046 8b 45 08 mov eax, DWORD PTR _pSource$[ebp]
00049 89 45 a4 mov DWORD PTR _input_buffer$[ebp], eax
; 850 :
; 851 : DWORD number_of_bytes_encoded = (DWORD) ( (double) number_of_bytes_to_encode / (double) 0.75 ) + 1;
0004c f2 0f 2a 45 ac cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_encode$[ebp]
00051 f2 0f 5e 05 00
00 00 00 divsd xmm0, QWORD PTR __real@3fe8000000000000
00059 e8 00 00 00 00 call __dtol3
0005e 83 c0 01 add eax, 1
00061 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 852 :
; 853 : // Now add in the CR/LF pairs, each line is truncated at 72 characters
; 854 :
; 855 : // 2000-05-12
; 856 : // Thanks go to Ilia Golubev (ilia@varicom.co.il) for finding a bug here.
; 857 : // I was using number_of_bytes_to_encode rather than number_of_bytes_encoded.
; 858 :
; 859 : number_of_bytes_encoded += (DWORD)( ( ( number_of_bytes_encoded / BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) + 1 ) * 2 );
00064 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00067 33 d2 xor edx, edx
00069 b9 48 00 00 00 mov ecx, 72 ; 00000048H
0006e f7 f1 div ecx
00070 8b 55 a0 mov edx, DWORD PTR _number_of_bytes_encoded$[ebp]
00073 8d 44 42 02 lea eax, DWORD PTR [edx+eax*2+2]
00077 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 860 :
; 861 : char * destination = destination_string.GetBuffer( number_of_bytes_encoded );
0007a 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0007d 50 push eax
0007e 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
00081 e8 00 00 00 00 call ?GetBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEPADH@Z ; ATL::CSimpleStringT<char,0>::GetBuffer
00086 89 45 9c mov DWORD PTR _destination$[ebp], eax
; 862 :
; 863 : number_of_bytes_encoded = 0;
00089 c7 45 a0 00 00
00 00 mov DWORD PTR _number_of_bytes_encoded$[ebp], 0
$LN2@EncodeA:
; 864 :
; 865 : while( loop_index < number_of_bytes_to_encode )
00090 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00093 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
00096 0f 8d d1 01 00
00 jge $LN3@EncodeA
; 866 : {
; 867 : // Output the first byte
; 868 :
; 869 : byte_1 = input_buffer[ loop_index ];
0009c 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0009f 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
000a2 8a 08 mov cl, BYTE PTR [eax]
000a4 88 4d aa mov BYTE PTR _byte_1$[ebp], cl
; 870 : byte_to_add = alphabet[ ( byte_1 >> 2 ) ];
000a7 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000ab c1 f8 02 sar eax, 2
000ae 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
000b2 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 871 :
; 872 : destination[ number_of_bytes_encoded ] = static_cast< char >( byte_to_add );
000b5 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
000b8 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
000bb 8a 4d ab mov cl, BYTE PTR _byte_to_add$[ebp]
000be 88 08 mov BYTE PTR [eax], cl
; 873 : number_of_bytes_encoded++;
000c0 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
000c3 83 c0 01 add eax, 1
000c6 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 874 :
; 875 : loop_index++;
000c9 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000cc 83 c0 01 add eax, 1
000cf 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 876 :
; 877 : if ( loop_index >= number_of_bytes_to_encode )
000d2 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000d5 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
000d8 7c 73 jl SHORT $LN4@EncodeA
; 878 : {
; 879 : // We're at the end of the data to encode
; 880 :
; 881 : byte_2 = 0;
000da c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 882 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
000de 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000e2 83 e0 03 and eax, 3
000e5 c1 e0 04 shl eax, 4
000e8 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
000ec 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
000f2 c1 f9 04 sar ecx, 4
000f5 0b c1 or eax, ecx
000f7 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
000fb 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 883 :
; 884 : destination[ number_of_bytes_encoded ] = static_cast< char >( byte_to_add );
000fe 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00101 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00104 8a 4d ab mov cl, BYTE PTR _byte_to_add$[ebp]
00107 88 08 mov BYTE PTR [eax], cl
; 885 : number_of_bytes_encoded++;
00109 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0010c 83 c0 01 add eax, 1
0010f 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 886 :
; 887 : destination[ number_of_bytes_encoded ] = static_cast< char >( END_OF_BASE64_ENCODED_DATA );
00112 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00115 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00118 c6 00 3d mov BYTE PTR [eax], 61 ; 0000003dH
; 888 : number_of_bytes_encoded++;
0011b 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0011e 83 c0 01 add eax, 1
00121 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 889 :
; 890 : destination[ number_of_bytes_encoded ] = static_cast< char >( END_OF_BASE64_ENCODED_DATA );
00124 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00127 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0012a c6 00 3d mov BYTE PTR [eax], 61 ; 0000003dH
; 891 :
; 892 : // 1999-09-01
; 893 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 894 : // We must NULL terminate the string before letting CString have the buffer back.
; 895 :
; 896 : destination[ number_of_bytes_encoded + 1 ] = 0;
0012d 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00130 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00133 c6 40 01 00 mov BYTE PTR [eax+1], 0
; 897 :
; 898 : destination_string.ReleaseBuffer( -1 );
00137 6a ff push -1
00139 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
0013c e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<char,0>::ReleaseBuffer
; 899 :
; 900 : return( TRUE );
00141 b8 01 00 00 00 mov eax, 1
00146 e9 44 01 00 00 jmp $LN1@EncodeA
; 901 : }
0014b eb 0b jmp SHORT $LN5@EncodeA
$LN4@EncodeA:
; 902 : else
; 903 : {
; 904 : byte_2 = input_buffer[ loop_index ];
0014d 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
00150 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
00153 8a 08 mov cl, BYTE PTR [eax]
00155 88 4d a9 mov BYTE PTR _byte_2$[ebp], cl
$LN5@EncodeA:
; 905 : }
; 906 :
; 907 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
00158 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
0015c 83 e0 03 and eax, 3
0015f c1 e0 04 shl eax, 4
00162 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
00166 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
0016c c1 f9 04 sar ecx, 4
0016f 0b c1 or eax, ecx
00171 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00175 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 908 :
; 909 : destination[ number_of_bytes_encoded ] = static_cast< char >( byte_to_add );
00178 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
0017b 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0017e 8a 4d ab mov cl, BYTE PTR _byte_to_add$[ebp]
00181 88 08 mov BYTE PTR [eax], cl
; 910 : number_of_bytes_encoded++;
00183 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00186 83 c0 01 add eax, 1
00189 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 911 :
; 912 : loop_index++;
0018c 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
0018f 83 c0 01 add eax, 1
00192 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 913 :
; 914 : if ( loop_index >= number_of_bytes_to_encode )
00195 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00198 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
0019b 7c 61 jl SHORT $LN6@EncodeA
; 915 : {
; 916 : // We ran out of bytes, we need to add the last half of byte_2 and pad
; 917 : byte_3 = 0;
0019d c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 918 :
; 919 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
001a1 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
001a5 83 e0 0f and eax, 15 ; 0000000fH
001a8 c1 e0 02 shl eax, 2
001ab 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
001af 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
001b5 c1 f9 06 sar ecx, 6
001b8 0b c1 or eax, ecx
001ba 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
001be 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 920 :
; 921 : destination[ number_of_bytes_encoded ] = static_cast< char >( byte_to_add );
001c1 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
001c4 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001c7 8a 4d ab mov cl, BYTE PTR _byte_to_add$[ebp]
001ca 88 08 mov BYTE PTR [eax], cl
; 922 : number_of_bytes_encoded++;
001cc 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001cf 83 c0 01 add eax, 1
001d2 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 923 :
; 924 : destination[ number_of_bytes_encoded ] = static_cast< char >( END_OF_BASE64_ENCODED_DATA );
001d5 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
001d8 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001db c6 00 3d mov BYTE PTR [eax], 61 ; 0000003dH
; 925 :
; 926 : // 1999-09-01
; 927 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 928 : // We must NULL terminate the string before letting CString have the buffer back.
; 929 :
; 930 : destination[ number_of_bytes_encoded + 1 ] = 0;
001de 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
001e1 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001e4 c6 40 01 00 mov BYTE PTR [eax+1], 0
; 931 :
; 932 : destination_string.ReleaseBuffer( -1 );
001e8 6a ff push -1
001ea 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
001ed e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<char,0>::ReleaseBuffer
; 933 :
; 934 : return( TRUE );
001f2 b8 01 00 00 00 mov eax, 1
001f7 e9 93 00 00 00 jmp $LN1@EncodeA
; 935 : }
001fc eb 0b jmp SHORT $LN7@EncodeA
$LN6@EncodeA:
; 936 : else
; 937 : {
; 938 : byte_3 = input_buffer[ loop_index ];
001fe 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
00201 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
00204 8a 08 mov cl, BYTE PTR [eax]
00206 88 4d a8 mov BYTE PTR _byte_3$[ebp], cl
$LN7@EncodeA:
; 939 : }
; 940 :
; 941 : loop_index++;
00209 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
0020c 83 c0 01 add eax, 1
0020f 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 942 :
; 943 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
00212 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
00216 83 e0 0f and eax, 15 ; 0000000fH
00219 c1 e0 02 shl eax, 2
0021c 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
00220 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
00226 c1 f9 06 sar ecx, 6
00229 0b c1 or eax, ecx
0022b 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0022f 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 944 :
; 945 : destination[ number_of_bytes_encoded ] = static_cast< char >( byte_to_add );
00232 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00235 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00238 8a 4d ab mov cl, BYTE PTR _byte_to_add$[ebp]
0023b 88 08 mov BYTE PTR [eax], cl
; 946 : number_of_bytes_encoded++;
0023d 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00240 83 c0 01 add eax, 1
00243 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 947 :
; 948 : byte_to_add = alphabet[ ( byte_3 & 0x3F ) ];
00246 0f b6 45 a8 movzx eax, BYTE PTR _byte_3$[ebp]
0024a 83 e0 3f and eax, 63 ; 0000003fH
0024d 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
00251 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 949 :
; 950 : destination[ number_of_bytes_encoded ] = static_cast< char >( byte_to_add );
00254 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00257 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0025a 8a 4d ab mov cl, BYTE PTR _byte_to_add$[ebp]
0025d 88 08 mov BYTE PTR [eax], cl
; 951 : number_of_bytes_encoded++;
0025f 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00262 83 c0 01 add eax, 1
00265 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 952 :
; 953 : /*
; 954 : if ( ( number_of_bytes_encoded % BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) == 0 )
; 955 : {
; 956 : destination[ number_of_bytes_encoded ] = static_cast< char >( CARRIAGE_RETURN );
; 957 : number_of_bytes_encoded++;
; 958 :
; 959 : destination[ number_of_bytes_encoded ] = static_cast< char >( LINE_FEED );
; 960 : number_of_bytes_encoded++;
; 961 : }
; 962 : */
; 963 : }
00268 e9 23 fe ff ff jmp $LN2@EncodeA
$LN3@EncodeA:
; 964 :
; 965 : destination[ number_of_bytes_encoded ] = static_cast< char >( END_OF_BASE64_ENCODED_DATA );
0026d 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00270 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00273 c6 00 3d mov BYTE PTR [eax], 61 ; 0000003dH
; 966 :
; 967 : // 1999-09-01
; 968 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 969 : // We must NULL terminate the string before letting CString have the buffer back.
; 970 :
; 971 : destination[ number_of_bytes_encoded + 1 ] = 0;
00276 8b 45 9c mov eax, DWORD PTR _destination$[ebp]
00279 03 45 a0 add eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0027c c6 40 01 00 mov BYTE PTR [eax+1], 0
; 972 :
; 973 : destination_string.ReleaseBuffer( -1 );
00280 6a ff push -1
00282 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
00285 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<char,0>::ReleaseBuffer
; 974 :
; 975 : return( TRUE );
0028a b8 01 00 00 00 mov eax, 1
$LN1@EncodeA:
; 976 : }
0028f 5f pop edi
00290 5e pop esi
00291 5b pop ebx
00292 8b 4d fc mov ecx, DWORD PTR __$ArrayPad$[ebp]
00295 33 cd xor ecx, ebp
00297 e8 00 00 00 00 call @__security_check_cookie@4
0029c 8b e5 mov esp, ebp
0029e 5d pop ebp
0029f c2 0c 00 ret 12 ; 0000000cH
?EncodeA@CBase64Coding@@UAEHPAEJAAV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z ENDP ; CBase64Coding::EncodeA
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?Encode@CBase64Coding@@UAEHPAEJAAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z
_TEXT SEGMENT
_destination$ = -100 ; size = 4
_number_of_bytes_encoded$ = -96 ; size = 4
_input_buffer$ = -92 ; size = 4
_byte_3$ = -88 ; size = 1
_byte_2$ = -87 ; size = 1
_byte_1$ = -86 ; size = 1
_byte_to_add$ = -85 ; size = 1
_number_of_bytes_to_encode$ = -84 ; size = 4
_loop_index$ = -80 ; size = 4
_alphabet$ = -76 ; size = 65
_this$ = -8 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_pSource$ = 8 ; size = 4
_lSource$ = 12 ; size = 4
_destination_string$ = 16 ; size = 4
?Encode@CBase64Coding@@UAEHPAEJAAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z PROC ; CBase64Coding::Encode, COMDAT
; _this$ = ecx
; 695 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 81 ec a4 00 00
00 sub esp, 164 ; 000000a4H
00009 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0000e 33 c5 xor eax, ebp
00010 89 45 fc mov DWORD PTR __$ArrayPad$[ebp], eax
00013 53 push ebx
00014 56 push esi
00015 57 push edi
00016 89 4d f8 mov DWORD PTR _this$[ebp], ecx
; 696 :
; 697 : const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00019 b9 10 00 00 00 mov ecx, 16 ; 00000010H
0001e be 00 00 00 00 mov esi, OFFSET ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@
00023 8d 7d b4 lea edi, DWORD PTR _alphabet$[ebp]
00026 f3 a5 rep movsd
00028 a4 movsb
; 698 :
; 699 : int loop_index = 0;
00029 c7 45 b0 00 00
00 00 mov DWORD PTR _loop_index$[ebp], 0
; 700 : int number_of_bytes_to_encode = lSource;
00030 8b 45 0c mov eax, DWORD PTR _lSource$[ebp]
00033 89 45 ac mov DWORD PTR _number_of_bytes_to_encode$[ebp], eax
; 701 :
; 702 : BYTE byte_to_add = 0;
00036 c6 45 ab 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 703 : BYTE byte_1 = 0;
0003a c6 45 aa 00 mov BYTE PTR _byte_1$[ebp], 0
; 704 : BYTE byte_2 = 0;
0003e c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 705 : BYTE byte_3 = 0;
00042 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 706 :
; 707 : const BYTE * input_buffer = pSource;
00046 8b 45 08 mov eax, DWORD PTR _pSource$[ebp]
00049 89 45 a4 mov DWORD PTR _input_buffer$[ebp], eax
; 708 :
; 709 : DWORD number_of_bytes_encoded = (DWORD) ( (double) number_of_bytes_to_encode / (double) 0.75 ) + 1;
0004c f2 0f 2a 45 ac cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_encode$[ebp]
00051 f2 0f 5e 05 00
00 00 00 divsd xmm0, QWORD PTR __real@3fe8000000000000
00059 e8 00 00 00 00 call __dtol3
0005e 83 c0 01 add eax, 1
00061 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 710 :
; 711 : // Now add in the CR/LF pairs, each line is truncated at 72 characters
; 712 :
; 713 : // 2000-05-12
; 714 : // Thanks go to Ilia Golubev (ilia@varicom.co.il) for finding a bug here.
; 715 : // I was using number_of_bytes_to_encode rather than number_of_bytes_encoded.
; 716 :
; 717 : number_of_bytes_encoded += (DWORD)( ( ( number_of_bytes_encoded / BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) + 1 ) * 2 );
00064 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00067 33 d2 xor edx, edx
00069 b9 48 00 00 00 mov ecx, 72 ; 00000048H
0006e f7 f1 div ecx
00070 8b 55 a0 mov edx, DWORD PTR _number_of_bytes_encoded$[ebp]
00073 8d 44 42 02 lea eax, DWORD PTR [edx+eax*2+2]
00077 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 718 :
; 719 : LPTSTR destination = destination_string.GetBuffer( number_of_bytes_encoded );
0007a 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0007d 50 push eax
0007e 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
00081 e8 00 00 00 00 call ?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z ; ATL::CSimpleStringT<wchar_t,0>::GetBuffer
00086 89 45 9c mov DWORD PTR _destination$[ebp], eax
; 720 :
; 721 : number_of_bytes_encoded = 0;
00089 c7 45 a0 00 00
00 00 mov DWORD PTR _number_of_bytes_encoded$[ebp], 0
$LN2@Encode:
; 722 :
; 723 : while( loop_index < number_of_bytes_to_encode )
00090 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00093 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
00096 0f 8d 05 02 00
00 jge $LN3@Encode
; 724 : {
; 725 : // Output the first byte
; 726 :
; 727 : byte_1 = input_buffer[ loop_index ];
0009c 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0009f 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
000a2 8a 08 mov cl, BYTE PTR [eax]
000a4 88 4d aa mov BYTE PTR _byte_1$[ebp], cl
; 728 : byte_to_add = alphabet[ ( byte_1 >> 2 ) ];
000a7 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000ab c1 f8 02 sar eax, 2
000ae 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
000b2 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 729 :
; 730 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
000b5 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
000ba 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
000bd 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
000c0 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 731 : number_of_bytes_encoded++;
000c4 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
000c7 83 c0 01 add eax, 1
000ca 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 732 :
; 733 : loop_index++;
000cd 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000d0 83 c0 01 add eax, 1
000d3 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 734 :
; 735 : if ( loop_index >= number_of_bytes_to_encode )
000d6 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000d9 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
000dc 0f 8c 86 00 00
00 jl $LN4@Encode
; 736 : {
; 737 : // We're at the end of the data to encode
; 738 :
; 739 : byte_2 = 0;
000e2 c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 740 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
000e6 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000ea 83 e0 03 and eax, 3
000ed c1 e0 04 shl eax, 4
000f0 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
000f4 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
000fa c1 f9 04 sar ecx, 4
000fd 0b c1 or eax, ecx
000ff 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00103 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 741 :
; 742 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00106 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
0010b 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0010e 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00111 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 743 : number_of_bytes_encoded++;
00115 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00118 83 c0 01 add eax, 1
0011b 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 744 :
; 745 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
0011e b8 3d 00 00 00 mov eax, 61 ; 0000003dH
00123 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00126 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00129 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 746 : number_of_bytes_encoded++;
0012d 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00130 83 c0 01 add eax, 1
00133 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 747 :
; 748 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
00136 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
0013b 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0013e 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00141 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 749 :
; 750 : // 1999-09-01
; 751 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 752 : // We must NULL terminate the string before letting CString have the buffer back.
; 753 :
; 754 : destination[ number_of_bytes_encoded + 1 ] = 0;
00145 33 c0 xor eax, eax
00147 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0014a 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0014d 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 755 :
; 756 : destination_string.ReleaseBuffer( -1 );
00152 6a ff push -1
00154 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
00157 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 757 :
; 758 : return( TRUE );
0015c b8 01 00 00 00 mov eax, 1
00161 e9 66 01 00 00 jmp $LN1@Encode
; 759 : }
00166 eb 0b jmp SHORT $LN5@Encode
$LN4@Encode:
; 760 : else
; 761 : {
; 762 : byte_2 = input_buffer[ loop_index ];
00168 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0016b 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
0016e 8a 08 mov cl, BYTE PTR [eax]
00170 88 4d a9 mov BYTE PTR _byte_2$[ebp], cl
$LN5@Encode:
; 763 : }
; 764 :
; 765 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
00173 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
00177 83 e0 03 and eax, 3
0017a c1 e0 04 shl eax, 4
0017d 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
00181 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
00187 c1 f9 04 sar ecx, 4
0018a 0b c1 or eax, ecx
0018c 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00190 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 766 :
; 767 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00193 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00198 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0019b 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0019e 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 768 : number_of_bytes_encoded++;
001a2 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001a5 83 c0 01 add eax, 1
001a8 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 769 :
; 770 : loop_index++;
001ab 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
001ae 83 c0 01 add eax, 1
001b1 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 771 :
; 772 : if ( loop_index >= number_of_bytes_to_encode )
001b4 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
001b7 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
001ba 7c 6e jl SHORT $LN6@Encode
; 773 : {
; 774 : // We ran out of bytes, we need to add the last half of byte_2 and pad
; 775 : byte_3 = 0;
001bc c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 776 :
; 777 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
001c0 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
001c4 83 e0 0f and eax, 15 ; 0000000fH
001c7 c1 e0 02 shl eax, 2
001ca 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
001ce 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
001d4 c1 f9 06 sar ecx, 6
001d7 0b c1 or eax, ecx
001d9 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
001dd 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 778 :
; 779 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
001e0 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
001e5 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
001e8 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
001eb 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 780 : number_of_bytes_encoded++;
001ef 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001f2 83 c0 01 add eax, 1
001f5 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 781 :
; 782 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
001f8 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
001fd 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00200 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00203 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 783 :
; 784 : // 1999-09-01
; 785 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 786 : // We must NULL terminate the string before letting CString have the buffer back.
; 787 :
; 788 : destination[ number_of_bytes_encoded + 1 ] = 0;
00207 33 c0 xor eax, eax
00209 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0020c 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0020f 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 789 :
; 790 : destination_string.ReleaseBuffer( -1 );
00214 6a ff push -1
00216 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
00219 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 791 :
; 792 : return( TRUE );
0021e b8 01 00 00 00 mov eax, 1
00223 e9 a4 00 00 00 jmp $LN1@Encode
; 793 : }
00228 eb 0b jmp SHORT $LN7@Encode
$LN6@Encode:
; 794 : else
; 795 : {
; 796 : byte_3 = input_buffer[ loop_index ];
0022a 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0022d 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
00230 8a 08 mov cl, BYTE PTR [eax]
00232 88 4d a8 mov BYTE PTR _byte_3$[ebp], cl
$LN7@Encode:
; 797 : }
; 798 :
; 799 : loop_index++;
00235 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00238 83 c0 01 add eax, 1
0023b 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 800 :
; 801 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
0023e 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
00242 83 e0 0f and eax, 15 ; 0000000fH
00245 c1 e0 02 shl eax, 2
00248 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
0024c 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
00252 c1 f9 06 sar ecx, 6
00255 0b c1 or eax, ecx
00257 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0025b 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 802 :
; 803 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
0025e 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00263 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00266 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00269 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 804 : number_of_bytes_encoded++;
0026d 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00270 83 c0 01 add eax, 1
00273 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 805 :
; 806 : byte_to_add = alphabet[ ( byte_3 & 0x3F ) ];
00276 0f b6 45 a8 movzx eax, BYTE PTR _byte_3$[ebp]
0027a 83 e0 3f and eax, 63 ; 0000003fH
0027d 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
00281 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 807 :
; 808 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00284 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00289 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0028c 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0028f 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 809 : number_of_bytes_encoded++;
00293 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00296 83 c0 01 add eax, 1
00299 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 810 :
; 811 : /*
; 812 : if ( ( number_of_bytes_encoded % BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) == 0 )
; 813 : {
; 814 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( CARRIAGE_RETURN );
; 815 : number_of_bytes_encoded++;
; 816 :
; 817 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( LINE_FEED );
; 818 : number_of_bytes_encoded++;
; 819 : }
; 820 : */
; 821 : }
0029c e9 ef fd ff ff jmp $LN2@Encode
$LN3@Encode:
; 822 :
; 823 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
002a1 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
002a6 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002a9 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002ac 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 824 :
; 825 : // 1999-09-01
; 826 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 827 : // We must NULL terminate the string before letting CString have the buffer back.
; 828 :
; 829 : destination[ number_of_bytes_encoded + 1 ] = 0;
002b0 33 c0 xor eax, eax
002b2 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002b5 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002b8 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 830 :
; 831 : destination_string.ReleaseBuffer( -1 );
002bd 6a ff push -1
002bf 8b 4d 10 mov ecx, DWORD PTR _destination_string$[ebp]
002c2 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 832 :
; 833 : return( TRUE );
002c7 b8 01 00 00 00 mov eax, 1
$LN1@Encode:
; 834 : }
002cc 5f pop edi
002cd 5e pop esi
002ce 5b pop ebx
002cf 8b 4d fc mov ecx, DWORD PTR __$ArrayPad$[ebp]
002d2 33 cd xor ecx, ebp
002d4 e8 00 00 00 00 call @__security_check_cookie@4
002d9 8b e5 mov esp, ebp
002db 5d pop ebp
002dc c2 0c 00 ret 12 ; 0000000cH
?Encode@CBase64Coding@@UAEHPAEJAAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ENDP ; CBase64Coding::Encode
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z
_TEXT SEGMENT
_destination$ = -100 ; size = 4
_number_of_bytes_encoded$ = -96 ; size = 4
_input_buffer$ = -92 ; size = 4
_byte_3$ = -88 ; size = 1
_byte_2$ = -87 ; size = 1
_byte_1$ = -86 ; size = 1
_byte_to_add$ = -85 ; size = 1
_number_of_bytes_to_encode$ = -84 ; size = 4
_loop_index$ = -80 ; size = 4
_alphabet$ = -76 ; size = 65
_this$ = -8 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_source$ = 8 ; size = 4
_destination_string$ = 12 ; size = 4
?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z PROC ; CBase64Coding::Encode, COMDAT
; _this$ = ecx
; 555 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 81 ec a4 00 00
00 sub esp, 164 ; 000000a4H
00009 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0000e 33 c5 xor eax, ebp
00010 89 45 fc mov DWORD PTR __$ArrayPad$[ebp], eax
00013 53 push ebx
00014 56 push esi
00015 57 push edi
00016 89 4d f8 mov DWORD PTR _this$[ebp], ecx
; 556 :
; 557 : const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00019 b9 10 00 00 00 mov ecx, 16 ; 00000010H
0001e be 00 00 00 00 mov esi, OFFSET ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@
00023 8d 7d b4 lea edi, DWORD PTR _alphabet$[ebp]
00026 f3 a5 rep movsd
00028 a4 movsb
; 558 :
; 559 : int loop_index = 0;
00029 c7 45 b0 00 00
00 00 mov DWORD PTR _loop_index$[ebp], 0
; 560 : int number_of_bytes_to_encode = (int)source.GetSize();
00030 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00033 e8 00 00 00 00 call ?GetSize@CByteArray@@QBEHXZ ; CByteArray::GetSize
00038 89 45 ac mov DWORD PTR _number_of_bytes_to_encode$[ebp], eax
; 561 :
; 562 : BYTE byte_to_add = 0;
0003b c6 45 ab 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 563 : BYTE byte_1 = 0;
0003f c6 45 aa 00 mov BYTE PTR _byte_1$[ebp], 0
; 564 : BYTE byte_2 = 0;
00043 c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 565 : BYTE byte_3 = 0;
00047 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 566 :
; 567 : const BYTE * input_buffer = source.GetData();
0004b 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
0004e e8 00 00 00 00 call ?GetData@CByteArray@@QBEPBEXZ ; CByteArray::GetData
00053 89 45 a4 mov DWORD PTR _input_buffer$[ebp], eax
; 568 :
; 569 : DWORD number_of_bytes_encoded = (DWORD) ( (double) number_of_bytes_to_encode / (double) 0.75 ) + 1;
00056 f2 0f 2a 45 ac cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_encode$[ebp]
0005b f2 0f 5e 05 00
00 00 00 divsd xmm0, QWORD PTR __real@3fe8000000000000
00063 e8 00 00 00 00 call __dtol3
00068 83 c0 01 add eax, 1
0006b 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 570 :
; 571 : // Now add in the CR/LF pairs, each line is truncated at 72 characters
; 572 :
; 573 : // 2000-05-12
; 574 : // Thanks go to Ilia Golubev (ilia@varicom.co.il) for finding a bug here.
; 575 : // I was using number_of_bytes_to_encode rather than number_of_bytes_encoded.
; 576 :
; 577 : number_of_bytes_encoded += (DWORD)( ( ( number_of_bytes_encoded / BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) + 1 ) * 2 );
0006e 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00071 33 d2 xor edx, edx
00073 b9 48 00 00 00 mov ecx, 72 ; 00000048H
00078 f7 f1 div ecx
0007a 8b 55 a0 mov edx, DWORD PTR _number_of_bytes_encoded$[ebp]
0007d 8d 44 42 02 lea eax, DWORD PTR [edx+eax*2+2]
00081 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 578 :
; 579 : LPTSTR destination = destination_string.GetBuffer( number_of_bytes_encoded );
00084 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00087 50 push eax
00088 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
0008b e8 00 00 00 00 call ?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z ; ATL::CSimpleStringT<wchar_t,0>::GetBuffer
00090 89 45 9c mov DWORD PTR _destination$[ebp], eax
; 580 :
; 581 : number_of_bytes_encoded = 0;
00093 c7 45 a0 00 00
00 00 mov DWORD PTR _number_of_bytes_encoded$[ebp], 0
$LN2@Encode:
; 582 :
; 583 : while( loop_index < number_of_bytes_to_encode )
0009a 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
0009d 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
000a0 0f 8d 45 02 00
00 jge $LN3@Encode
; 584 : {
; 585 : // Output the first byte
; 586 :
; 587 : byte_1 = input_buffer[ loop_index ];
000a6 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
000a9 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
000ac 8a 08 mov cl, BYTE PTR [eax]
000ae 88 4d aa mov BYTE PTR _byte_1$[ebp], cl
; 588 : byte_to_add = alphabet[ ( byte_1 >> 2 ) ];
000b1 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000b5 c1 f8 02 sar eax, 2
000b8 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
000bc 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 589 :
; 590 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
000bf 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
000c4 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
000c7 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
000ca 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 591 : number_of_bytes_encoded++;
000ce 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
000d1 83 c0 01 add eax, 1
000d4 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 592 :
; 593 : loop_index++;
000d7 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000da 83 c0 01 add eax, 1
000dd 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 594 :
; 595 : if ( loop_index >= number_of_bytes_to_encode )
000e0 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
000e3 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
000e6 0f 8c 86 00 00
00 jl $LN4@Encode
; 596 : {
; 597 : // We're at the end of the data to encode
; 598 :
; 599 : byte_2 = 0;
000ec c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 600 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
000f0 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000f4 83 e0 03 and eax, 3
000f7 c1 e0 04 shl eax, 4
000fa 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
000fe 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
00104 c1 f9 04 sar ecx, 4
00107 0b c1 or eax, ecx
00109 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0010d 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 601 :
; 602 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00110 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00115 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00118 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0011b 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 603 : number_of_bytes_encoded++;
0011f 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
00122 83 c0 01 add eax, 1
00125 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 604 :
; 605 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
00128 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
0012d 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00130 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00133 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 606 : number_of_bytes_encoded++;
00137 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0013a 83 c0 01 add eax, 1
0013d 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 607 :
; 608 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
00140 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
00145 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00148 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0014b 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 609 :
; 610 : // 1999-09-01
; 611 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 612 : // We must NULL terminate the string before letting CString have the buffer back.
; 613 :
; 614 : destination[ number_of_bytes_encoded + 1 ] = 0;
0014f 33 c0 xor eax, eax
00151 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00154 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00157 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 615 :
; 616 : destination_string.ReleaseBuffer( -1 );
0015c 6a ff push -1
0015e 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
00161 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 617 :
; 618 : return( TRUE );
00166 b8 01 00 00 00 mov eax, 1
0016b e9 a6 01 00 00 jmp $LN1@Encode
; 619 : }
00170 eb 0b jmp SHORT $LN5@Encode
$LN4@Encode:
; 620 : else
; 621 : {
; 622 : byte_2 = input_buffer[ loop_index ];
00172 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
00175 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
00178 8a 08 mov cl, BYTE PTR [eax]
0017a 88 4d a9 mov BYTE PTR _byte_2$[ebp], cl
$LN5@Encode:
; 623 : }
; 624 :
; 625 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
0017d 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
00181 83 e0 03 and eax, 3
00184 c1 e0 04 shl eax, 4
00187 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
0018b 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
00191 c1 f9 04 sar ecx, 4
00194 0b c1 or eax, ecx
00196 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0019a 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 626 :
; 627 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
0019d 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
001a2 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
001a5 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
001a8 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 628 : number_of_bytes_encoded++;
001ac 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001af 83 c0 01 add eax, 1
001b2 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 629 :
; 630 : loop_index++;
001b5 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
001b8 83 c0 01 add eax, 1
001bb 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 631 :
; 632 : if ( loop_index >= number_of_bytes_to_encode )
001be 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
001c1 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
001c4 7c 6e jl SHORT $LN6@Encode
; 633 : {
; 634 : // We ran out of bytes, we need to add the last half of byte_2 and pad
; 635 : byte_3 = 0;
001c6 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 636 :
; 637 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
001ca 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
001ce 83 e0 0f and eax, 15 ; 0000000fH
001d1 c1 e0 02 shl eax, 2
001d4 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
001d8 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
001de c1 f9 06 sar ecx, 6
001e1 0b c1 or eax, ecx
001e3 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
001e7 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 638 :
; 639 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
001ea 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
001ef 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
001f2 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
001f5 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 640 : number_of_bytes_encoded++;
001f9 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
001fc 83 c0 01 add eax, 1
001ff 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 641 :
; 642 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
00202 b8 3d 00 00 00 mov eax, 61 ; 0000003dH
00207 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
0020a 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
0020d 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 643 :
; 644 : // 1999-09-01
; 645 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 646 : // We must NULL terminate the string before letting CString have the buffer back.
; 647 :
; 648 : destination[ number_of_bytes_encoded + 1 ] = 0;
00211 33 c0 xor eax, eax
00213 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00216 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00219 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 649 :
; 650 : destination_string.ReleaseBuffer( -1 );
0021e 6a ff push -1
00220 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
00223 e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 651 :
; 652 : return( TRUE );
00228 b8 01 00 00 00 mov eax, 1
0022d e9 e4 00 00 00 jmp $LN1@Encode
; 653 : }
00232 eb 0b jmp SHORT $LN7@Encode
$LN6@Encode:
; 654 : else
; 655 : {
; 656 : byte_3 = input_buffer[ loop_index ];
00234 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
00237 03 45 b0 add eax, DWORD PTR _loop_index$[ebp]
0023a 8a 08 mov cl, BYTE PTR [eax]
0023c 88 4d a8 mov BYTE PTR _byte_3$[ebp], cl
$LN7@Encode:
; 657 : }
; 658 :
; 659 : loop_index++;
0023f 8b 45 b0 mov eax, DWORD PTR _loop_index$[ebp]
00242 83 c0 01 add eax, 1
00245 89 45 b0 mov DWORD PTR _loop_index$[ebp], eax
; 660 :
; 661 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
00248 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
0024c 83 e0 0f and eax, 15 ; 0000000fH
0024f c1 e0 02 shl eax, 2
00252 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
00256 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
0025c c1 f9 06 sar ecx, 6
0025f 0b c1 or eax, ecx
00261 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00265 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 662 :
; 663 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
00268 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
0026d 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00270 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00273 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 664 : number_of_bytes_encoded++;
00277 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
0027a 83 c0 01 add eax, 1
0027d 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 665 :
; 666 : byte_to_add = alphabet[ ( byte_3 & 0x3F ) ];
00280 0f b6 45 a8 movzx eax, BYTE PTR _byte_3$[ebp]
00284 83 e0 3f and eax, 63 ; 0000003fH
00287 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
0028b 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 667 :
; 668 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( byte_to_add );
0028e 66 0f b6 45 ab movzx ax, BYTE PTR _byte_to_add$[ebp]
00293 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
00296 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00299 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 669 : number_of_bytes_encoded++;
0029d 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
002a0 83 c0 01 add eax, 1
002a3 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 670 :
; 671 : if ( ( number_of_bytes_encoded % BASE64_NUMBER_OF_CHARACTERS_PER_LINE ) == 0 )
002a6 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
002a9 33 d2 xor edx, edx
002ab b9 48 00 00 00 mov ecx, 72 ; 00000048H
002b0 f7 f1 div ecx
002b2 85 d2 test edx, edx
002b4 75 30 jne SHORT $LN8@Encode
; 672 : {
; 673 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( CARRIAGE_RETURN );
002b6 b8 0d 00 00 00 mov eax, 13 ; 0000000dH
002bb 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002be 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002c1 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 674 : number_of_bytes_encoded++;
002c5 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
002c8 83 c0 01 add eax, 1
002cb 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
; 675 :
; 676 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( LINE_FEED );
002ce b8 0a 00 00 00 mov eax, 10 ; 0000000aH
002d3 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002d6 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002d9 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 677 : number_of_bytes_encoded++;
002dd 8b 45 a0 mov eax, DWORD PTR _number_of_bytes_encoded$[ebp]
002e0 83 c0 01 add eax, 1
002e3 89 45 a0 mov DWORD PTR _number_of_bytes_encoded$[ebp], eax
$LN8@Encode:
; 678 : }
; 679 : }
002e6 e9 af fd ff ff jmp $LN2@Encode
$LN3@Encode:
; 680 :
; 681 : destination[ number_of_bytes_encoded ] = static_cast< TCHAR >( END_OF_BASE64_ENCODED_DATA );
002eb b8 3d 00 00 00 mov eax, 61 ; 0000003dH
002f0 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002f3 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
002f6 66 89 04 4a mov WORD PTR [edx+ecx*2], ax
; 682 :
; 683 : // 1999-09-01
; 684 : // Thanks go to Yurong Lin (ylin@dial.pipex.com) for finding a bug here.
; 685 : // We must NULL terminate the string before letting CString have the buffer back.
; 686 :
; 687 : destination[ number_of_bytes_encoded + 1 ] = 0;
002fa 33 c0 xor eax, eax
002fc 8b 4d a0 mov ecx, DWORD PTR _number_of_bytes_encoded$[ebp]
002ff 8b 55 9c mov edx, DWORD PTR _destination$[ebp]
00302 66 89 44 4a 02 mov WORD PTR [edx+ecx*2+2], ax
; 688 :
; 689 : destination_string.ReleaseBuffer( -1 );
00307 6a ff push -1
00309 8b 4d 0c mov ecx, DWORD PTR _destination_string$[ebp]
0030c e8 00 00 00 00 call ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
; 690 :
; 691 : return( TRUE );
00311 b8 01 00 00 00 mov eax, 1
$LN1@Encode:
; 692 : }
00316 5f pop edi
00317 5e pop esi
00318 5b pop ebx
00319 8b 4d fc mov ecx, DWORD PTR __$ArrayPad$[ebp]
0031c 33 cd xor ecx, ebp
0031e e8 00 00 00 00 call @__security_check_cookie@4
00323 8b e5 mov esp, ebp
00325 5d pop ebp
00326 c2 08 00 ret 8
?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z ENDP ; CBase64Coding::Encode
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z
_TEXT SEGMENT
_add_index$ = -96 ; size = 4
_input_buffer$ = -92 ; size = 4
_byte_3$ = -88 ; size = 1
_byte_2$ = -87 ; size = 1
_byte_1$ = -86 ; size = 1
_byte_to_add$ = -85 ; size = 1
_number_of_bytes_to_encode$ = -84 ; size = 4
_source_index$ = -80 ; size = 4
_alphabet$ = -76 ; size = 65
_this$ = -8 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_source$ = 8 ; size = 4
_destination$ = 12 ; size = 4
?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z PROC ; CBase64Coding::Encode, COMDAT
; _this$ = ecx
; 448 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 81 ec a0 00 00
00 sub esp, 160 ; 000000a0H
00009 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0000e 33 c5 xor eax, ebp
00010 89 45 fc mov DWORD PTR __$ArrayPad$[ebp], eax
00013 53 push ebx
00014 56 push esi
00015 57 push edi
00016 89 4d f8 mov DWORD PTR _this$[ebp], ecx
; 449 :
; 450 : // We don't want to make this static so we can reduce our
; 451 : // footprint in the library
; 452 :
; 453 : const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00019 b9 10 00 00 00 mov ecx, 16 ; 00000010H
0001e be 00 00 00 00 mov esi, OFFSET ??_C@_0EB@NFPJKBDG@ABCDEFGHIJKLMNOPQRSTUVWXYZabcde@
00023 8d 7d b4 lea edi, DWORD PTR _alphabet$[ebp]
00026 f3 a5 rep movsd
00028 a4 movsb
; 454 :
; 455 : int source_index = 0;
00029 c7 45 b0 00 00
00 00 mov DWORD PTR _source_index$[ebp], 0
; 456 : int number_of_bytes_to_encode = (int)source.GetSize();
00030 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00033 e8 00 00 00 00 call ?GetSize@CByteArray@@QBEHXZ ; CByteArray::GetSize
00038 89 45 ac mov DWORD PTR _number_of_bytes_to_encode$[ebp], eax
; 457 :
; 458 : BYTE byte_to_add = 0;
0003b c6 45 ab 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 459 : BYTE byte_1 = 0;
0003f c6 45 aa 00 mov BYTE PTR _byte_1$[ebp], 0
; 460 : BYTE byte_2 = 0;
00043 c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 461 : BYTE byte_3 = 0;
00047 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 462 :
; 463 : const BYTE * input_buffer = source.GetData();
0004b 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
0004e e8 00 00 00 00 call ?GetData@CByteArray@@QBEPBEXZ ; CByteArray::GetData
00053 89 45 a4 mov DWORD PTR _input_buffer$[ebp], eax
; 464 :
; 465 : DWORD add_index = (DWORD) ( (double) number_of_bytes_to_encode / (double) 0.75 ) + 1;
00056 f2 0f 2a 45 ac cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_encode$[ebp]
0005b f2 0f 5e 05 00
00 00 00 divsd xmm0, QWORD PTR __real@3fe8000000000000
00063 e8 00 00 00 00 call __dtol3
00068 83 c0 01 add eax, 1
0006b 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 466 : add_index += ( ( number_of_bytes_to_encode % 3 ) + 1 );
0006e 8b 45 ac mov eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
00071 99 cdq
00072 b9 03 00 00 00 mov ecx, 3
00077 f7 f9 idiv ecx
00079 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
0007c 8d 4c 10 01 lea ecx, DWORD PTR [eax+edx+1]
00080 89 4d a0 mov DWORD PTR _add_index$[ebp], ecx
; 467 :
; 468 : destination.SetSize( add_index );
00083 6a ff push -1
00085 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00088 50 push eax
00089 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0008c e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 469 : add_index = 0;
00091 c7 45 a0 00 00
00 00 mov DWORD PTR _add_index$[ebp], 0
$LN2@Encode:
; 470 :
; 471 : while( source_index < number_of_bytes_to_encode )
00098 8b 45 b0 mov eax, DWORD PTR _source_index$[ebp]
0009b 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
0009e 0f 8d 0e 02 00
00 jge $LN3@Encode
; 472 : {
; 473 : // Output the first byte
; 474 :
; 475 : byte_1 = input_buffer[ source_index ];
000a4 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
000a7 03 45 b0 add eax, DWORD PTR _source_index$[ebp]
000aa 8a 08 mov cl, BYTE PTR [eax]
000ac 88 4d aa mov BYTE PTR _byte_1$[ebp], cl
; 476 : byte_to_add = alphabet[ ( byte_1 >> 2 ) ];
000af 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000b3 c1 f8 02 sar eax, 2
000b6 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
000ba 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 477 :
; 478 : destination.SetAt( add_index, byte_to_add );
000bd 0f b6 45 ab movzx eax, BYTE PTR _byte_to_add$[ebp]
000c1 50 push eax
000c2 8b 4d a0 mov ecx, DWORD PTR _add_index$[ebp]
000c5 51 push ecx
000c6 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
000c9 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 479 : add_index++;
000ce 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
000d1 83 c0 01 add eax, 1
000d4 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 480 :
; 481 : source_index++;
000d7 8b 45 b0 mov eax, DWORD PTR _source_index$[ebp]
000da 83 c0 01 add eax, 1
000dd 89 45 b0 mov DWORD PTR _source_index$[ebp], eax
; 482 :
; 483 : if ( source_index >= number_of_bytes_to_encode )
000e0 8b 45 b0 mov eax, DWORD PTR _source_index$[ebp]
000e3 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
000e6 0f 8c 86 00 00
00 jl $LN4@Encode
; 484 : {
; 485 : // We're at the end of the data to encode
; 486 :
; 487 : byte_2 = 0;
000ec c6 45 a9 00 mov BYTE PTR _byte_2$[ebp], 0
; 488 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
000f0 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
000f4 83 e0 03 and eax, 3
000f7 c1 e0 04 shl eax, 4
000fa 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
000fe 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
00104 c1 f9 04 sar ecx, 4
00107 0b c1 or eax, ecx
00109 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0010d 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 489 :
; 490 : destination.SetAt( add_index, byte_to_add );
00110 0f b6 45 ab movzx eax, BYTE PTR _byte_to_add$[ebp]
00114 50 push eax
00115 8b 4d a0 mov ecx, DWORD PTR _add_index$[ebp]
00118 51 push ecx
00119 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0011c e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 491 : add_index++;
00121 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00124 83 c0 01 add eax, 1
00127 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 492 :
; 493 : destination.SetAt( add_index, END_OF_BASE64_ENCODED_DATA );
0012a 6a 3d push 61 ; 0000003dH
0012c 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
0012f 50 push eax
00130 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00133 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 494 : add_index++;
00138 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
0013b 83 c0 01 add eax, 1
0013e 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 495 :
; 496 : destination.SetAt( add_index, END_OF_BASE64_ENCODED_DATA );
00141 6a 3d push 61 ; 0000003dH
00143 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00146 50 push eax
00147 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0014a e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 497 : add_index++;
0014f 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00152 83 c0 01 add eax, 1
00155 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 498 :
; 499 : destination.SetSize( add_index );
00158 6a ff push -1
0015a 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
0015d 50 push eax
0015e 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00161 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 500 : return( TRUE );
00166 b8 01 00 00 00 mov eax, 1
0016b e9 6c 01 00 00 jmp $LN1@Encode
; 501 : }
00170 eb 0b jmp SHORT $LN5@Encode
$LN4@Encode:
; 502 : else
; 503 : {
; 504 : byte_2 = input_buffer[ source_index ];
00172 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
00175 03 45 b0 add eax, DWORD PTR _source_index$[ebp]
00178 8a 08 mov cl, BYTE PTR [eax]
0017a 88 4d a9 mov BYTE PTR _byte_2$[ebp], cl
$LN5@Encode:
; 505 : }
; 506 :
; 507 : byte_to_add = alphabet[ ( ( ( byte_1 & 0x03 ) << 4 ) | ( ( byte_2 & 0xF0 ) >> 4 ) ) ];
0017d 0f b6 45 aa movzx eax, BYTE PTR _byte_1$[ebp]
00181 83 e0 03 and eax, 3
00184 c1 e0 04 shl eax, 4
00187 0f b6 4d a9 movzx ecx, BYTE PTR _byte_2$[ebp]
0018b 81 e1 f0 00 00
00 and ecx, 240 ; 000000f0H
00191 c1 f9 04 sar ecx, 4
00194 0b c1 or eax, ecx
00196 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
0019a 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 508 : destination.SetAt( add_index, byte_to_add );
0019d 0f b6 45 ab movzx eax, BYTE PTR _byte_to_add$[ebp]
001a1 50 push eax
001a2 8b 4d a0 mov ecx, DWORD PTR _add_index$[ebp]
001a5 51 push ecx
001a6 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
001a9 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 509 : add_index++;
001ae 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
001b1 83 c0 01 add eax, 1
001b4 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 510 :
; 511 : source_index++;
001b7 8b 45 b0 mov eax, DWORD PTR _source_index$[ebp]
001ba 83 c0 01 add eax, 1
001bd 89 45 b0 mov DWORD PTR _source_index$[ebp], eax
; 512 :
; 513 : if ( source_index >= number_of_bytes_to_encode )
001c0 8b 45 b0 mov eax, DWORD PTR _source_index$[ebp]
001c3 3b 45 ac cmp eax, DWORD PTR _number_of_bytes_to_encode$[ebp]
001c6 7c 6f jl SHORT $LN6@Encode
; 514 : {
; 515 : // We ran out of bytes, we need to add the last half of byte_2 and pad
; 516 : byte_3 = 0;
001c8 c6 45 a8 00 mov BYTE PTR _byte_3$[ebp], 0
; 517 :
; 518 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
001cc 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
001d0 83 e0 0f and eax, 15 ; 0000000fH
001d3 c1 e0 02 shl eax, 2
001d6 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
001da 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
001e0 c1 f9 06 sar ecx, 6
001e3 0b c1 or eax, ecx
001e5 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
001e9 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 519 :
; 520 : destination.SetAt( add_index, byte_to_add );
001ec 0f b6 45 ab movzx eax, BYTE PTR _byte_to_add$[ebp]
001f0 50 push eax
001f1 8b 4d a0 mov ecx, DWORD PTR _add_index$[ebp]
001f4 51 push ecx
001f5 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
001f8 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 521 : add_index++;
001fd 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00200 83 c0 01 add eax, 1
00203 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 522 :
; 523 : destination.SetAt( add_index, END_OF_BASE64_ENCODED_DATA );
00206 6a 3d push 61 ; 0000003dH
00208 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
0020b 50 push eax
0020c 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0020f e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 524 : add_index++;
00214 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00217 83 c0 01 add eax, 1
0021a 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 525 :
; 526 : destination.SetSize( add_index );
0021d 6a ff push -1
0021f 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
00222 50 push eax
00223 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00226 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 527 : return( TRUE );
0022b b8 01 00 00 00 mov eax, 1
00230 e9 a7 00 00 00 jmp $LN1@Encode
; 528 : }
00235 eb 0b jmp SHORT $LN7@Encode
$LN6@Encode:
; 529 : else
; 530 : {
; 531 : byte_3 = input_buffer[ source_index ];
00237 8b 45 a4 mov eax, DWORD PTR _input_buffer$[ebp]
0023a 03 45 b0 add eax, DWORD PTR _source_index$[ebp]
0023d 8a 08 mov cl, BYTE PTR [eax]
0023f 88 4d a8 mov BYTE PTR _byte_3$[ebp], cl
$LN7@Encode:
; 532 : }
; 533 :
; 534 : source_index++;
00242 8b 45 b0 mov eax, DWORD PTR _source_index$[ebp]
00245 83 c0 01 add eax, 1
00248 89 45 b0 mov DWORD PTR _source_index$[ebp], eax
; 535 :
; 536 : byte_to_add = alphabet[ ( ( ( byte_2 & 0x0F ) << 2 ) | ( ( byte_3 & 0xC0 ) >> 6 ) ) ];
0024b 0f b6 45 a9 movzx eax, BYTE PTR _byte_2$[ebp]
0024f 83 e0 0f and eax, 15 ; 0000000fH
00252 c1 e0 02 shl eax, 2
00255 0f b6 4d a8 movzx ecx, BYTE PTR _byte_3$[ebp]
00259 81 e1 c0 00 00
00 and ecx, 192 ; 000000c0H
0025f c1 f9 06 sar ecx, 6
00262 0b c1 or eax, ecx
00264 8a 54 05 b4 mov dl, BYTE PTR _alphabet$[ebp+eax]
00268 88 55 ab mov BYTE PTR _byte_to_add$[ebp], dl
; 537 :
; 538 : destination.SetAt( add_index, byte_to_add );
0026b 0f b6 45 ab movzx eax, BYTE PTR _byte_to_add$[ebp]
0026f 50 push eax
00270 8b 4d a0 mov ecx, DWORD PTR _add_index$[ebp]
00273 51 push ecx
00274 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00277 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 539 : add_index++;
0027c 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
0027f 83 c0 01 add eax, 1
00282 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 540 :
; 541 : byte_to_add = alphabet[ ( byte_3 & 0x3F ) ];
00285 0f b6 45 a8 movzx eax, BYTE PTR _byte_3$[ebp]
00289 83 e0 3f and eax, 63 ; 0000003fH
0028c 8a 4c 05 b4 mov cl, BYTE PTR _alphabet$[ebp+eax]
00290 88 4d ab mov BYTE PTR _byte_to_add$[ebp], cl
; 542 :
; 543 : destination.SetAt( add_index, byte_to_add );
00293 0f b6 45 ab movzx eax, BYTE PTR _byte_to_add$[ebp]
00297 50 push eax
00298 8b 4d a0 mov ecx, DWORD PTR _add_index$[ebp]
0029b 51 push ecx
0029c 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0029f e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 544 : add_index++;
002a4 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
002a7 83 c0 01 add eax, 1
002aa 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 545 : }
002ad e9 e6 fd ff ff jmp $LN2@Encode
$LN3@Encode:
; 546 :
; 547 : destination.SetAt( add_index, END_OF_BASE64_ENCODED_DATA );
002b2 6a 3d push 61 ; 0000003dH
002b4 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
002b7 50 push eax
002b8 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
002bb e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 548 : add_index++;
002c0 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
002c3 83 c0 01 add eax, 1
002c6 89 45 a0 mov DWORD PTR _add_index$[ebp], eax
; 549 :
; 550 : destination.SetSize( add_index );
002c9 6a ff push -1
002cb 8b 45 a0 mov eax, DWORD PTR _add_index$[ebp]
002ce 50 push eax
002cf 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
002d2 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 551 : return( TRUE );
002d7 b8 01 00 00 00 mov eax, 1
$LN1@Encode:
; 552 : }
002dc 5f pop edi
002dd 5e pop esi
002de 5b pop ebx
002df 8b 4d fc mov ecx, DWORD PTR __$ArrayPad$[ebp]
002e2 33 cd xor ecx, ebp
002e4 e8 00 00 00 00 call @__security_check_cookie@4
002e9 8b e5 mov esp, ebp
002eb 5d pop ebp
002ec c2 08 00 ret 8
?Encode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z ENDP ; CBase64Coding::Encode
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?Decode@CBase64Coding@@UAEHABV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@AAVCByteArray@@@Z
_TEXT SEGMENT
_input_buffer$ = -32 ; size = 4
_add_index$ = -28 ; size = 4
_number_of_bytes_to_decode$ = -24 ; size = 4
_index$ = -20 ; size = 4
_character_4$ = -13 ; size = 1
_character_3$ = -12 ; size = 1
_character_2$ = -11 ; size = 1
_character_1$ = -10 ; size = 1
_byte_to_add$ = -9 ; size = 1
_return_value$ = -8 ; size = 4
_this$ = -4 ; size = 4
_source$ = 8 ; size = 4
_destination$ = 12 ; size = 4
?Decode@CBase64Coding@@UAEHABV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@AAVCByteArray@@@Z PROC ; CBase64Coding::Decode, COMDAT
; _this$ = ecx
; 302 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 60 sub esp, 96 ; 00000060H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 303 :
; 304 : if ( m_DecoderTable[ 0 ] == 0x00 )
0000c b8 01 00 00 00 mov eax, 1
00011 6b c8 00 imul ecx, eax, 0
00014 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00017 0f b6 44 0a 04 movzx eax, BYTE PTR [edx+ecx+4]
0001c 85 c0 test eax, eax
0001e 75 0c jne SHORT $LN4@Decode
; 305 : {
; 306 : m_InitializeDecoderTable();
00020 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00023 8b 10 mov edx, DWORD PTR [eax]
00025 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00028 8b 02 mov eax, DWORD PTR [edx]
0002a ff d0 call eax
$LN4@Decode:
; 307 : }
; 308 :
; 309 : BOOL return_value = TRUE; //Ĭ<>Ϸ<EFBFBD><CFB7>سɹ<D8B3>
0002c c7 45 f8 01 00
00 00 mov DWORD PTR _return_value$[ebp], 1
; 310 :
; 311 : BYTE byte_to_add = 0;
00033 c6 45 f7 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 312 : BYTE character_1 = 0;
00037 c6 45 f6 00 mov BYTE PTR _character_1$[ebp], 0
; 313 : BYTE character_2 = 0;
0003b c6 45 f5 00 mov BYTE PTR _character_2$[ebp], 0
; 314 : BYTE character_3 = 0;
0003f c6 45 f4 00 mov BYTE PTR _character_3$[ebp], 0
; 315 : BYTE character_4 = 0;
00043 c6 45 f3 00 mov BYTE PTR _character_4$[ebp], 0
; 316 :
; 317 : int index = 0;
00047 c7 45 ec 00 00
00 00 mov DWORD PTR _index$[ebp], 0
; 318 : int number_of_bytes_to_decode = source.GetLength();
0004e 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00051 e8 00 00 00 00 call ?GetLength@?$CSimpleStringT@D$0A@@ATL@@QBEHXZ ; ATL::CSimpleStringT<char,0>::GetLength
00056 89 45 e8 mov DWORD PTR _number_of_bytes_to_decode$[ebp], eax
; 319 :
; 320 : DWORD add_index = (DWORD) ( (double) number_of_bytes_to_decode * (double) 0.75 ) + 1;
00059 f2 0f 2a 45 e8 cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_decode$[ebp]
0005e f2 0f 59 05 00
00 00 00 mulsd xmm0, QWORD PTR __real@3fe8000000000000
00066 e8 00 00 00 00 call __dtol3
0006b 83 c0 01 add eax, 1
0006e 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 321 :
; 322 : destination.SetSize( add_index );
00071 6a ff push -1
00073 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
00076 50 push eax
00077 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0007a e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 323 : add_index = 0;
0007f c7 45 e4 00 00
00 00 mov DWORD PTR _add_index$[ebp], 0
; 324 :
; 325 : // Since we're decoding, we are most likely in a performance-minded
; 326 : // part of an application, let's go for a speedy method for accessing
; 327 : // the source data.
; 328 :
; 329 : char * input_buffer = (char*)(const char *)source;
00086 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00089 e8 00 00 00 00 call ??B?$CSimpleStringT@D$0A@@ATL@@QBEPBDXZ ; ATL::CSimpleStringT<char,0>::operator char const *
0008e 89 45 e0 mov DWORD PTR _input_buffer$[ebp], eax
$LN2@Decode:
; 330 :
; 331 : while( index < number_of_bytes_to_decode )
00091 8b 45 ec mov eax, DWORD PTR _index$[ebp]
00094 3b 45 e8 cmp eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
00097 0f 8d b8 02 00
00 jge $LN3@Decode
; 332 : {
; 333 : character_1 = __get_character( reinterpret_cast< const BYTE * >( input_buffer ), m_DecoderTable, index, number_of_bytes_to_decode );
0009d 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
000a0 50 push eax
000a1 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
000a4 51 push ecx
000a5 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000a8 83 c2 04 add edx, 4
000ab 52 push edx
000ac 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
000af 50 push eax
000b0 e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
000b5 83 c4 10 add esp, 16 ; 00000010H
000b8 88 45 f6 mov BYTE PTR _character_1$[ebp], al
; 334 :
; 335 : if ( character_1 != END_OF_BASE64_ENCODED_DATA )
000bb 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
000bf 83 f8 3d cmp eax, 61 ; 0000003dH
000c2 0f 84 4b 01 00
00 je $LN5@Decode
; 336 : {
; 337 : if ( m_DecoderTable[ character_1 ] == BASE64_UNKNOWN_VALUE )
000c8 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
000cc 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
000cf 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
000d4 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
000da 75 0f jne SHORT $LN7@Decode
; 338 : {
; 339 : destination.RemoveAll();
000dc 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
000df e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 340 : return( FALSE );
000e4 33 c0 xor eax, eax
000e6 e9 7b 02 00 00 jmp $LN1@Decode
$LN7@Decode:
; 341 : }
; 342 :
; 343 : character_2 = __get_character( reinterpret_cast< const BYTE * >( input_buffer ), m_DecoderTable, index, number_of_bytes_to_decode );
000eb 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
000ee 50 push eax
000ef 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
000f2 51 push ecx
000f3 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000f6 83 c2 04 add edx, 4
000f9 52 push edx
000fa 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
000fd 50 push eax
000fe e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
00103 83 c4 10 add esp, 16 ; 00000010H
00106 88 45 f5 mov BYTE PTR _character_2$[ebp], al
; 344 :
; 345 : if ( character_2 != END_OF_BASE64_ENCODED_DATA )
00109 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0010d 83 f8 3d cmp eax, 61 ; 0000003dH
00110 0f 84 f3 00 00
00 je $LN8@Decode
; 346 : {
; 347 : if ( m_DecoderTable[ character_2 ] == BASE64_UNKNOWN_VALUE )
00116 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0011a 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0011d 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
00122 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
00128 75 0f jne SHORT $LN10@Decode
; 348 : {
; 349 : destination.RemoveAll();
0012a 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0012d e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 350 : return( FALSE );
00132 33 c0 xor eax, eax
00134 e9 2d 02 00 00 jmp $LN1@Decode
$LN10@Decode:
; 351 : }
; 352 :
; 353 : character_3 = __get_character( reinterpret_cast< const BYTE * >( input_buffer ), m_DecoderTable, index, number_of_bytes_to_decode );
00139 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
0013c 50 push eax
0013d 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
00140 51 push ecx
00141 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00144 83 c2 04 add edx, 4
00147 52 push edx
00148 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
0014b 50 push eax
0014c e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
00151 83 c4 10 add esp, 16 ; 00000010H
00154 88 45 f4 mov BYTE PTR _character_3$[ebp], al
; 354 :
; 355 : if ( character_3 != END_OF_BASE64_ENCODED_DATA )
00157 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
0015b 83 f8 3d cmp eax, 61 ; 0000003dH
0015e 0f 84 9f 00 00
00 je $LN11@Decode
; 356 : {
; 357 : if ( m_DecoderTable[ character_3 ] == BASE64_UNKNOWN_VALUE )
00164 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
00168 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0016b 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
00170 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
00176 75 0f jne SHORT $LN13@Decode
; 358 : {
; 359 : destination.RemoveAll();
00178 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0017b e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 360 : return( FALSE );
00180 33 c0 xor eax, eax
00182 e9 df 01 00 00 jmp $LN1@Decode
$LN13@Decode:
; 361 : }
; 362 :
; 363 : character_4 = __get_character( reinterpret_cast< const BYTE * >( input_buffer ), m_DecoderTable, index, number_of_bytes_to_decode );
00187 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
0018a 50 push eax
0018b 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
0018e 51 push ecx
0018f 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00192 83 c2 04 add edx, 4
00195 52 push edx
00196 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
00199 50 push eax
0019a e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
0019f 83 c4 10 add esp, 16 ; 00000010H
001a2 88 45 f3 mov BYTE PTR _character_4$[ebp], al
; 364 :
; 365 : if ( character_4 != END_OF_BASE64_ENCODED_DATA )
001a5 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
001a9 83 f8 3d cmp eax, 61 ; 0000003dH
001ac 74 23 je SHORT $LN15@Decode
; 366 : {
; 367 : if ( m_DecoderTable[ character_4 ] == BASE64_UNKNOWN_VALUE )
001ae 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
001b2 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
001b5 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
001ba 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
001c0 75 0f jne SHORT $LN15@Decode
; 368 : {
; 369 : destination.RemoveAll();
001c2 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
001c5 e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 370 : return( FALSE );
001ca 33 c0 xor eax, eax
001cc e9 95 01 00 00 jmp $LN1@Decode
$LN15@Decode:
; 371 : }
; 372 : }
; 373 :
; 374 : if ( character_2 == BASE64_END_OF_BUFFER ||
; 375 : character_3 == BASE64_END_OF_BUFFER ||
001d1 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
001d5 3d fd 00 00 00 cmp eax, 253 ; 000000fdH
001da 74 16 je SHORT $LN17@Decode
001dc 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
001e0 3d fd 00 00 00 cmp eax, 253 ; 000000fdH
001e5 74 0b je SHORT $LN17@Decode
001e7 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
001eb 3d fd 00 00 00 cmp eax, 253 ; 000000fdH
001f0 75 0f jne SHORT $LN16@Decode
$LN17@Decode:
; 376 : character_4 == BASE64_END_OF_BUFFER )
; 377 : {
; 378 : destination.RemoveAll();
001f2 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
001f5 e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 379 : return( FALSE );
001fa 33 c0 xor eax, eax
001fc e9 65 01 00 00 jmp $LN1@Decode
$LN16@Decode:
; 380 : }
; 381 : }
00201 eb 04 jmp SHORT $LN12@Decode
$LN11@Decode:
; 382 : else
; 383 : {
; 384 : character_4 = END_OF_BASE64_ENCODED_DATA;
00203 c6 45 f3 3d mov BYTE PTR _character_4$[ebp], 61 ; 0000003dH
$LN12@Decode:
; 385 : }
; 386 : }
00207 eb 08 jmp SHORT $LN9@Decode
$LN8@Decode:
; 387 : else
; 388 : {
; 389 : character_3 = END_OF_BASE64_ENCODED_DATA;
00209 c6 45 f4 3d mov BYTE PTR _character_3$[ebp], 61 ; 0000003dH
; 390 : character_4 = END_OF_BASE64_ENCODED_DATA;
0020d c6 45 f3 3d mov BYTE PTR _character_4$[ebp], 61 ; 0000003dH
$LN9@Decode:
; 391 : }
; 392 : }
00211 eb 0c jmp SHORT $LN6@Decode
$LN5@Decode:
; 393 : else
; 394 : {
; 395 : character_2 = END_OF_BASE64_ENCODED_DATA;
00213 c6 45 f5 3d mov BYTE PTR _character_2$[ebp], 61 ; 0000003dH
; 396 : character_3 = END_OF_BASE64_ENCODED_DATA;
00217 c6 45 f4 3d mov BYTE PTR _character_3$[ebp], 61 ; 0000003dH
; 397 : character_4 = END_OF_BASE64_ENCODED_DATA;
0021b c6 45 f3 3d mov BYTE PTR _character_4$[ebp], 61 ; 0000003dH
$LN6@Decode:
; 398 : }
; 399 :
; 400 : if ( character_1 == END_OF_BASE64_ENCODED_DATA ||
0021f 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
00223 83 f8 3d cmp eax, 61 ; 0000003dH
00226 74 09 je SHORT $LN19@Decode
00228 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0022c 83 f8 3d cmp eax, 61 ; 0000003dH
0022f 75 18 jne SHORT $LN18@Decode
$LN19@Decode:
; 401 : character_2 == END_OF_BASE64_ENCODED_DATA )
; 402 : {
; 403 : destination.SetSize( add_index );
00231 6a ff push -1
00233 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
00236 50 push eax
00237 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0023a e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 404 : return( TRUE );
0023f b8 01 00 00 00 mov eax, 1
00244 e9 1d 01 00 00 jmp $LN1@Decode
$LN18@Decode:
; 405 : }
; 406 :
; 407 : character_1 = m_DecoderTable[ character_1 ];
00249 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
0024d 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00250 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
00254 88 55 f6 mov BYTE PTR _character_1$[ebp], dl
; 408 : character_2 = m_DecoderTable[ character_2 ];
00257 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0025b 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0025e 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
00262 88 55 f5 mov BYTE PTR _character_2$[ebp], dl
; 409 :
; 410 : byte_to_add = static_cast< BYTE>( ( ( character_1 << 2 ) | ( ( character_2 & 0x30 ) >> 4 ) ) );
00265 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
00269 c1 e0 02 shl eax, 2
0026c 0f b6 4d f5 movzx ecx, BYTE PTR _character_2$[ebp]
00270 83 e1 30 and ecx, 48 ; 00000030H
00273 c1 f9 04 sar ecx, 4
00276 0b c1 or eax, ecx
00278 88 45 f7 mov BYTE PTR _byte_to_add$[ebp], al
; 411 :
; 412 : destination.SetAt( add_index, byte_to_add );
0027b 0f b6 45 f7 movzx eax, BYTE PTR _byte_to_add$[ebp]
0027f 50 push eax
00280 8b 4d e4 mov ecx, DWORD PTR _add_index$[ebp]
00283 51 push ecx
00284 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00287 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 413 : add_index++;
0028c 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
0028f 83 c0 01 add eax, 1
00292 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 414 :
; 415 : if ( character_3 == END_OF_BASE64_ENCODED_DATA )
00295 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
00299 83 f8 3d cmp eax, 61 ; 0000003dH
0029c 75 18 jne SHORT $LN20@Decode
; 416 : {
; 417 : destination.SetSize( add_index );
0029e 6a ff push -1
002a0 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
002a3 50 push eax
002a4 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
002a7 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 418 : return( TRUE );
002ac b8 01 00 00 00 mov eax, 1
002b1 e9 b0 00 00 00 jmp $LN1@Decode
$LN20@Decode:
; 419 : }
; 420 :
; 421 : character_3 = m_DecoderTable[ character_3 ];
002b6 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
002ba 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
002bd 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
002c1 88 55 f4 mov BYTE PTR _character_3$[ebp], dl
; 422 :
; 423 : byte_to_add = static_cast< BYTE >( ( ( ( ( character_2 & 0x0F ) << 4 ) | ( ( character_3 & 0x3C ) >> 2 ) ) ) );
002c4 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
002c8 83 e0 0f and eax, 15 ; 0000000fH
002cb c1 e0 04 shl eax, 4
002ce 0f b6 4d f4 movzx ecx, BYTE PTR _character_3$[ebp]
002d2 83 e1 3c and ecx, 60 ; 0000003cH
002d5 c1 f9 02 sar ecx, 2
002d8 0b c1 or eax, ecx
002da 88 45 f7 mov BYTE PTR _byte_to_add$[ebp], al
; 424 :
; 425 : destination.SetAt( add_index, byte_to_add );
002dd 0f b6 45 f7 movzx eax, BYTE PTR _byte_to_add$[ebp]
002e1 50 push eax
002e2 8b 4d e4 mov ecx, DWORD PTR _add_index$[ebp]
002e5 51 push ecx
002e6 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
002e9 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 426 : add_index++;
002ee 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
002f1 83 c0 01 add eax, 1
002f4 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 427 :
; 428 : if ( character_4 == END_OF_BASE64_ENCODED_DATA )
002f7 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
002fb 83 f8 3d cmp eax, 61 ; 0000003dH
002fe 75 15 jne SHORT $LN21@Decode
; 429 : {
; 430 : destination.SetSize( add_index );
00300 6a ff push -1
00302 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
00305 50 push eax
00306 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00309 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 431 : return( TRUE );
0030e b8 01 00 00 00 mov eax, 1
00313 eb 51 jmp SHORT $LN1@Decode
$LN21@Decode:
; 432 : }
; 433 :
; 434 : character_4 = m_DecoderTable[ character_4 ];
00315 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
00319 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0031c 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
00320 88 55 f3 mov BYTE PTR _character_4$[ebp], dl
; 435 :
; 436 : byte_to_add = static_cast< BYTE >( ( ( ( character_3 & 0x03 ) << 6 ) | character_4 ) );
00323 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
00327 83 e0 03 and eax, 3
0032a c1 e0 06 shl eax, 6
0032d 0f b6 4d f3 movzx ecx, BYTE PTR _character_4$[ebp]
00331 0b c1 or eax, ecx
00333 88 45 f7 mov BYTE PTR _byte_to_add$[ebp], al
; 437 :
; 438 : destination.SetAt( add_index, byte_to_add );
00336 0f b6 45 f7 movzx eax, BYTE PTR _byte_to_add$[ebp]
0033a 50 push eax
0033b 8b 4d e4 mov ecx, DWORD PTR _add_index$[ebp]
0033e 51 push ecx
0033f 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00342 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 439 : add_index++;
00347 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
0034a 83 c0 01 add eax, 1
0034d 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 440 : }
00350 e9 3c fd ff ff jmp $LN2@Decode
$LN3@Decode:
; 441 :
; 442 : destination.SetSize( add_index );
00355 6a ff push -1
00357 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
0035a 50 push eax
0035b 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0035e e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 443 :
; 444 : return( return_value );
00363 8b 45 f8 mov eax, DWORD PTR _return_value$[ebp]
$LN1@Decode:
; 445 : }
00366 5f pop edi
00367 5e pop esi
00368 5b pop ebx
00369 8b e5 mov esp, ebp
0036b 5d pop ebp
0036c c2 08 00 ret 8
?Decode@CBase64Coding@@UAEHABV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@AAVCByteArray@@@Z ENDP ; CBase64Coding::Decode
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?Decode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z
_TEXT SEGMENT
_input_buffer$ = -32 ; size = 4
_add_index$ = -28 ; size = 4
_number_of_bytes_to_decode$ = -24 ; size = 4
_index$ = -20 ; size = 4
_character_4$ = -13 ; size = 1
_character_3$ = -12 ; size = 1
_character_2$ = -11 ; size = 1
_character_1$ = -10 ; size = 1
_byte_to_add$ = -9 ; size = 1
_return_value$ = -8 ; size = 4
_this$ = -4 ; size = 4
_source$ = 8 ; size = 4
_destination$ = 12 ; size = 4
?Decode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z PROC ; CBase64Coding::Decode, COMDAT
; _this$ = ecx
; 156 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 60 sub esp, 96 ; 00000060H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 157 :
; 158 : if ( m_DecoderTable[ 0 ] == 0x00 )
0000c b8 01 00 00 00 mov eax, 1
00011 6b c8 00 imul ecx, eax, 0
00014 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00017 0f b6 44 0a 04 movzx eax, BYTE PTR [edx+ecx+4]
0001c 85 c0 test eax, eax
0001e 75 0c jne SHORT $LN4@Decode
; 159 : {
; 160 : m_InitializeDecoderTable();
00020 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00023 8b 10 mov edx, DWORD PTR [eax]
00025 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00028 8b 02 mov eax, DWORD PTR [edx]
0002a ff d0 call eax
$LN4@Decode:
; 161 : }
; 162 :
; 163 : BOOL return_value = FALSE;
0002c c7 45 f8 00 00
00 00 mov DWORD PTR _return_value$[ebp], 0
; 164 :
; 165 : BYTE byte_to_add = 0;
00033 c6 45 f7 00 mov BYTE PTR _byte_to_add$[ebp], 0
; 166 : BYTE character_1 = 0;
00037 c6 45 f6 00 mov BYTE PTR _character_1$[ebp], 0
; 167 : BYTE character_2 = 0;
0003b c6 45 f5 00 mov BYTE PTR _character_2$[ebp], 0
; 168 : BYTE character_3 = 0;
0003f c6 45 f4 00 mov BYTE PTR _character_3$[ebp], 0
; 169 : BYTE character_4 = 0;
00043 c6 45 f3 00 mov BYTE PTR _character_4$[ebp], 0
; 170 :
; 171 : int index = 0;
00047 c7 45 ec 00 00
00 00 mov DWORD PTR _index$[ebp], 0
; 172 : int number_of_bytes_to_decode = (int)source.GetSize();
0004e 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00051 e8 00 00 00 00 call ?GetSize@CByteArray@@QBEHXZ ; CByteArray::GetSize
00056 89 45 e8 mov DWORD PTR _number_of_bytes_to_decode$[ebp], eax
; 173 :
; 174 : DWORD add_index = (DWORD) ( (double) number_of_bytes_to_decode * (double) 0.75 ) + 1;
00059 f2 0f 2a 45 e8 cvtsi2sd xmm0, DWORD PTR _number_of_bytes_to_decode$[ebp]
0005e f2 0f 59 05 00
00 00 00 mulsd xmm0, QWORD PTR __real@3fe8000000000000
00066 e8 00 00 00 00 call __dtol3
0006b 83 c0 01 add eax, 1
0006e 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 175 :
; 176 : destination.SetSize( add_index );
00071 6a ff push -1
00073 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
00076 50 push eax
00077 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0007a e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 177 : add_index = 0;
0007f c7 45 e4 00 00
00 00 mov DWORD PTR _add_index$[ebp], 0
; 178 :
; 179 : // Since we're decoding, we are most likely in a performance-minded
; 180 : // part of an application, let's go for a speedy method for accessing
; 181 : // the source data.
; 182 :
; 183 : const BYTE * input_buffer = source.GetData();
00086 8b 4d 08 mov ecx, DWORD PTR _source$[ebp]
00089 e8 00 00 00 00 call ?GetData@CByteArray@@QBEPBEXZ ; CByteArray::GetData
0008e 89 45 e0 mov DWORD PTR _input_buffer$[ebp], eax
$LN2@Decode:
; 184 :
; 185 : while( index < number_of_bytes_to_decode )
00091 8b 45 ec mov eax, DWORD PTR _index$[ebp]
00094 3b 45 e8 cmp eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
00097 0f 8d b8 02 00
00 jge $LN3@Decode
; 186 : {
; 187 : character_1 = __get_character( input_buffer, m_DecoderTable, index, number_of_bytes_to_decode );
0009d 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
000a0 50 push eax
000a1 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
000a4 51 push ecx
000a5 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000a8 83 c2 04 add edx, 4
000ab 52 push edx
000ac 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
000af 50 push eax
000b0 e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
000b5 83 c4 10 add esp, 16 ; 00000010H
000b8 88 45 f6 mov BYTE PTR _character_1$[ebp], al
; 188 :
; 189 : if ( character_1 != END_OF_BASE64_ENCODED_DATA )
000bb 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
000bf 83 f8 3d cmp eax, 61 ; 0000003dH
000c2 0f 84 4b 01 00
00 je $LN5@Decode
; 190 : {
; 191 : if ( m_DecoderTable[ character_1 ] == BASE64_UNKNOWN_VALUE )
000c8 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
000cc 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
000cf 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
000d4 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
000da 75 0f jne SHORT $LN7@Decode
; 192 : {
; 193 : destination.RemoveAll();
000dc 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
000df e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 194 : return( FALSE );
000e4 33 c0 xor eax, eax
000e6 e9 7b 02 00 00 jmp $LN1@Decode
$LN7@Decode:
; 195 : }
; 196 :
; 197 : character_2 = __get_character( input_buffer, m_DecoderTable, index, number_of_bytes_to_decode );
000eb 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
000ee 50 push eax
000ef 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
000f2 51 push ecx
000f3 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000f6 83 c2 04 add edx, 4
000f9 52 push edx
000fa 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
000fd 50 push eax
000fe e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
00103 83 c4 10 add esp, 16 ; 00000010H
00106 88 45 f5 mov BYTE PTR _character_2$[ebp], al
; 198 :
; 199 : if ( character_2 != END_OF_BASE64_ENCODED_DATA )
00109 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0010d 83 f8 3d cmp eax, 61 ; 0000003dH
00110 0f 84 f3 00 00
00 je $LN8@Decode
; 200 : {
; 201 : if ( m_DecoderTable[ character_2 ] == BASE64_UNKNOWN_VALUE )
00116 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0011a 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0011d 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
00122 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
00128 75 0f jne SHORT $LN10@Decode
; 202 : {
; 203 : destination.RemoveAll();
0012a 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0012d e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 204 : return( FALSE );
00132 33 c0 xor eax, eax
00134 e9 2d 02 00 00 jmp $LN1@Decode
$LN10@Decode:
; 205 : }
; 206 :
; 207 : character_3 = __get_character( input_buffer, m_DecoderTable, index, number_of_bytes_to_decode );
00139 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
0013c 50 push eax
0013d 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
00140 51 push ecx
00141 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00144 83 c2 04 add edx, 4
00147 52 push edx
00148 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
0014b 50 push eax
0014c e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
00151 83 c4 10 add esp, 16 ; 00000010H
00154 88 45 f4 mov BYTE PTR _character_3$[ebp], al
; 208 :
; 209 : if ( character_3 != END_OF_BASE64_ENCODED_DATA )
00157 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
0015b 83 f8 3d cmp eax, 61 ; 0000003dH
0015e 0f 84 9f 00 00
00 je $LN11@Decode
; 210 : {
; 211 : if ( m_DecoderTable[ character_3 ] == BASE64_UNKNOWN_VALUE )
00164 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
00168 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0016b 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
00170 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
00176 75 0f jne SHORT $LN13@Decode
; 212 : {
; 213 : destination.RemoveAll();
00178 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0017b e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 214 : return( FALSE );
00180 33 c0 xor eax, eax
00182 e9 df 01 00 00 jmp $LN1@Decode
$LN13@Decode:
; 215 : }
; 216 :
; 217 : character_4 = __get_character( input_buffer, m_DecoderTable, index, number_of_bytes_to_decode );
00187 8b 45 e8 mov eax, DWORD PTR _number_of_bytes_to_decode$[ebp]
0018a 50 push eax
0018b 8d 4d ec lea ecx, DWORD PTR _index$[ebp]
0018e 51 push ecx
0018f 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00192 83 c2 04 add edx, 4
00195 52 push edx
00196 8b 45 e0 mov eax, DWORD PTR _input_buffer$[ebp]
00199 50 push eax
0019a e8 00 00 00 00 call ?__get_character@@YAEPBE0AAHH@Z ; __get_character
0019f 83 c4 10 add esp, 16 ; 00000010H
001a2 88 45 f3 mov BYTE PTR _character_4$[ebp], al
; 218 :
; 219 : if ( character_4 != END_OF_BASE64_ENCODED_DATA )
001a5 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
001a9 83 f8 3d cmp eax, 61 ; 0000003dH
001ac 74 23 je SHORT $LN15@Decode
; 220 : {
; 221 : if ( m_DecoderTable[ character_4 ] == BASE64_UNKNOWN_VALUE )
001ae 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
001b2 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
001b5 0f b6 54 01 04 movzx edx, BYTE PTR [ecx+eax+4]
001ba 81 fa ff 00 00
00 cmp edx, 255 ; 000000ffH
001c0 75 0f jne SHORT $LN15@Decode
; 222 : {
; 223 : destination.RemoveAll();
001c2 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
001c5 e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 224 : return( FALSE );
001ca 33 c0 xor eax, eax
001cc e9 95 01 00 00 jmp $LN1@Decode
$LN15@Decode:
; 225 : }
; 226 : }
; 227 :
; 228 : if ( character_2 == BASE64_END_OF_BUFFER ||
; 229 : character_3 == BASE64_END_OF_BUFFER ||
001d1 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
001d5 3d fd 00 00 00 cmp eax, 253 ; 000000fdH
001da 74 16 je SHORT $LN17@Decode
001dc 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
001e0 3d fd 00 00 00 cmp eax, 253 ; 000000fdH
001e5 74 0b je SHORT $LN17@Decode
001e7 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
001eb 3d fd 00 00 00 cmp eax, 253 ; 000000fdH
001f0 75 0f jne SHORT $LN16@Decode
$LN17@Decode:
; 230 : character_4 == BASE64_END_OF_BUFFER )
; 231 : {
; 232 : destination.RemoveAll();
001f2 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
001f5 e8 00 00 00 00 call ?RemoveAll@CByteArray@@QAEXXZ ; CByteArray::RemoveAll
; 233 : return( FALSE );
001fa 33 c0 xor eax, eax
001fc e9 65 01 00 00 jmp $LN1@Decode
$LN16@Decode:
; 234 : }
; 235 : }
00201 eb 04 jmp SHORT $LN12@Decode
$LN11@Decode:
; 236 : else
; 237 : {
; 238 : character_4 = END_OF_BASE64_ENCODED_DATA;
00203 c6 45 f3 3d mov BYTE PTR _character_4$[ebp], 61 ; 0000003dH
$LN12@Decode:
; 239 : }
; 240 : }
00207 eb 08 jmp SHORT $LN9@Decode
$LN8@Decode:
; 241 : else
; 242 : {
; 243 : character_3 = END_OF_BASE64_ENCODED_DATA;
00209 c6 45 f4 3d mov BYTE PTR _character_3$[ebp], 61 ; 0000003dH
; 244 : character_4 = END_OF_BASE64_ENCODED_DATA;
0020d c6 45 f3 3d mov BYTE PTR _character_4$[ebp], 61 ; 0000003dH
$LN9@Decode:
; 245 : }
; 246 : }
00211 eb 0c jmp SHORT $LN6@Decode
$LN5@Decode:
; 247 : else
; 248 : {
; 249 : character_2 = END_OF_BASE64_ENCODED_DATA;
00213 c6 45 f5 3d mov BYTE PTR _character_2$[ebp], 61 ; 0000003dH
; 250 : character_3 = END_OF_BASE64_ENCODED_DATA;
00217 c6 45 f4 3d mov BYTE PTR _character_3$[ebp], 61 ; 0000003dH
; 251 : character_4 = END_OF_BASE64_ENCODED_DATA;
0021b c6 45 f3 3d mov BYTE PTR _character_4$[ebp], 61 ; 0000003dH
$LN6@Decode:
; 252 : }
; 253 :
; 254 : if ( character_1 == END_OF_BASE64_ENCODED_DATA ||
0021f 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
00223 83 f8 3d cmp eax, 61 ; 0000003dH
00226 74 09 je SHORT $LN19@Decode
00228 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0022c 83 f8 3d cmp eax, 61 ; 0000003dH
0022f 75 18 jne SHORT $LN18@Decode
$LN19@Decode:
; 255 : character_2 == END_OF_BASE64_ENCODED_DATA )
; 256 : {
; 257 : destination.SetSize( add_index );
00231 6a ff push -1
00233 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
00236 50 push eax
00237 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0023a e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 258 : return( TRUE );
0023f b8 01 00 00 00 mov eax, 1
00244 e9 1d 01 00 00 jmp $LN1@Decode
$LN18@Decode:
; 259 : }
; 260 :
; 261 : character_1 = m_DecoderTable[ character_1 ];
00249 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
0024d 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00250 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
00254 88 55 f6 mov BYTE PTR _character_1$[ebp], dl
; 262 : character_2 = m_DecoderTable[ character_2 ];
00257 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
0025b 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0025e 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
00262 88 55 f5 mov BYTE PTR _character_2$[ebp], dl
; 263 :
; 264 : byte_to_add = static_cast< BYTE>( ( ( character_1 << 2 ) | ( ( character_2 & 0x30 ) >> 4 ) ) );
00265 0f b6 45 f6 movzx eax, BYTE PTR _character_1$[ebp]
00269 c1 e0 02 shl eax, 2
0026c 0f b6 4d f5 movzx ecx, BYTE PTR _character_2$[ebp]
00270 83 e1 30 and ecx, 48 ; 00000030H
00273 c1 f9 04 sar ecx, 4
00276 0b c1 or eax, ecx
00278 88 45 f7 mov BYTE PTR _byte_to_add$[ebp], al
; 265 :
; 266 : destination.SetAt( add_index, byte_to_add );
0027b 0f b6 45 f7 movzx eax, BYTE PTR _byte_to_add$[ebp]
0027f 50 push eax
00280 8b 4d e4 mov ecx, DWORD PTR _add_index$[ebp]
00283 51 push ecx
00284 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00287 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 267 : add_index++;
0028c 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
0028f 83 c0 01 add eax, 1
00292 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 268 :
; 269 : if ( character_3 == END_OF_BASE64_ENCODED_DATA )
00295 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
00299 83 f8 3d cmp eax, 61 ; 0000003dH
0029c 75 18 jne SHORT $LN20@Decode
; 270 : {
; 271 : destination.SetSize( add_index );
0029e 6a ff push -1
002a0 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
002a3 50 push eax
002a4 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
002a7 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 272 : return( TRUE );
002ac b8 01 00 00 00 mov eax, 1
002b1 e9 b0 00 00 00 jmp $LN1@Decode
$LN20@Decode:
; 273 : }
; 274 :
; 275 : character_3 = m_DecoderTable[ character_3 ];
002b6 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
002ba 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
002bd 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
002c1 88 55 f4 mov BYTE PTR _character_3$[ebp], dl
; 276 :
; 277 : byte_to_add = static_cast< BYTE >( ( ( ( ( character_2 & 0x0F ) << 4 ) | ( ( character_3 & 0x3C ) >> 2 ) ) ) );
002c4 0f b6 45 f5 movzx eax, BYTE PTR _character_2$[ebp]
002c8 83 e0 0f and eax, 15 ; 0000000fH
002cb c1 e0 04 shl eax, 4
002ce 0f b6 4d f4 movzx ecx, BYTE PTR _character_3$[ebp]
002d2 83 e1 3c and ecx, 60 ; 0000003cH
002d5 c1 f9 02 sar ecx, 2
002d8 0b c1 or eax, ecx
002da 88 45 f7 mov BYTE PTR _byte_to_add$[ebp], al
; 278 :
; 279 : destination.SetAt( add_index, byte_to_add );
002dd 0f b6 45 f7 movzx eax, BYTE PTR _byte_to_add$[ebp]
002e1 50 push eax
002e2 8b 4d e4 mov ecx, DWORD PTR _add_index$[ebp]
002e5 51 push ecx
002e6 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
002e9 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 280 : add_index++;
002ee 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
002f1 83 c0 01 add eax, 1
002f4 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 281 :
; 282 : if ( character_4 == END_OF_BASE64_ENCODED_DATA )
002f7 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
002fb 83 f8 3d cmp eax, 61 ; 0000003dH
002fe 75 15 jne SHORT $LN21@Decode
; 283 : {
; 284 : destination.SetSize( add_index );
00300 6a ff push -1
00302 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
00305 50 push eax
00306 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00309 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 285 : return( TRUE );
0030e b8 01 00 00 00 mov eax, 1
00313 eb 51 jmp SHORT $LN1@Decode
$LN21@Decode:
; 286 : }
; 287 :
; 288 : character_4 = m_DecoderTable[ character_4 ];
00315 0f b6 45 f3 movzx eax, BYTE PTR _character_4$[ebp]
00319 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0031c 8a 54 01 04 mov dl, BYTE PTR [ecx+eax+4]
00320 88 55 f3 mov BYTE PTR _character_4$[ebp], dl
; 289 :
; 290 : byte_to_add = static_cast< BYTE >( ( ( ( character_3 & 0x03 ) << 6 ) | character_4 ) );
00323 0f b6 45 f4 movzx eax, BYTE PTR _character_3$[ebp]
00327 83 e0 03 and eax, 3
0032a c1 e0 06 shl eax, 6
0032d 0f b6 4d f3 movzx ecx, BYTE PTR _character_4$[ebp]
00331 0b c1 or eax, ecx
00333 88 45 f7 mov BYTE PTR _byte_to_add$[ebp], al
; 291 :
; 292 : destination.SetAt( add_index, byte_to_add );
00336 0f b6 45 f7 movzx eax, BYTE PTR _byte_to_add$[ebp]
0033a 50 push eax
0033b 8b 4d e4 mov ecx, DWORD PTR _add_index$[ebp]
0033e 51 push ecx
0033f 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
00342 e8 00 00 00 00 call ?SetAt@CByteArray@@QAEXHE@Z ; CByteArray::SetAt
; 293 : add_index++;
00347 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
0034a 83 c0 01 add eax, 1
0034d 89 45 e4 mov DWORD PTR _add_index$[ebp], eax
; 294 : }
00350 e9 3c fd ff ff jmp $LN2@Decode
$LN3@Decode:
; 295 :
; 296 : destination.SetSize( add_index );
00355 6a ff push -1
00357 8b 45 e4 mov eax, DWORD PTR _add_index$[ebp]
0035a 50 push eax
0035b 8b 4d 0c mov ecx, DWORD PTR _destination$[ebp]
0035e e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
; 297 :
; 298 : return( return_value );
00363 8b 45 f8 mov eax, DWORD PTR _return_value$[ebp]
$LN1@Decode:
; 299 : }
00366 5f pop edi
00367 5e pop esi
00368 5b pop ebx
00369 8b e5 mov esp, ebp
0036b 5d pop ebp
0036c c2 08 00 ret 8
?Decode@CBase64Coding@@UAEHABVCByteArray@@AAV2@@Z ENDP ; CBase64Coding::Decode
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ??1CBase64Coding@@UAE@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??1CBase64Coding@@UAE@XZ PROC ; CBase64Coding::~CBase64Coding, COMDAT
; _this$ = ecx
; 66 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f c7 00 00 00 00
00 mov DWORD PTR [eax], OFFSET ??_7CBase64Coding@@6B@
; 67 : }
00015 5f pop edi
00016 5e pop esi
00017 5b pop ebx
00018 8b e5 mov esp, ebp
0001a 5d pop ebp
0001b c3 ret 0
??1CBase64Coding@@UAE@XZ ENDP ; CBase64Coding::~CBase64Coding
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ??0CBase64Coding@@QAE@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??0CBase64Coding@@QAE@XZ PROC ; CBase64Coding::CBase64Coding, COMDAT
; _this$ = ecx
; 61 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f c7 00 00 00 00
00 mov DWORD PTR [eax], OFFSET ??_7CBase64Coding@@6B@
; 62 : m_DecoderTable[ 0 ] = 0x00;
00015 b8 01 00 00 00 mov eax, 1
0001a 6b c8 00 imul ecx, eax, 0
0001d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00020 c6 44 0a 04 00 mov BYTE PTR [edx+ecx+4], 0
; 63 : }
00025 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00028 5f pop edi
00029 5e pop esi
0002a 5b pop ebx
0002b 8b e5 mov esp, ebp
0002d 5d pop ebp
0002e c3 ret 0
??0CBase64Coding@@QAE@XZ ENDP ; CBase64Coding::CBase64Coding
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?m_InitializeDecoderTable@CBase64Coding@@MAEXXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?m_InitializeDecoderTable@CBase64Coding@@MAEXXZ PROC ; CBase64Coding::m_InitializeDecoderTable, COMDAT
; _this$ = ecx
; 70 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 71 :
; 72 : // Fill the table with an invalid value. If the decoder receives
; 73 : // this value as a result of a lookup, it knows that the input
; 74 : // character must have been an invalid one.
; 75 :
; 76 : ::memset( m_DecoderTable, BASE64_UNKNOWN_VALUE, sizeof( m_DecoderTable ) );
0000c 68 00 01 00 00 push 256 ; 00000100H
00011 68 ff 00 00 00 push 255 ; 000000ffH
00016 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00019 83 c0 04 add eax, 4
0001c 50 push eax
0001d e8 00 00 00 00 call _memset
00022 83 c4 0c add esp, 12 ; 0000000cH
; 77 :
; 78 : // Now let's fill the table with translatable values
; 79 : // The table is loaded with table[ ASCII_VALUE ] = TRANSLATED_VALUE
; 80 :
; 81 : m_DecoderTable[ 43 ] = 62;
00025 b8 01 00 00 00 mov eax, 1
0002a 6b c8 2b imul ecx, eax, 43
0002d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00030 c6 44 0a 04 3e mov BYTE PTR [edx+ecx+4], 62 ; 0000003eH
; 82 : m_DecoderTable[ 47 ] = 63;
00035 b8 01 00 00 00 mov eax, 1
0003a 6b c8 2f imul ecx, eax, 47
0003d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00040 c6 44 0a 04 3f mov BYTE PTR [edx+ecx+4], 63 ; 0000003fH
; 83 : m_DecoderTable[ 48 ] = 52;
00045 b8 01 00 00 00 mov eax, 1
0004a 6b c8 30 imul ecx, eax, 48
0004d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00050 c6 44 0a 04 34 mov BYTE PTR [edx+ecx+4], 52 ; 00000034H
; 84 : m_DecoderTable[ 49 ] = 53;
00055 b8 01 00 00 00 mov eax, 1
0005a 6b c8 31 imul ecx, eax, 49
0005d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00060 c6 44 0a 04 35 mov BYTE PTR [edx+ecx+4], 53 ; 00000035H
; 85 : m_DecoderTable[ 50 ] = 54;
00065 b8 01 00 00 00 mov eax, 1
0006a 6b c8 32 imul ecx, eax, 50
0006d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00070 c6 44 0a 04 36 mov BYTE PTR [edx+ecx+4], 54 ; 00000036H
; 86 : m_DecoderTable[ 51 ] = 55;
00075 b8 01 00 00 00 mov eax, 1
0007a 6b c8 33 imul ecx, eax, 51
0007d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00080 c6 44 0a 04 37 mov BYTE PTR [edx+ecx+4], 55 ; 00000037H
; 87 : m_DecoderTable[ 52 ] = 56;
00085 b8 01 00 00 00 mov eax, 1
0008a 6b c8 34 imul ecx, eax, 52
0008d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00090 c6 44 0a 04 38 mov BYTE PTR [edx+ecx+4], 56 ; 00000038H
; 88 : m_DecoderTable[ 53 ] = 57;
00095 b8 01 00 00 00 mov eax, 1
0009a 6b c8 35 imul ecx, eax, 53
0009d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000a0 c6 44 0a 04 39 mov BYTE PTR [edx+ecx+4], 57 ; 00000039H
; 89 : m_DecoderTable[ 54 ] = 58;
000a5 b8 01 00 00 00 mov eax, 1
000aa 6b c8 36 imul ecx, eax, 54
000ad 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000b0 c6 44 0a 04 3a mov BYTE PTR [edx+ecx+4], 58 ; 0000003aH
; 90 : m_DecoderTable[ 55 ] = 59;
000b5 b8 01 00 00 00 mov eax, 1
000ba 6b c8 37 imul ecx, eax, 55
000bd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000c0 c6 44 0a 04 3b mov BYTE PTR [edx+ecx+4], 59 ; 0000003bH
; 91 : m_DecoderTable[ 56 ] = 60;
000c5 b8 01 00 00 00 mov eax, 1
000ca 6b c8 38 imul ecx, eax, 56
000cd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000d0 c6 44 0a 04 3c mov BYTE PTR [edx+ecx+4], 60 ; 0000003cH
; 92 : m_DecoderTable[ 57 ] = 61;
000d5 b8 01 00 00 00 mov eax, 1
000da 6b c8 39 imul ecx, eax, 57
000dd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000e0 c6 44 0a 04 3d mov BYTE PTR [edx+ecx+4], 61 ; 0000003dH
; 93 : m_DecoderTable[ 65 ] = 0;
000e5 b8 01 00 00 00 mov eax, 1
000ea 6b c8 41 imul ecx, eax, 65
000ed 8b 55 fc mov edx, DWORD PTR _this$[ebp]
000f0 c6 44 0a 04 00 mov BYTE PTR [edx+ecx+4], 0
; 94 : m_DecoderTable[ 66 ] = 1;
000f5 b8 01 00 00 00 mov eax, 1
000fa 6b c8 42 imul ecx, eax, 66
000fd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00100 c6 44 0a 04 01 mov BYTE PTR [edx+ecx+4], 1
; 95 : m_DecoderTable[ 67 ] = 2;
00105 b8 01 00 00 00 mov eax, 1
0010a 6b c8 43 imul ecx, eax, 67
0010d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00110 c6 44 0a 04 02 mov BYTE PTR [edx+ecx+4], 2
; 96 : m_DecoderTable[ 68 ] = 3;
00115 b8 01 00 00 00 mov eax, 1
0011a 6b c8 44 imul ecx, eax, 68
0011d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00120 c6 44 0a 04 03 mov BYTE PTR [edx+ecx+4], 3
; 97 : m_DecoderTable[ 69 ] = 4;
00125 b8 01 00 00 00 mov eax, 1
0012a 6b c8 45 imul ecx, eax, 69
0012d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00130 c6 44 0a 04 04 mov BYTE PTR [edx+ecx+4], 4
; 98 : m_DecoderTable[ 70 ] = 5;
00135 b8 01 00 00 00 mov eax, 1
0013a 6b c8 46 imul ecx, eax, 70
0013d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00140 c6 44 0a 04 05 mov BYTE PTR [edx+ecx+4], 5
; 99 : m_DecoderTable[ 71 ] = 6;
00145 b8 01 00 00 00 mov eax, 1
0014a 6b c8 47 imul ecx, eax, 71
0014d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00150 c6 44 0a 04 06 mov BYTE PTR [edx+ecx+4], 6
; 100 : m_DecoderTable[ 72 ] = 7;
00155 b8 01 00 00 00 mov eax, 1
0015a 6b c8 48 imul ecx, eax, 72
0015d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00160 c6 44 0a 04 07 mov BYTE PTR [edx+ecx+4], 7
; 101 : m_DecoderTable[ 73 ] = 8;
00165 b8 01 00 00 00 mov eax, 1
0016a 6b c8 49 imul ecx, eax, 73
0016d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00170 c6 44 0a 04 08 mov BYTE PTR [edx+ecx+4], 8
; 102 : m_DecoderTable[ 74 ] = 9;
00175 b8 01 00 00 00 mov eax, 1
0017a 6b c8 4a imul ecx, eax, 74
0017d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00180 c6 44 0a 04 09 mov BYTE PTR [edx+ecx+4], 9
; 103 : m_DecoderTable[ 75 ] = 10;
00185 b8 01 00 00 00 mov eax, 1
0018a 6b c8 4b imul ecx, eax, 75
0018d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00190 c6 44 0a 04 0a mov BYTE PTR [edx+ecx+4], 10 ; 0000000aH
; 104 : m_DecoderTable[ 76 ] = 11;
00195 b8 01 00 00 00 mov eax, 1
0019a 6b c8 4c imul ecx, eax, 76
0019d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
001a0 c6 44 0a 04 0b mov BYTE PTR [edx+ecx+4], 11 ; 0000000bH
; 105 : m_DecoderTable[ 77 ] = 12;
001a5 b8 01 00 00 00 mov eax, 1
001aa 6b c8 4d imul ecx, eax, 77
001ad 8b 55 fc mov edx, DWORD PTR _this$[ebp]
001b0 c6 44 0a 04 0c mov BYTE PTR [edx+ecx+4], 12 ; 0000000cH
; 106 : m_DecoderTable[ 78 ] = 13;
001b5 b8 01 00 00 00 mov eax, 1
001ba 6b c8 4e imul ecx, eax, 78
001bd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
001c0 c6 44 0a 04 0d mov BYTE PTR [edx+ecx+4], 13 ; 0000000dH
; 107 : m_DecoderTable[ 79 ] = 14;
001c5 b8 01 00 00 00 mov eax, 1
001ca 6b c8 4f imul ecx, eax, 79
001cd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
001d0 c6 44 0a 04 0e mov BYTE PTR [edx+ecx+4], 14 ; 0000000eH
; 108 : m_DecoderTable[ 80 ] = 15;
001d5 b8 01 00 00 00 mov eax, 1
001da 6b c8 50 imul ecx, eax, 80
001dd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
001e0 c6 44 0a 04 0f mov BYTE PTR [edx+ecx+4], 15 ; 0000000fH
; 109 : m_DecoderTable[ 81 ] = 16;
001e5 b8 01 00 00 00 mov eax, 1
001ea 6b c8 51 imul ecx, eax, 81
001ed 8b 55 fc mov edx, DWORD PTR _this$[ebp]
001f0 c6 44 0a 04 10 mov BYTE PTR [edx+ecx+4], 16 ; 00000010H
; 110 : m_DecoderTable[ 82 ] = 17;
001f5 b8 01 00 00 00 mov eax, 1
001fa 6b c8 52 imul ecx, eax, 82
001fd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00200 c6 44 0a 04 11 mov BYTE PTR [edx+ecx+4], 17 ; 00000011H
; 111 : m_DecoderTable[ 83 ] = 18;
00205 b8 01 00 00 00 mov eax, 1
0020a 6b c8 53 imul ecx, eax, 83
0020d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00210 c6 44 0a 04 12 mov BYTE PTR [edx+ecx+4], 18 ; 00000012H
; 112 : m_DecoderTable[ 84 ] = 19;
00215 b8 01 00 00 00 mov eax, 1
0021a 6b c8 54 imul ecx, eax, 84
0021d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00220 c6 44 0a 04 13 mov BYTE PTR [edx+ecx+4], 19 ; 00000013H
; 113 : m_DecoderTable[ 85 ] = 20;
00225 b8 01 00 00 00 mov eax, 1
0022a 6b c8 55 imul ecx, eax, 85
0022d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00230 c6 44 0a 04 14 mov BYTE PTR [edx+ecx+4], 20 ; 00000014H
; 114 : m_DecoderTable[ 86 ] = 21;
00235 b8 01 00 00 00 mov eax, 1
0023a 6b c8 56 imul ecx, eax, 86
0023d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00240 c6 44 0a 04 15 mov BYTE PTR [edx+ecx+4], 21 ; 00000015H
; 115 : m_DecoderTable[ 87 ] = 22;
00245 b8 01 00 00 00 mov eax, 1
0024a 6b c8 57 imul ecx, eax, 87
0024d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00250 c6 44 0a 04 16 mov BYTE PTR [edx+ecx+4], 22 ; 00000016H
; 116 : m_DecoderTable[ 88 ] = 23;
00255 b8 01 00 00 00 mov eax, 1
0025a 6b c8 58 imul ecx, eax, 88
0025d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00260 c6 44 0a 04 17 mov BYTE PTR [edx+ecx+4], 23 ; 00000017H
; 117 : m_DecoderTable[ 89 ] = 24;
00265 b8 01 00 00 00 mov eax, 1
0026a 6b c8 59 imul ecx, eax, 89
0026d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00270 c6 44 0a 04 18 mov BYTE PTR [edx+ecx+4], 24 ; 00000018H
; 118 : m_DecoderTable[ 90 ] = 25;
00275 b8 01 00 00 00 mov eax, 1
0027a 6b c8 5a imul ecx, eax, 90
0027d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00280 c6 44 0a 04 19 mov BYTE PTR [edx+ecx+4], 25 ; 00000019H
; 119 : m_DecoderTable[ 97 ] = 26;
00285 b8 01 00 00 00 mov eax, 1
0028a 6b c8 61 imul ecx, eax, 97
0028d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00290 c6 44 0a 04 1a mov BYTE PTR [edx+ecx+4], 26 ; 0000001aH
; 120 : m_DecoderTable[ 98 ] = 27;
00295 b8 01 00 00 00 mov eax, 1
0029a 6b c8 62 imul ecx, eax, 98
0029d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
002a0 c6 44 0a 04 1b mov BYTE PTR [edx+ecx+4], 27 ; 0000001bH
; 121 : m_DecoderTable[ 99 ] = 28;
002a5 b8 01 00 00 00 mov eax, 1
002aa 6b c8 63 imul ecx, eax, 99
002ad 8b 55 fc mov edx, DWORD PTR _this$[ebp]
002b0 c6 44 0a 04 1c mov BYTE PTR [edx+ecx+4], 28 ; 0000001cH
; 122 : m_DecoderTable[ 100 ] = 29;
002b5 b8 01 00 00 00 mov eax, 1
002ba 6b c8 64 imul ecx, eax, 100
002bd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
002c0 c6 44 0a 04 1d mov BYTE PTR [edx+ecx+4], 29 ; 0000001dH
; 123 : m_DecoderTable[ 101 ] = 30;
002c5 b8 01 00 00 00 mov eax, 1
002ca 6b c8 65 imul ecx, eax, 101
002cd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
002d0 c6 44 0a 04 1e mov BYTE PTR [edx+ecx+4], 30 ; 0000001eH
; 124 : m_DecoderTable[ 102 ] = 31;
002d5 b8 01 00 00 00 mov eax, 1
002da 6b c8 66 imul ecx, eax, 102
002dd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
002e0 c6 44 0a 04 1f mov BYTE PTR [edx+ecx+4], 31 ; 0000001fH
; 125 : m_DecoderTable[ 103 ] = 32;
002e5 b8 01 00 00 00 mov eax, 1
002ea 6b c8 67 imul ecx, eax, 103
002ed 8b 55 fc mov edx, DWORD PTR _this$[ebp]
002f0 c6 44 0a 04 20 mov BYTE PTR [edx+ecx+4], 32 ; 00000020H
; 126 : m_DecoderTable[ 104 ] = 33;
002f5 b8 01 00 00 00 mov eax, 1
002fa 6b c8 68 imul ecx, eax, 104
002fd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00300 c6 44 0a 04 21 mov BYTE PTR [edx+ecx+4], 33 ; 00000021H
; 127 : m_DecoderTable[ 105 ] = 34;
00305 b8 01 00 00 00 mov eax, 1
0030a 6b c8 69 imul ecx, eax, 105
0030d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00310 c6 44 0a 04 22 mov BYTE PTR [edx+ecx+4], 34 ; 00000022H
; 128 : m_DecoderTable[ 106 ] = 35;
00315 b8 01 00 00 00 mov eax, 1
0031a 6b c8 6a imul ecx, eax, 106
0031d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00320 c6 44 0a 04 23 mov BYTE PTR [edx+ecx+4], 35 ; 00000023H
; 129 : m_DecoderTable[ 107 ] = 36;
00325 b8 01 00 00 00 mov eax, 1
0032a 6b c8 6b imul ecx, eax, 107
0032d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00330 c6 44 0a 04 24 mov BYTE PTR [edx+ecx+4], 36 ; 00000024H
; 130 : m_DecoderTable[ 108 ] = 37;
00335 b8 01 00 00 00 mov eax, 1
0033a 6b c8 6c imul ecx, eax, 108
0033d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00340 c6 44 0a 04 25 mov BYTE PTR [edx+ecx+4], 37 ; 00000025H
; 131 : m_DecoderTable[ 109 ] = 38;
00345 b8 01 00 00 00 mov eax, 1
0034a 6b c8 6d imul ecx, eax, 109
0034d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00350 c6 44 0a 04 26 mov BYTE PTR [edx+ecx+4], 38 ; 00000026H
; 132 : m_DecoderTable[ 110 ] = 39;
00355 b8 01 00 00 00 mov eax, 1
0035a 6b c8 6e imul ecx, eax, 110
0035d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00360 c6 44 0a 04 27 mov BYTE PTR [edx+ecx+4], 39 ; 00000027H
; 133 : m_DecoderTable[ 111 ] = 40;
00365 b8 01 00 00 00 mov eax, 1
0036a 6b c8 6f imul ecx, eax, 111
0036d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00370 c6 44 0a 04 28 mov BYTE PTR [edx+ecx+4], 40 ; 00000028H
; 134 : m_DecoderTable[ 112 ] = 41;
00375 b8 01 00 00 00 mov eax, 1
0037a 6b c8 70 imul ecx, eax, 112
0037d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00380 c6 44 0a 04 29 mov BYTE PTR [edx+ecx+4], 41 ; 00000029H
; 135 : m_DecoderTable[ 113 ] = 42;
00385 b8 01 00 00 00 mov eax, 1
0038a 6b c8 71 imul ecx, eax, 113
0038d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00390 c6 44 0a 04 2a mov BYTE PTR [edx+ecx+4], 42 ; 0000002aH
; 136 : m_DecoderTable[ 114 ] = 43;
00395 b8 01 00 00 00 mov eax, 1
0039a 6b c8 72 imul ecx, eax, 114
0039d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
003a0 c6 44 0a 04 2b mov BYTE PTR [edx+ecx+4], 43 ; 0000002bH
; 137 : m_DecoderTable[ 115 ] = 44;
003a5 b8 01 00 00 00 mov eax, 1
003aa 6b c8 73 imul ecx, eax, 115
003ad 8b 55 fc mov edx, DWORD PTR _this$[ebp]
003b0 c6 44 0a 04 2c mov BYTE PTR [edx+ecx+4], 44 ; 0000002cH
; 138 : m_DecoderTable[ 116 ] = 45;
003b5 b8 01 00 00 00 mov eax, 1
003ba 6b c8 74 imul ecx, eax, 116
003bd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
003c0 c6 44 0a 04 2d mov BYTE PTR [edx+ecx+4], 45 ; 0000002dH
; 139 : m_DecoderTable[ 117 ] = 46;
003c5 b8 01 00 00 00 mov eax, 1
003ca 6b c8 75 imul ecx, eax, 117
003cd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
003d0 c6 44 0a 04 2e mov BYTE PTR [edx+ecx+4], 46 ; 0000002eH
; 140 : m_DecoderTable[ 118 ] = 47;
003d5 b8 01 00 00 00 mov eax, 1
003da 6b c8 76 imul ecx, eax, 118
003dd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
003e0 c6 44 0a 04 2f mov BYTE PTR [edx+ecx+4], 47 ; 0000002fH
; 141 : m_DecoderTable[ 119 ] = 48;
003e5 b8 01 00 00 00 mov eax, 1
003ea 6b c8 77 imul ecx, eax, 119
003ed 8b 55 fc mov edx, DWORD PTR _this$[ebp]
003f0 c6 44 0a 04 30 mov BYTE PTR [edx+ecx+4], 48 ; 00000030H
; 142 : m_DecoderTable[ 120 ] = 49;
003f5 b8 01 00 00 00 mov eax, 1
003fa 6b c8 78 imul ecx, eax, 120
003fd 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00400 c6 44 0a 04 31 mov BYTE PTR [edx+ecx+4], 49 ; 00000031H
; 143 : m_DecoderTable[ 121 ] = 50;
00405 b8 01 00 00 00 mov eax, 1
0040a 6b c8 79 imul ecx, eax, 121
0040d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00410 c6 44 0a 04 32 mov BYTE PTR [edx+ecx+4], 50 ; 00000032H
; 144 : m_DecoderTable[ 122 ] = 51;
00415 b8 01 00 00 00 mov eax, 1
0041a 6b c8 7a imul ecx, eax, 122
0041d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00420 c6 44 0a 04 33 mov BYTE PTR [edx+ecx+4], 51 ; 00000033H
; 145 :
; 146 : // OK, there's our translation table, now let's be a little
; 147 : // forgiving about end-of-lines, tabs, spaces, etc.
; 148 :
; 149 : m_DecoderTable[ 9 ] = BASE64_IGNORABLE_CHARACTER; // TAB character (Tabs suck!)
00425 b8 01 00 00 00 mov eax, 1
0042a 6b c8 09 imul ecx, eax, 9
0042d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00430 c6 44 0a 04 fe mov BYTE PTR [edx+ecx+4], 254 ; 000000feH
; 150 : m_DecoderTable[ 32 ] = BASE64_IGNORABLE_CHARACTER; // Space character
00435 b8 01 00 00 00 mov eax, 1
0043a c1 e0 05 shl eax, 5
0043d 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00440 c6 44 01 04 fe mov BYTE PTR [ecx+eax+4], 254 ; 000000feH
; 151 : m_DecoderTable[ CARRIAGE_RETURN ] = BASE64_IGNORABLE_CHARACTER;
00445 b8 01 00 00 00 mov eax, 1
0044a 6b c8 0d imul ecx, eax, 13
0044d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00450 c6 44 0a 04 fe mov BYTE PTR [edx+ecx+4], 254 ; 000000feH
; 152 : m_DecoderTable[ LINE_FEED ] = BASE64_IGNORABLE_CHARACTER;
00455 b8 01 00 00 00 mov eax, 1
0045a 6b c8 0a imul ecx, eax, 10
0045d 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00460 c6 44 0a 04 fe mov BYTE PTR [edx+ecx+4], 254 ; 000000feH
; 153 : }
00465 5f pop edi
00466 5e pop esi
00467 5b pop ebx
00468 8b e5 mov esp, ebp
0046a 5d pop ebp
0046b c3 ret 0
?m_InitializeDecoderTable@CBase64Coding@@MAEXXZ ENDP ; CBase64Coding::m_InitializeDecoderTable
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?SetLength@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?SetLength@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<char,0>::SetLength, COMDAT
; _this$ = ecx
; 867 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 868 : ATLASSERT( nLength >= 0 );
; 869 : ATLASSERT( nLength <= GetData()->nAllocLength );
; 870 :
; 871 : if( nLength < 0 || nLength > GetData()->nAllocLength)
0000c 83 7d 08 00 cmp DWORD PTR _nLength$[ebp], 0
00010 7c 10 jl SHORT $LN3@SetLength
00012 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00015 e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
0001a 8b 4d 08 mov ecx, DWORD PTR _nLength$[ebp]
0001d 3b 48 08 cmp ecx, DWORD PTR [eax+8]
00020 7e 0a jle SHORT $LN2@SetLength
$LN3@SetLength:
; 872 : AtlThrow(E_INVALIDARG);
00022 68 57 00 07 80 push -2147024809 ; 80070057H
00027 e8 00 00 00 00 call ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
$LN2@SetLength:
; 873 :
; 874 : GetData()->nDataLength = nLength;
0002c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0002f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
00034 8b 4d 08 mov ecx, DWORD PTR _nLength$[ebp]
00037 89 48 04 mov DWORD PTR [eax+4], ecx
; 875 : m_pszData[nLength] = 0;
0003a 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0003d 8b 08 mov ecx, DWORD PTR [eax]
0003f 8b 55 08 mov edx, DWORD PTR _nLength$[ebp]
00042 c6 04 11 00 mov BYTE PTR [ecx+edx], 0
$LN4@SetLength:
; 876 : }
00046 5f pop edi
00047 5e pop esi
00048 5b pop ebx
00049 8b e5 mov esp, ebp
0004b 5d pop ebp
0004c c2 04 00 ret 4
?SetLength@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<char,0>::SetLength
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Reallocate@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
tv78 = -84 ; size = 4
_pNewData$ = -16 ; size = 4
_pStringMgr$ = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?Reallocate@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<char,0>::Reallocate, COMDAT
; _this$ = ecx
; 849 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 54 sub esp, 84 ; 00000054H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 850 : CStringData* pOldData = GetData();
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
00014 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 851 : ATLASSERT( pOldData->nAllocLength < nLength );
; 852 : IAtlStringMgr* pStringMgr = pOldData->pStringMgr;
00017 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0001a 8b 08 mov ecx, DWORD PTR [eax]
0001c 89 4d f4 mov DWORD PTR _pStringMgr$[ebp], ecx
; 853 : if ( pOldData->nAllocLength >= nLength || nLength <= 0)
0001f 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00022 8b 48 08 mov ecx, DWORD PTR [eax+8]
00025 3b 4d 08 cmp ecx, DWORD PTR _nLength$[ebp]
00028 7d 06 jge SHORT $LN3@Reallocate
0002a 83 7d 08 00 cmp DWORD PTR _nLength$[ebp], 0
0002e 7f 07 jg SHORT $LN2@Reallocate
$LN3@Reallocate:
; 854 : {
; 855 : ThrowMemoryException();
00030 e8 00 00 00 00 call ?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<char,0>::ThrowMemoryException
; 856 : return;
00035 eb 35 jmp SHORT $LN5@Reallocate
$LN2@Reallocate:
; 857 : }
; 858 : CStringData* pNewData = pStringMgr->Reallocate( pOldData, nLength, sizeof( XCHAR ) );
00037 8b 45 f4 mov eax, DWORD PTR _pStringMgr$[ebp]
0003a 8b 08 mov ecx, DWORD PTR [eax]
0003c 8b 51 08 mov edx, DWORD PTR [ecx+8]
0003f 89 55 ac mov DWORD PTR tv78[ebp], edx
00042 6a 01 push 1
00044 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
00047 50 push eax
00048 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
0004b 51 push ecx
0004c 8b 4d f4 mov ecx, DWORD PTR _pStringMgr$[ebp]
0004f ff 55 ac call DWORD PTR tv78[ebp]
00052 89 45 f0 mov DWORD PTR _pNewData$[ebp], eax
; 859 : if( pNewData == NULL )
00055 83 7d f0 00 cmp DWORD PTR _pNewData$[ebp], 0
00059 75 05 jne SHORT $LN4@Reallocate
; 860 : {
; 861 : ThrowMemoryException();
0005b e8 00 00 00 00 call ?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<char,0>::ThrowMemoryException
$LN4@Reallocate:
; 862 : }
; 863 : Attach( pNewData );
00060 8b 45 f0 mov eax, DWORD PTR _pNewData$[ebp]
00063 50 push eax
00064 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00067 e8 00 00 00 00 call ?Attach@?$CSimpleStringT@D$0A@@ATL@@AAEXPAUCStringData@2@@Z ; ATL::CSimpleStringT<char,0>::Attach
$LN5@Reallocate:
; 864 : }
0006c 5f pop edi
0006d 5e pop esi
0006e 5b pop ebx
0006f 8b e5 mov esp, ebp
00071 5d pop ebp
00072 c2 04 00 ret 4
?Reallocate@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<char,0>::Reallocate
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?PrepareWrite2@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
_nNewLength$1 = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?PrepareWrite2@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<char,0>::PrepareWrite2, COMDAT
; _this$ = ecx
; 818 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 4c sub esp, 76 ; 0000004cH
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 819 : CStringData* pOldData = GetData();
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
00014 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 820 : if( pOldData->nDataLength > nLength )
00017 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0001a 8b 48 04 mov ecx, DWORD PTR [eax+4]
0001d 3b 4d 08 cmp ecx, DWORD PTR _nLength$[ebp]
00020 7e 09 jle SHORT $LN2@PrepareWri
; 821 : {
; 822 : nLength = pOldData->nDataLength;
00022 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00025 8b 48 04 mov ecx, DWORD PTR [eax+4]
00028 89 4d 08 mov DWORD PTR _nLength$[ebp], ecx
$LN2@PrepareWri:
; 823 : }
; 824 : if( pOldData->IsShared() )
0002b 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
0002e e8 00 00 00 00 call ?IsShared@CStringData@ATL@@QBE_NXZ ; ATL::CStringData::IsShared
00033 0f b6 c0 movzx eax, al
00036 85 c0 test eax, eax
00038 74 0e je SHORT $LN3@PrepareWri
; 825 : {
; 826 : Fork( nLength );
0003a 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
0003d 50 push eax
0003e 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00041 e8 00 00 00 00 call ?Fork@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::Fork
; 827 : }
00046 eb 52 jmp SHORT $LN1@PrepareWri
$LN3@PrepareWri:
; 828 : else if( pOldData->nAllocLength < nLength )
00048 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0004b 8b 48 08 mov ecx, DWORD PTR [eax+8]
0004e 3b 4d 08 cmp ecx, DWORD PTR _nLength$[ebp]
00051 7d 47 jge SHORT $LN1@PrepareWri
; 829 : {
; 830 : // Grow exponentially, until we hit 1G, then by 1M thereafter.
; 831 : int nNewLength = pOldData->nAllocLength;
00053 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00056 8b 48 08 mov ecx, DWORD PTR [eax+8]
00059 89 4d f4 mov DWORD PTR _nNewLength$1[ebp], ecx
; 832 : if( nNewLength > 1024 * 1024 * 1024 )
0005c 81 7d f4 00 00
00 40 cmp DWORD PTR _nNewLength$1[ebp], 1073741824 ; 40000000H
00063 7e 0d jle SHORT $LN6@PrepareWri
; 833 : {
; 834 : nNewLength += 1024 * 1024;
00065 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00068 05 00 00 10 00 add eax, 1048576 ; 00100000H
0006d 89 45 f4 mov DWORD PTR _nNewLength$1[ebp], eax
; 835 : }
00070 eb 0e jmp SHORT $LN7@PrepareWri
$LN6@PrepareWri:
; 836 : else
; 837 : {
; 838 : // Exponential growth factor is 1.5.
; 839 : nNewLength = nNewLength + nNewLength / 2;
00072 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00075 99 cdq
00076 2b c2 sub eax, edx
00078 d1 f8 sar eax, 1
0007a 03 45 f4 add eax, DWORD PTR _nNewLength$1[ebp]
0007d 89 45 f4 mov DWORD PTR _nNewLength$1[ebp], eax
$LN7@PrepareWri:
; 840 : }
; 841 : if( nNewLength < nLength )
00080 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00083 3b 45 08 cmp eax, DWORD PTR _nLength$[ebp]
00086 7d 06 jge SHORT $LN8@PrepareWri
; 842 : {
; 843 : nNewLength = nLength;
00088 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
0008b 89 45 f4 mov DWORD PTR _nNewLength$1[ebp], eax
$LN8@PrepareWri:
; 844 : }
; 845 : Reallocate( nNewLength );
0008e 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00091 50 push eax
00092 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00095 e8 00 00 00 00 call ?Reallocate@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::Reallocate
$LN1@PrepareWri:
; 846 : }
; 847 : }
0009a 5f pop edi
0009b 5e pop esi
0009c 5b pop ebx
0009d 8b e5 mov esp, ebp
0009f 5d pop ebp
000a0 c2 04 00 ret 4
?PrepareWrite2@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<char,0>::PrepareWrite2
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?PrepareWrite@?$CSimpleStringT@D$0A@@ATL@@AAEPADH@Z
_TEXT SEGMENT
_nTooShort$ = -16 ; size = 4
_nShared$ = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?PrepareWrite@?$CSimpleStringT@D$0A@@ATL@@AAEPADH@Z PROC ; ATL::CSimpleStringT<char,0>::PrepareWrite, COMDAT
; _this$ = ecx
; 803 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 50 sub esp, 80 ; 00000050H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 804 : if (nLength < 0)
0000c 83 7d 08 00 cmp DWORD PTR _nLength$[ebp], 0
00010 7d 0a jge SHORT $LN2@PrepareWri
; 805 : AtlThrow(E_INVALIDARG);
00012 68 57 00 07 80 push -2147024809 ; 80070057H
00017 e8 00 00 00 00 call ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
$LN2@PrepareWri:
; 806 :
; 807 : CStringData* pOldData = GetData();
0001c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0001f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
00024 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 808 : int nShared = 1-pOldData->nRefs; // nShared < 0 means true, >= 0 means false
00027 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0002a b9 01 00 00 00 mov ecx, 1
0002f 2b 48 0c sub ecx, DWORD PTR [eax+12]
00032 89 4d f4 mov DWORD PTR _nShared$[ebp], ecx
; 809 : int nTooShort = pOldData->nAllocLength-nLength; // nTooShort < 0 means true, >= 0 means false
00035 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00038 8b 48 08 mov ecx, DWORD PTR [eax+8]
0003b 2b 4d 08 sub ecx, DWORD PTR _nLength$[ebp]
0003e 89 4d f0 mov DWORD PTR _nTooShort$[ebp], ecx
; 810 : if( (nShared|nTooShort) < 0 ) // If either sign bit is set (i.e. either is less than zero), we need to copy data
00041 8b 45 f4 mov eax, DWORD PTR _nShared$[ebp]
00044 0b 45 f0 or eax, DWORD PTR _nTooShort$[ebp]
00047 7d 0c jge SHORT $LN3@PrepareWri
; 811 : {
; 812 : PrepareWrite2( nLength );
00049 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
0004c 50 push eax
0004d 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00050 e8 00 00 00 00 call ?PrepareWrite2@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::PrepareWrite2
$LN3@PrepareWri:
; 813 : }
; 814 :
; 815 : return( m_pszData );
00055 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00058 8b 00 mov eax, DWORD PTR [eax]
$LN4@PrepareWri:
; 816 : }
0005a 5f pop edi
0005b 5e pop esi
0005c 5b pop ebx
0005d 8b e5 mov esp, ebp
0005f 5d pop ebp
00060 c2 04 00 ret 4
?PrepareWrite@?$CSimpleStringT@D$0A@@ATL@@AAEPADH@Z ENDP ; ATL::CSimpleStringT<char,0>::PrepareWrite
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ PROC ; ATL::CSimpleStringT<char,0>::GetData, COMDAT
; _this$ = ecx
; 799 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 800 : return( reinterpret_cast< CStringData* >( m_pszData )-1 );
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 8b 00 mov eax, DWORD PTR [eax]
00011 83 e8 10 sub eax, 16 ; 00000010H
; 801 : }
00014 5f pop edi
00015 5e pop esi
00016 5b pop ebx
00017 8b e5 mov esp, ebp
00019 5d pop ebp
0001a c3 ret 0
?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ENDP ; ATL::CSimpleStringT<char,0>::GetData
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Fork@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
tv130 = -92 ; size = 4
tv83 = -92 ; size = 4
tv132 = -88 ; size = 4
tv86 = -88 ; size = 4
tv76 = -88 ; size = 4
_nCharsToCopy$ = -20 ; size = 4
_pNewData$ = -16 ; size = 4
_nOldLength$ = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?Fork@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<char,0>::Fork, COMDAT
; _this$ = ecx
; 783 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 5c sub esp, 92 ; 0000005cH
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 784 : CStringData* pOldData = GetData();
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
00014 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 785 : int nOldLength = pOldData->nDataLength;
00017 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0001a 8b 48 04 mov ecx, DWORD PTR [eax+4]
0001d 89 4d f4 mov DWORD PTR _nOldLength$[ebp], ecx
; 786 : CStringData* pNewData = pOldData->pStringMgr->Clone()->Allocate( nLength, sizeof( XCHAR ) );
00020 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00023 8b 08 mov ecx, DWORD PTR [eax]
00025 8b 55 f8 mov edx, DWORD PTR _pOldData$[ebp]
00028 8b 01 mov eax, DWORD PTR [ecx]
0002a 8b 0a mov ecx, DWORD PTR [edx]
0002c 8b 50 10 mov edx, DWORD PTR [eax+16]
0002f ff d2 call edx
00031 89 45 a8 mov DWORD PTR tv76[ebp], eax
00034 8b 45 a8 mov eax, DWORD PTR tv76[ebp]
00037 8b 08 mov ecx, DWORD PTR [eax]
00039 8b 11 mov edx, DWORD PTR [ecx]
0003b 89 55 a4 mov DWORD PTR tv83[ebp], edx
0003e 6a 01 push 1
00040 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
00043 50 push eax
00044 8b 4d a8 mov ecx, DWORD PTR tv76[ebp]
00047 ff 55 a4 call DWORD PTR tv83[ebp]
0004a 89 45 f0 mov DWORD PTR _pNewData$[ebp], eax
; 787 : if( pNewData == NULL )
0004d 83 7d f0 00 cmp DWORD PTR _pNewData$[ebp], 0
00051 75 05 jne SHORT $LN2@Fork
; 788 : {
; 789 : ThrowMemoryException();
00053 e8 00 00 00 00 call ?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<char,0>::ThrowMemoryException
$LN2@Fork:
; 790 : }
; 791 : int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
00058 8b 45 f4 mov eax, DWORD PTR _nOldLength$[ebp]
0005b 3b 45 08 cmp eax, DWORD PTR _nLength$[ebp]
0005e 7d 08 jge SHORT $LN4@Fork
00060 8b 4d f4 mov ecx, DWORD PTR _nOldLength$[ebp]
00063 89 4d a8 mov DWORD PTR tv86[ebp], ecx
00066 eb 06 jmp SHORT $LN5@Fork
$LN4@Fork:
00068 8b 55 08 mov edx, DWORD PTR _nLength$[ebp]
0006b 89 55 a8 mov DWORD PTR tv86[ebp], edx
$LN5@Fork:
0006e 8b 45 a8 mov eax, DWORD PTR tv86[ebp]
00071 83 c0 01 add eax, 1
00074 89 45 ec mov DWORD PTR _nCharsToCopy$[ebp], eax
; 792 : memcpy_s( PXSTR( pNewData->data() ), nCharsToCopy * sizeof( XCHAR ),
00077 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
0007a e8 00 00 00 00 call ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
0007f 89 45 a8 mov DWORD PTR tv132[ebp], eax
00082 8b 4d f0 mov ecx, DWORD PTR _pNewData$[ebp]
00085 e8 00 00 00 00 call ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
0008a 89 45 a4 mov DWORD PTR tv130[ebp], eax
0008d 8b 45 ec mov eax, DWORD PTR _nCharsToCopy$[ebp]
00090 50 push eax
00091 8b 4d a8 mov ecx, DWORD PTR tv132[ebp]
00094 51 push ecx
00095 8b 55 ec mov edx, DWORD PTR _nCharsToCopy$[ebp]
00098 52 push edx
00099 8b 45 a4 mov eax, DWORD PTR tv130[ebp]
0009c 50 push eax
0009d e8 00 00 00 00 call _memcpy_s
000a2 83 c4 10 add esp, 16 ; 00000010H
; 793 : PCXSTR( pOldData->data() ), nCharsToCopy * sizeof( XCHAR ));
; 794 : pNewData->nDataLength = nOldLength;
000a5 8b 45 f0 mov eax, DWORD PTR _pNewData$[ebp]
000a8 8b 4d f4 mov ecx, DWORD PTR _nOldLength$[ebp]
000ab 89 48 04 mov DWORD PTR [eax+4], ecx
; 795 : pOldData->Release();
000ae 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
000b1 e8 00 00 00 00 call ?Release@CStringData@ATL@@QAEXXZ ; ATL::CStringData::Release
; 796 : Attach( pNewData );
000b6 8b 45 f0 mov eax, DWORD PTR _pNewData$[ebp]
000b9 50 push eax
000ba 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
000bd e8 00 00 00 00 call ?Attach@?$CSimpleStringT@D$0A@@ATL@@AAEXPAUCStringData@2@@Z ; ATL::CSimpleStringT<char,0>::Attach
$LN3@Fork:
; 797 : }
000c2 5f pop edi
000c3 5e pop esi
000c4 5b pop ebx
000c5 8b e5 mov esp, ebp
000c7 5d pop ebp
000c8 c2 04 00 ret 4
?Fork@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<char,0>::Fork
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Attach@?$CSimpleStringT@D$0A@@ATL@@AAEXPAUCStringData@2@@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_pData$ = 8 ; size = 4
?Attach@?$CSimpleStringT@D$0A@@ATL@@AAEXPAUCStringData@2@@Z PROC ; ATL::CSimpleStringT<char,0>::Attach, COMDAT
; _this$ = ecx
; 779 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 780 : m_pszData = static_cast< PXSTR >( pData->data() );
0000c 8b 4d 08 mov ecx, DWORD PTR _pData$[ebp]
0000f e8 00 00 00 00 call ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
00014 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00017 89 01 mov DWORD PTR [ecx], eax
; 781 : }
00019 5f pop edi
0001a 5e pop esi
0001b 5b pop ebx
0001c 8b e5 mov esp, ebp
0001e 5d pop ebp
0001f c2 04 00 ret 4
?Attach@?$CSimpleStringT@D$0A@@ATL@@AAEXPAUCStringData@2@@Z ENDP ; ATL::CSimpleStringT<char,0>::Attach
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ
_TEXT SEGMENT
?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ PROC ; ATL::CSimpleStringT<char,0>::ThrowMemoryException, COMDAT
; 772 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
; 773 : AtlThrow( E_OUTOFMEMORY );
00009 68 0e 00 07 80 push -2147024882 ; 8007000eH
0000e e8 00 00 00 00 call ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
$LN2@ThrowMemor:
; 774 : }
00013 5f pop edi
00014 5e pop esi
00015 5b pop ebx
00016 8b e5 mov esp, ebp
00018 5d pop ebp
00019 c3 ret 0
?ThrowMemoryException@?$CSimpleStringT@D$0A@@ATL@@KAXXZ ENDP ; ATL::CSimpleStringT<char,0>::ThrowMemoryException
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z
_TEXT SEGMENT
__$EHRec$ = -12 ; size = 12
_psz$ = 8 ; size = 4
_sizeInXChar$ = 12 ; size = 4
?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z PROC ; ATL::CSimpleStringT<char,0>::StringLengthN, COMDAT
; 739 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 6a ff push -1
00005 68 00 00 00 00 push __ehhandler$?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z
0000a 64 a1 00 00 00
00 mov eax, DWORD PTR fs:0
00010 50 push eax
00011 83 ec 40 sub esp, 64 ; 00000040H
00014 53 push ebx
00015 56 push esi
00016 57 push edi
00017 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0001c 33 c5 xor eax, ebp
0001e 50 push eax
0001f 8d 45 f4 lea eax, DWORD PTR __$EHRec$[ebp]
00022 64 a3 00 00 00
00 mov DWORD PTR fs:0, eax
; 740 : if( psz == NULL )
00028 83 7d 08 00 cmp DWORD PTR _psz$[ebp], 0
0002c 75 04 jne SHORT $LN2@StringLeng
; 741 : {
; 742 : return( 0 );
0002e 33 c0 xor eax, eax
00030 eb 10 jmp SHORT $LN1@StringLeng
$LN2@StringLeng:
; 743 : }
; 744 : return( int( strnlen( psz, sizeInXChar ) ) );
00032 8b 45 0c mov eax, DWORD PTR _sizeInXChar$[ebp]
00035 50 push eax
00036 8b 4d 08 mov ecx, DWORD PTR _psz$[ebp]
00039 51 push ecx
0003a e8 00 00 00 00 call _strnlen
0003f 83 c4 08 add esp, 8
$LN1@StringLeng:
; 745 : }
00042 8b 4d f4 mov ecx, DWORD PTR __$EHRec$[ebp]
00045 64 89 0d 00 00
00 00 mov DWORD PTR fs:0, ecx
0004c 59 pop ecx
0004d 5f pop edi
0004e 5e pop esi
0004f 5b pop ebx
00050 8b e5 mov esp, ebp
00052 5d pop ebp
00053 c3 ret 0
00054 cc int 3
00055 cc int 3
00056 cc int 3
00057 cc int 3
00058 cc int 3
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__ehhandler$?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z:
00000 90 npad 1
00001 90 npad 1
00002 8b 54 24 08 mov edx, DWORD PTR [esp+8]
00006 8d 42 0c lea eax, DWORD PTR [edx+12]
00009 8b 4a b0 mov ecx, DWORD PTR [edx-80]
0000c 33 c8 xor ecx, eax
0000e e8 00 00 00 00 call @__security_check_cookie@4
00013 b8 00 00 00 00 mov eax, OFFSET __ehfuncinfo$?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z
00018 e9 00 00 00 00 jmp ___CxxFrameHandler3
text$x ENDS
?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z ENDP ; ATL::CSimpleStringT<char,0>::StringLengthN
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z
_TEXT SEGMENT
_nAlloc$1 = -8 ; size = 4
_this$ = -4 ; size = 4
_nNewLength$ = 8 ; size = 4
?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z PROC ; ATL::CSimpleStringT<char,0>::ReleaseBuffer, COMDAT
; _this$ = ecx
; 557 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 48 sub esp, 72 ; 00000048H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 558 : if( nNewLength == -1 )
0000c 83 7d 08 ff cmp DWORD PTR _nNewLength$[ebp], -1
00010 75 23 jne SHORT $LN2@ReleaseBuf
; 559 : {
; 560 : int nAlloc = GetData()->nAllocLength;
00012 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00015 e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
0001a 8b 40 08 mov eax, DWORD PTR [eax+8]
0001d 89 45 f8 mov DWORD PTR _nAlloc$1[ebp], eax
; 561 : nNewLength = StringLengthN( m_pszData, nAlloc);
00020 8b 45 f8 mov eax, DWORD PTR _nAlloc$1[ebp]
00023 50 push eax
00024 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00027 8b 11 mov edx, DWORD PTR [ecx]
00029 52 push edx
0002a e8 00 00 00 00 call ?StringLengthN@?$CSimpleStringT@D$0A@@ATL@@SAHPBDI@Z ; ATL::CSimpleStringT<char,0>::StringLengthN
0002f 83 c4 08 add esp, 8
00032 89 45 08 mov DWORD PTR _nNewLength$[ebp], eax
$LN2@ReleaseBuf:
; 562 : }
; 563 : SetLength( nNewLength );
00035 8b 45 08 mov eax, DWORD PTR _nNewLength$[ebp]
00038 50 push eax
00039 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0003c e8 00 00 00 00 call ?SetLength@?$CSimpleStringT@D$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<char,0>::SetLength
; 564 : }
00041 5f pop edi
00042 5e pop esi
00043 5b pop ebx
00044 8b e5 mov esp, ebp
00046 5d pop ebp
00047 c2 04 00 ret 4
?ReleaseBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEXH@Z ENDP ; ATL::CSimpleStringT<char,0>::ReleaseBuffer
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?GetLength@?$CSimpleStringT@D$0A@@ATL@@QBEHXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?GetLength@?$CSimpleStringT@D$0A@@ATL@@QBEHXZ PROC ; ATL::CSimpleStringT<char,0>::GetLength, COMDAT
; _this$ = ecx
; 518 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 519 : return( GetData()->nDataLength );
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@D$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<char,0>::GetData
00014 8b 40 04 mov eax, DWORD PTR [eax+4]
; 520 : }
00017 5f pop edi
00018 5e pop esi
00019 5b pop ebx
0001a 8b e5 mov esp, ebp
0001c 5d pop ebp
0001d c3 ret 0
?GetLength@?$CSimpleStringT@D$0A@@ATL@@QBEHXZ ENDP ; ATL::CSimpleStringT<char,0>::GetLength
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?GetBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEPADH@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_nMinBufferLength$ = 8 ; size = 4
?GetBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEPADH@Z PROC ; ATL::CSimpleStringT<char,0>::GetBuffer, COMDAT
; _this$ = ecx
; 507 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 508 : return( PrepareWrite( nMinBufferLength ) );
0000c 8b 45 08 mov eax, DWORD PTR _nMinBufferLength$[ebp]
0000f 50 push eax
00010 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00013 e8 00 00 00 00 call ?PrepareWrite@?$CSimpleStringT@D$0A@@ATL@@AAEPADH@Z ; ATL::CSimpleStringT<char,0>::PrepareWrite
; 509 : }
00018 5f pop edi
00019 5e pop esi
0001a 5b pop ebx
0001b 8b e5 mov esp, ebp
0001d 5d pop ebp
0001e c2 04 00 ret 4
?GetBuffer@?$CSimpleStringT@D$0A@@ATL@@QAEPADH@Z ENDP ; ATL::CSimpleStringT<char,0>::GetBuffer
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ??B?$CSimpleStringT@D$0A@@ATL@@QBEPBDXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??B?$CSimpleStringT@D$0A@@ATL@@QBEPBDXZ PROC ; ATL::CSimpleStringT<char,0>::operator char const *, COMDAT
; _this$ = ecx
; 376 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 377 : return( m_pszData );
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 8b 00 mov eax, DWORD PTR [eax]
; 378 : }
00011 5f pop edi
00012 5e pop esi
00013 5b pop ebx
00014 8b e5 mov esp, ebp
00016 5d pop ebp
00017 c3 ret 0
??B?$CSimpleStringT@D$0A@@ATL@@QBEPBDXZ ENDP ; ATL::CSimpleStringT<char,0>::operator char const *
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\afxcoll.inl
; COMDAT ?GetData@CByteArray@@QBEPBEXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?GetData@CByteArray@@QBEPBEXZ PROC ; CByteArray::GetData, COMDAT
; _this$ = ecx
; 46 : { return (const BYTE*)m_pData; }
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 8b 40 04 mov eax, DWORD PTR [eax+4]
00012 5f pop edi
00013 5e pop esi
00014 5b pop ebx
00015 8b e5 mov esp, ebp
00017 5d pop ebp
00018 c3 ret 0
?GetData@CByteArray@@QBEPBEXZ ENDP ; CByteArray::GetData
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\afxcoll.inl
; COMDAT ?SetAt@CByteArray@@QAEXHE@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_nIndex$ = 8 ; size = 4
_newElement$ = 12 ; size = 1
?SetAt@CByteArray@@QAEXHE@Z PROC ; CByteArray::SetAt, COMDAT
; _this$ = ecx
; 35 : { ASSERT(nIndex >= 0 && nIndex < m_nSize);
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 36 : if( nIndex < 0 || nIndex >= m_nSize )
0000c 83 7d 08 00 cmp DWORD PTR _nIndex$[ebp], 0
00010 7c 0b jl SHORT $LN3@SetAt
00012 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00015 8b 4d 08 mov ecx, DWORD PTR _nIndex$[ebp]
00018 3b 48 08 cmp ecx, DWORD PTR [eax+8]
0001b 7c 05 jl SHORT $LN2@SetAt
$LN3@SetAt:
; 37 : AfxThrowInvalidArgException();
0001d e8 00 00 00 00 call ?AfxThrowInvalidArgException@@YGXXZ ; AfxThrowInvalidArgException
$LN2@SetAt:
; 38 : m_pData[nIndex] = newElement; }
00022 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00025 8b 48 04 mov ecx, DWORD PTR [eax+4]
00028 8b 55 08 mov edx, DWORD PTR _nIndex$[ebp]
0002b 8a 45 0c mov al, BYTE PTR _newElement$[ebp]
0002e 88 04 11 mov BYTE PTR [ecx+edx], al
$LN4@SetAt:
00031 5f pop edi
00032 5e pop esi
00033 5b pop ebx
00034 8b e5 mov esp, ebp
00036 5d pop ebp
00037 c2 08 00 ret 8
?SetAt@CByteArray@@QAEXHE@Z ENDP ; CByteArray::SetAt
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\afxcoll.inl
; COMDAT ?RemoveAll@CByteArray@@QAEXXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?RemoveAll@CByteArray@@QAEXXZ PROC ; CByteArray::RemoveAll, COMDAT
; _this$ = ecx
; 28 : { SetSize(0); }
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
0000c 6a ff push -1
0000e 6a 00 push 0
00010 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00013 e8 00 00 00 00 call ?SetSize@CByteArray@@QAEXHH@Z ; CByteArray::SetSize
00018 5f pop edi
00019 5e pop esi
0001a 5b pop ebx
0001b 8b e5 mov esp, ebp
0001d 5d pop ebp
0001e c3 ret 0
?RemoveAll@CByteArray@@QAEXXZ ENDP ; CByteArray::RemoveAll
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\afxcoll.inl
; COMDAT ?GetSize@CByteArray@@QBEHXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?GetSize@CByteArray@@QBEHXZ PROC ; CByteArray::GetSize, COMDAT
; _this$ = ecx
; 20 : { return m_nSize; }
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 8b 40 08 mov eax, DWORD PTR [eax+8]
00012 5f pop edi
00013 5e pop esi
00014 5b pop ebx
00015 8b e5 mov esp, ebp
00017 5d pop ebp
00018 c3 ret 0
?GetSize@CByteArray@@QBEHXZ ENDP ; CByteArray::GetSize
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?SetLength@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?SetLength@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::SetLength, COMDAT
; _this$ = ecx
; 867 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 868 : ATLASSERT( nLength >= 0 );
; 869 : ATLASSERT( nLength <= GetData()->nAllocLength );
; 870 :
; 871 : if( nLength < 0 || nLength > GetData()->nAllocLength)
0000c 83 7d 08 00 cmp DWORD PTR _nLength$[ebp], 0
00010 7c 10 jl SHORT $LN3@SetLength
00012 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00015 e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
0001a 8b 4d 08 mov ecx, DWORD PTR _nLength$[ebp]
0001d 3b 48 08 cmp ecx, DWORD PTR [eax+8]
00020 7e 0a jle SHORT $LN2@SetLength
$LN3@SetLength:
; 872 : AtlThrow(E_INVALIDARG);
00022 68 57 00 07 80 push -2147024809 ; 80070057H
00027 e8 00 00 00 00 call ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
$LN2@SetLength:
; 873 :
; 874 : GetData()->nDataLength = nLength;
0002c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0002f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
00034 8b 4d 08 mov ecx, DWORD PTR _nLength$[ebp]
00037 89 48 04 mov DWORD PTR [eax+4], ecx
; 875 : m_pszData[nLength] = 0;
0003a 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0003d 8b 08 mov ecx, DWORD PTR [eax]
0003f 33 d2 xor edx, edx
00041 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
00044 66 89 14 41 mov WORD PTR [ecx+eax*2], dx
$LN4@SetLength:
; 876 : }
00048 5f pop edi
00049 5e pop esi
0004a 5b pop ebx
0004b 8b e5 mov esp, ebp
0004d 5d pop ebp
0004e c2 04 00 ret 4
?SetLength@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::SetLength
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Reallocate@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
tv78 = -84 ; size = 4
_pNewData$ = -16 ; size = 4
_pStringMgr$ = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?Reallocate@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::Reallocate, COMDAT
; _this$ = ecx
; 849 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 54 sub esp, 84 ; 00000054H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 850 : CStringData* pOldData = GetData();
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
00014 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 851 : ATLASSERT( pOldData->nAllocLength < nLength );
; 852 : IAtlStringMgr* pStringMgr = pOldData->pStringMgr;
00017 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0001a 8b 08 mov ecx, DWORD PTR [eax]
0001c 89 4d f4 mov DWORD PTR _pStringMgr$[ebp], ecx
; 853 : if ( pOldData->nAllocLength >= nLength || nLength <= 0)
0001f 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00022 8b 48 08 mov ecx, DWORD PTR [eax+8]
00025 3b 4d 08 cmp ecx, DWORD PTR _nLength$[ebp]
00028 7d 06 jge SHORT $LN3@Reallocate
0002a 83 7d 08 00 cmp DWORD PTR _nLength$[ebp], 0
0002e 7f 07 jg SHORT $LN2@Reallocate
$LN3@Reallocate:
; 854 : {
; 855 : ThrowMemoryException();
00030 e8 00 00 00 00 call ?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<wchar_t,0>::ThrowMemoryException
; 856 : return;
00035 eb 35 jmp SHORT $LN5@Reallocate
$LN2@Reallocate:
; 857 : }
; 858 : CStringData* pNewData = pStringMgr->Reallocate( pOldData, nLength, sizeof( XCHAR ) );
00037 8b 45 f4 mov eax, DWORD PTR _pStringMgr$[ebp]
0003a 8b 08 mov ecx, DWORD PTR [eax]
0003c 8b 51 08 mov edx, DWORD PTR [ecx+8]
0003f 89 55 ac mov DWORD PTR tv78[ebp], edx
00042 6a 02 push 2
00044 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
00047 50 push eax
00048 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
0004b 51 push ecx
0004c 8b 4d f4 mov ecx, DWORD PTR _pStringMgr$[ebp]
0004f ff 55 ac call DWORD PTR tv78[ebp]
00052 89 45 f0 mov DWORD PTR _pNewData$[ebp], eax
; 859 : if( pNewData == NULL )
00055 83 7d f0 00 cmp DWORD PTR _pNewData$[ebp], 0
00059 75 05 jne SHORT $LN4@Reallocate
; 860 : {
; 861 : ThrowMemoryException();
0005b e8 00 00 00 00 call ?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<wchar_t,0>::ThrowMemoryException
$LN4@Reallocate:
; 862 : }
; 863 : Attach( pNewData );
00060 8b 45 f0 mov eax, DWORD PTR _pNewData$[ebp]
00063 50 push eax
00064 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00067 e8 00 00 00 00 call ?Attach@?$CSimpleStringT@_W$0A@@ATL@@AAEXPAUCStringData@2@@Z ; ATL::CSimpleStringT<wchar_t,0>::Attach
$LN5@Reallocate:
; 864 : }
0006c 5f pop edi
0006d 5e pop esi
0006e 5b pop ebx
0006f 8b e5 mov esp, ebp
00071 5d pop ebp
00072 c2 04 00 ret 4
?Reallocate@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::Reallocate
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?PrepareWrite2@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
_nNewLength$1 = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?PrepareWrite2@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite2, COMDAT
; _this$ = ecx
; 818 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 4c sub esp, 76 ; 0000004cH
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 819 : CStringData* pOldData = GetData();
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
00014 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 820 : if( pOldData->nDataLength > nLength )
00017 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0001a 8b 48 04 mov ecx, DWORD PTR [eax+4]
0001d 3b 4d 08 cmp ecx, DWORD PTR _nLength$[ebp]
00020 7e 09 jle SHORT $LN2@PrepareWri
; 821 : {
; 822 : nLength = pOldData->nDataLength;
00022 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00025 8b 48 04 mov ecx, DWORD PTR [eax+4]
00028 89 4d 08 mov DWORD PTR _nLength$[ebp], ecx
$LN2@PrepareWri:
; 823 : }
; 824 : if( pOldData->IsShared() )
0002b 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
0002e e8 00 00 00 00 call ?IsShared@CStringData@ATL@@QBE_NXZ ; ATL::CStringData::IsShared
00033 0f b6 c0 movzx eax, al
00036 85 c0 test eax, eax
00038 74 0e je SHORT $LN3@PrepareWri
; 825 : {
; 826 : Fork( nLength );
0003a 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
0003d 50 push eax
0003e 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00041 e8 00 00 00 00 call ?Fork@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::Fork
; 827 : }
00046 eb 52 jmp SHORT $LN1@PrepareWri
$LN3@PrepareWri:
; 828 : else if( pOldData->nAllocLength < nLength )
00048 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0004b 8b 48 08 mov ecx, DWORD PTR [eax+8]
0004e 3b 4d 08 cmp ecx, DWORD PTR _nLength$[ebp]
00051 7d 47 jge SHORT $LN1@PrepareWri
; 829 : {
; 830 : // Grow exponentially, until we hit 1G, then by 1M thereafter.
; 831 : int nNewLength = pOldData->nAllocLength;
00053 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00056 8b 48 08 mov ecx, DWORD PTR [eax+8]
00059 89 4d f4 mov DWORD PTR _nNewLength$1[ebp], ecx
; 832 : if( nNewLength > 1024 * 1024 * 1024 )
0005c 81 7d f4 00 00
00 40 cmp DWORD PTR _nNewLength$1[ebp], 1073741824 ; 40000000H
00063 7e 0d jle SHORT $LN6@PrepareWri
; 833 : {
; 834 : nNewLength += 1024 * 1024;
00065 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00068 05 00 00 10 00 add eax, 1048576 ; 00100000H
0006d 89 45 f4 mov DWORD PTR _nNewLength$1[ebp], eax
; 835 : }
00070 eb 0e jmp SHORT $LN7@PrepareWri
$LN6@PrepareWri:
; 836 : else
; 837 : {
; 838 : // Exponential growth factor is 1.5.
; 839 : nNewLength = nNewLength + nNewLength / 2;
00072 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00075 99 cdq
00076 2b c2 sub eax, edx
00078 d1 f8 sar eax, 1
0007a 03 45 f4 add eax, DWORD PTR _nNewLength$1[ebp]
0007d 89 45 f4 mov DWORD PTR _nNewLength$1[ebp], eax
$LN7@PrepareWri:
; 840 : }
; 841 : if( nNewLength < nLength )
00080 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00083 3b 45 08 cmp eax, DWORD PTR _nLength$[ebp]
00086 7d 06 jge SHORT $LN8@PrepareWri
; 842 : {
; 843 : nNewLength = nLength;
00088 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
0008b 89 45 f4 mov DWORD PTR _nNewLength$1[ebp], eax
$LN8@PrepareWri:
; 844 : }
; 845 : Reallocate( nNewLength );
0008e 8b 45 f4 mov eax, DWORD PTR _nNewLength$1[ebp]
00091 50 push eax
00092 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00095 e8 00 00 00 00 call ?Reallocate@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::Reallocate
$LN1@PrepareWri:
; 846 : }
; 847 : }
0009a 5f pop edi
0009b 5e pop esi
0009c 5b pop ebx
0009d 8b e5 mov esp, ebp
0009f 5d pop ebp
000a0 c2 04 00 ret 4
?PrepareWrite2@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite2
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?PrepareWrite@?$CSimpleStringT@_W$0A@@ATL@@AAEPA_WH@Z
_TEXT SEGMENT
_nTooShort$ = -16 ; size = 4
_nShared$ = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?PrepareWrite@?$CSimpleStringT@_W$0A@@ATL@@AAEPA_WH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite, COMDAT
; _this$ = ecx
; 803 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 50 sub esp, 80 ; 00000050H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 804 : if (nLength < 0)
0000c 83 7d 08 00 cmp DWORD PTR _nLength$[ebp], 0
00010 7d 0a jge SHORT $LN2@PrepareWri
; 805 : AtlThrow(E_INVALIDARG);
00012 68 57 00 07 80 push -2147024809 ; 80070057H
00017 e8 00 00 00 00 call ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
$LN2@PrepareWri:
; 806 :
; 807 : CStringData* pOldData = GetData();
0001c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0001f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
00024 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 808 : int nShared = 1-pOldData->nRefs; // nShared < 0 means true, >= 0 means false
00027 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0002a b9 01 00 00 00 mov ecx, 1
0002f 2b 48 0c sub ecx, DWORD PTR [eax+12]
00032 89 4d f4 mov DWORD PTR _nShared$[ebp], ecx
; 809 : int nTooShort = pOldData->nAllocLength-nLength; // nTooShort < 0 means true, >= 0 means false
00035 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00038 8b 48 08 mov ecx, DWORD PTR [eax+8]
0003b 2b 4d 08 sub ecx, DWORD PTR _nLength$[ebp]
0003e 89 4d f0 mov DWORD PTR _nTooShort$[ebp], ecx
; 810 : if( (nShared|nTooShort) < 0 ) // If either sign bit is set (i.e. either is less than zero), we need to copy data
00041 8b 45 f4 mov eax, DWORD PTR _nShared$[ebp]
00044 0b 45 f0 or eax, DWORD PTR _nTooShort$[ebp]
00047 7d 0c jge SHORT $LN3@PrepareWri
; 811 : {
; 812 : PrepareWrite2( nLength );
00049 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
0004c 50 push eax
0004d 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00050 e8 00 00 00 00 call ?PrepareWrite2@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite2
$LN3@PrepareWri:
; 813 : }
; 814 :
; 815 : return( m_pszData );
00055 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00058 8b 00 mov eax, DWORD PTR [eax]
$LN4@PrepareWri:
; 816 : }
0005a 5f pop edi
0005b 5e pop esi
0005c 5b pop ebx
0005d 8b e5 mov esp, ebp
0005f 5d pop ebp
00060 c2 04 00 ret 4
?PrepareWrite@?$CSimpleStringT@_W$0A@@ATL@@AAEPA_WH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ PROC ; ATL::CSimpleStringT<wchar_t,0>::GetData, COMDAT
; _this$ = ecx
; 799 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 800 : return( reinterpret_cast< CStringData* >( m_pszData )-1 );
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 8b 00 mov eax, DWORD PTR [eax]
00011 83 e8 10 sub eax, 16 ; 00000010H
; 801 : }
00014 5f pop edi
00015 5e pop esi
00016 5b pop ebx
00017 8b e5 mov esp, ebp
00019 5d pop ebp
0001a c3 ret 0
?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ENDP ; ATL::CSimpleStringT<wchar_t,0>::GetData
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Fork@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z
_TEXT SEGMENT
tv132 = -92 ; size = 4
tv83 = -92 ; size = 4
tv134 = -88 ; size = 4
tv86 = -88 ; size = 4
tv76 = -88 ; size = 4
_nCharsToCopy$ = -20 ; size = 4
_pNewData$ = -16 ; size = 4
_nOldLength$ = -12 ; size = 4
_pOldData$ = -8 ; size = 4
_this$ = -4 ; size = 4
_nLength$ = 8 ; size = 4
?Fork@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::Fork, COMDAT
; _this$ = ecx
; 783 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 5c sub esp, 92 ; 0000005cH
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 784 : CStringData* pOldData = GetData();
0000c 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0000f e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
00014 89 45 f8 mov DWORD PTR _pOldData$[ebp], eax
; 785 : int nOldLength = pOldData->nDataLength;
00017 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
0001a 8b 48 04 mov ecx, DWORD PTR [eax+4]
0001d 89 4d f4 mov DWORD PTR _nOldLength$[ebp], ecx
; 786 : CStringData* pNewData = pOldData->pStringMgr->Clone()->Allocate( nLength, sizeof( XCHAR ) );
00020 8b 45 f8 mov eax, DWORD PTR _pOldData$[ebp]
00023 8b 08 mov ecx, DWORD PTR [eax]
00025 8b 55 f8 mov edx, DWORD PTR _pOldData$[ebp]
00028 8b 01 mov eax, DWORD PTR [ecx]
0002a 8b 0a mov ecx, DWORD PTR [edx]
0002c 8b 50 10 mov edx, DWORD PTR [eax+16]
0002f ff d2 call edx
00031 89 45 a8 mov DWORD PTR tv76[ebp], eax
00034 8b 45 a8 mov eax, DWORD PTR tv76[ebp]
00037 8b 08 mov ecx, DWORD PTR [eax]
00039 8b 11 mov edx, DWORD PTR [ecx]
0003b 89 55 a4 mov DWORD PTR tv83[ebp], edx
0003e 6a 02 push 2
00040 8b 45 08 mov eax, DWORD PTR _nLength$[ebp]
00043 50 push eax
00044 8b 4d a8 mov ecx, DWORD PTR tv76[ebp]
00047 ff 55 a4 call DWORD PTR tv83[ebp]
0004a 89 45 f0 mov DWORD PTR _pNewData$[ebp], eax
; 787 : if( pNewData == NULL )
0004d 83 7d f0 00 cmp DWORD PTR _pNewData$[ebp], 0
00051 75 05 jne SHORT $LN2@Fork
; 788 : {
; 789 : ThrowMemoryException();
00053 e8 00 00 00 00 call ?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ ; ATL::CSimpleStringT<wchar_t,0>::ThrowMemoryException
$LN2@Fork:
; 790 : }
; 791 : int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
00058 8b 45 f4 mov eax, DWORD PTR _nOldLength$[ebp]
0005b 3b 45 08 cmp eax, DWORD PTR _nLength$[ebp]
0005e 7d 08 jge SHORT $LN4@Fork
00060 8b 4d f4 mov ecx, DWORD PTR _nOldLength$[ebp]
00063 89 4d a8 mov DWORD PTR tv86[ebp], ecx
00066 eb 06 jmp SHORT $LN5@Fork
$LN4@Fork:
00068 8b 55 08 mov edx, DWORD PTR _nLength$[ebp]
0006b 89 55 a8 mov DWORD PTR tv86[ebp], edx
$LN5@Fork:
0006e 8b 45 a8 mov eax, DWORD PTR tv86[ebp]
00071 83 c0 01 add eax, 1
00074 89 45 ec mov DWORD PTR _nCharsToCopy$[ebp], eax
; 792 : memcpy_s( PXSTR( pNewData->data() ), nCharsToCopy * sizeof( XCHAR ),
00077 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
0007a e8 00 00 00 00 call ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
0007f 89 45 a8 mov DWORD PTR tv134[ebp], eax
00082 8b 4d f0 mov ecx, DWORD PTR _pNewData$[ebp]
00085 e8 00 00 00 00 call ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
0008a 89 45 a4 mov DWORD PTR tv132[ebp], eax
0008d 8b 45 ec mov eax, DWORD PTR _nCharsToCopy$[ebp]
00090 d1 e0 shl eax, 1
00092 50 push eax
00093 8b 4d a8 mov ecx, DWORD PTR tv134[ebp]
00096 51 push ecx
00097 8b 55 ec mov edx, DWORD PTR _nCharsToCopy$[ebp]
0009a d1 e2 shl edx, 1
0009c 52 push edx
0009d 8b 45 a4 mov eax, DWORD PTR tv132[ebp]
000a0 50 push eax
000a1 e8 00 00 00 00 call _memcpy_s
000a6 83 c4 10 add esp, 16 ; 00000010H
; 793 : PCXSTR( pOldData->data() ), nCharsToCopy * sizeof( XCHAR ));
; 794 : pNewData->nDataLength = nOldLength;
000a9 8b 45 f0 mov eax, DWORD PTR _pNewData$[ebp]
000ac 8b 4d f4 mov ecx, DWORD PTR _nOldLength$[ebp]
000af 89 48 04 mov DWORD PTR [eax+4], ecx
; 795 : pOldData->Release();
000b2 8b 4d f8 mov ecx, DWORD PTR _pOldData$[ebp]
000b5 e8 00 00 00 00 call ?Release@CStringData@ATL@@QAEXXZ ; ATL::CStringData::Release
; 796 : Attach( pNewData );
000ba 8b 45 f0 mov eax, DWORD PTR _pNewData$[ebp]
000bd 50 push eax
000be 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
000c1 e8 00 00 00 00 call ?Attach@?$CSimpleStringT@_W$0A@@ATL@@AAEXPAUCStringData@2@@Z ; ATL::CSimpleStringT<wchar_t,0>::Attach
$LN3@Fork:
; 797 : }
000c6 5f pop edi
000c7 5e pop esi
000c8 5b pop ebx
000c9 8b e5 mov esp, ebp
000cb 5d pop ebp
000cc c2 04 00 ret 4
?Fork@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::Fork
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Attach@?$CSimpleStringT@_W$0A@@ATL@@AAEXPAUCStringData@2@@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_pData$ = 8 ; size = 4
?Attach@?$CSimpleStringT@_W$0A@@ATL@@AAEXPAUCStringData@2@@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::Attach, COMDAT
; _this$ = ecx
; 779 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 780 : m_pszData = static_cast< PXSTR >( pData->data() );
0000c 8b 4d 08 mov ecx, DWORD PTR _pData$[ebp]
0000f e8 00 00 00 00 call ?data@CStringData@ATL@@QAEPAXXZ ; ATL::CStringData::data
00014 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00017 89 01 mov DWORD PTR [ecx], eax
; 781 : }
00019 5f pop edi
0001a 5e pop esi
0001b 5b pop ebx
0001c 8b e5 mov esp, ebp
0001e 5d pop ebp
0001f c2 04 00 ret 4
?Attach@?$CSimpleStringT@_W$0A@@ATL@@AAEXPAUCStringData@2@@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::Attach
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ
_TEXT SEGMENT
?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ PROC ; ATL::CSimpleStringT<wchar_t,0>::ThrowMemoryException, COMDAT
; 772 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
; 773 : AtlThrow( E_OUTOFMEMORY );
00009 68 0e 00 07 80 push -2147024882 ; 8007000eH
0000e e8 00 00 00 00 call ?AtlThrowImpl@ATL@@YGXJ@Z ; ATL::AtlThrowImpl
$LN2@ThrowMemor:
; 774 : }
00013 5f pop edi
00014 5e pop esi
00015 5b pop ebx
00016 8b e5 mov esp, ebp
00018 5d pop ebp
00019 c3 ret 0
?ThrowMemoryException@?$CSimpleStringT@_W$0A@@ATL@@KAXXZ ENDP ; ATL::CSimpleStringT<wchar_t,0>::ThrowMemoryException
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z
_TEXT SEGMENT
__$EHRec$ = -12 ; size = 12
_psz$ = 8 ; size = 4
_sizeInXChar$ = 12 ; size = 4
?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::StringLengthN, COMDAT
; 749 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 6a ff push -1
00005 68 00 00 00 00 push __ehhandler$?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z
0000a 64 a1 00 00 00
00 mov eax, DWORD PTR fs:0
00010 50 push eax
00011 83 ec 40 sub esp, 64 ; 00000040H
00014 53 push ebx
00015 56 push esi
00016 57 push edi
00017 a1 00 00 00 00 mov eax, DWORD PTR ___security_cookie
0001c 33 c5 xor eax, ebp
0001e 50 push eax
0001f 8d 45 f4 lea eax, DWORD PTR __$EHRec$[ebp]
00022 64 a3 00 00 00
00 mov DWORD PTR fs:0, eax
; 750 : if( psz == NULL )
00028 83 7d 08 00 cmp DWORD PTR _psz$[ebp], 0
0002c 75 04 jne SHORT $LN2@StringLeng
; 751 : {
; 752 : return( 0 );
0002e 33 c0 xor eax, eax
00030 eb 10 jmp SHORT $LN1@StringLeng
$LN2@StringLeng:
; 753 : }
; 754 : return( int( wcsnlen( psz, sizeInXChar ) ) );
00032 8b 45 0c mov eax, DWORD PTR _sizeInXChar$[ebp]
00035 50 push eax
00036 8b 4d 08 mov ecx, DWORD PTR _psz$[ebp]
00039 51 push ecx
0003a e8 00 00 00 00 call _wcsnlen
0003f 83 c4 08 add esp, 8
$LN1@StringLeng:
; 755 : }
00042 8b 4d f4 mov ecx, DWORD PTR __$EHRec$[ebp]
00045 64 89 0d 00 00
00 00 mov DWORD PTR fs:0, ecx
0004c 59 pop ecx
0004d 5f pop edi
0004e 5e pop esi
0004f 5b pop ebx
00050 8b e5 mov esp, ebp
00052 5d pop ebp
00053 c3 ret 0
00054 cc int 3
00055 cc int 3
00056 cc int 3
00057 cc int 3
00058 cc int 3
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__ehhandler$?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z:
00000 90 npad 1
00001 90 npad 1
00002 8b 54 24 08 mov edx, DWORD PTR [esp+8]
00006 8d 42 0c lea eax, DWORD PTR [edx+12]
00009 8b 4a b0 mov ecx, DWORD PTR [edx-80]
0000c 33 c8 xor ecx, eax
0000e e8 00 00 00 00 call @__security_check_cookie@4
00013 b8 00 00 00 00 mov eax, OFFSET __ehfuncinfo$?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z
00018 e9 00 00 00 00 jmp ___CxxFrameHandler3
text$x ENDS
?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::StringLengthN
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z
_TEXT SEGMENT
_nAlloc$1 = -8 ; size = 4
_this$ = -4 ; size = 4
_nNewLength$ = 8 ; size = 4
?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer, COMDAT
; _this$ = ecx
; 557 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 48 sub esp, 72 ; 00000048H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 558 : if( nNewLength == -1 )
0000c 83 7d 08 ff cmp DWORD PTR _nNewLength$[ebp], -1
00010 75 23 jne SHORT $LN2@ReleaseBuf
; 559 : {
; 560 : int nAlloc = GetData()->nAllocLength;
00012 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00015 e8 00 00 00 00 call ?GetData@?$CSimpleStringT@_W$0A@@ATL@@ABEPAUCStringData@2@XZ ; ATL::CSimpleStringT<wchar_t,0>::GetData
0001a 8b 40 08 mov eax, DWORD PTR [eax+8]
0001d 89 45 f8 mov DWORD PTR _nAlloc$1[ebp], eax
; 561 : nNewLength = StringLengthN( m_pszData, nAlloc);
00020 8b 45 f8 mov eax, DWORD PTR _nAlloc$1[ebp]
00023 50 push eax
00024 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00027 8b 11 mov edx, DWORD PTR [ecx]
00029 52 push edx
0002a e8 00 00 00 00 call ?StringLengthN@?$CSimpleStringT@_W$0A@@ATL@@SAHPB_WI@Z ; ATL::CSimpleStringT<wchar_t,0>::StringLengthN
0002f 83 c4 08 add esp, 8
00032 89 45 08 mov DWORD PTR _nNewLength$[ebp], eax
$LN2@ReleaseBuf:
; 562 : }
; 563 : SetLength( nNewLength );
00035 8b 45 08 mov eax, DWORD PTR _nNewLength$[ebp]
00038 50 push eax
00039 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
0003c e8 00 00 00 00 call ?SetLength@?$CSimpleStringT@_W$0A@@ATL@@AAEXH@Z ; ATL::CSimpleStringT<wchar_t,0>::SetLength
; 564 : }
00041 5f pop edi
00042 5e pop esi
00043 5b pop ebx
00044 8b e5 mov esp, ebp
00046 5d pop ebp
00047 c2 04 00 ret 4
?ReleaseBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEXH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::ReleaseBuffer
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_nMinBufferLength$ = 8 ; size = 4
?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z PROC ; ATL::CSimpleStringT<wchar_t,0>::GetBuffer, COMDAT
; _this$ = ecx
; 507 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 508 : return( PrepareWrite( nMinBufferLength ) );
0000c 8b 45 08 mov eax, DWORD PTR _nMinBufferLength$[ebp]
0000f 50 push eax
00010 8b 4d fc mov ecx, DWORD PTR _this$[ebp]
00013 e8 00 00 00 00 call ?PrepareWrite@?$CSimpleStringT@_W$0A@@ATL@@AAEPA_WH@Z ; ATL::CSimpleStringT<wchar_t,0>::PrepareWrite
; 509 : }
00018 5f pop edi
00019 5e pop esi
0001a 5b pop ebx
0001b 8b e5 mov esp, ebp
0001d 5d pop ebp
0001e c2 04 00 ret 4
?GetBuffer@?$CSimpleStringT@_W$0A@@ATL@@QAEPA_WH@Z ENDP ; ATL::CSimpleStringT<wchar_t,0>::GetBuffer
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?Release@CStringData@ATL@@QAEXXZ
_TEXT SEGMENT
tv79 = -76 ; size = 4
tv77 = -72 ; size = 4
_this$ = -4 ; size = 4
?Release@CStringData@ATL@@QAEXXZ PROC ; ATL::CStringData::Release, COMDAT
; _this$ = ecx
; 85 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 4c sub esp, 76 ; 0000004cH
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 86 : ATLASSERT( nRefs != 0 );
; 87 :
; 88 : if( _InterlockedDecrement( &nRefs ) <= 0 )
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 83 c0 0c add eax, 12 ; 0000000cH
00012 83 c9 ff or ecx, -1
00015 f0 0f c1 08 lock xadd DWORD PTR [eax], ecx
00019 49 dec ecx
0001a 85 c9 test ecx, ecx
0001c 7f 1f jg SHORT $LN1@Release
; 89 : {
; 90 : pStringMgr->Free( this );
0001e 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00021 8b 08 mov ecx, DWORD PTR [eax]
00023 89 4d b8 mov DWORD PTR tv77[ebp], ecx
00026 8b 55 fc mov edx, DWORD PTR _this$[ebp]
00029 8b 02 mov eax, DWORD PTR [edx]
0002b 8b 08 mov ecx, DWORD PTR [eax]
0002d 8b 51 04 mov edx, DWORD PTR [ecx+4]
00030 89 55 b4 mov DWORD PTR tv79[ebp], edx
00033 8b 45 fc mov eax, DWORD PTR _this$[ebp]
00036 50 push eax
00037 8b 4d b8 mov ecx, DWORD PTR tv77[ebp]
0003a ff 55 b4 call DWORD PTR tv79[ebp]
$LN1@Release:
; 91 : }
; 92 : }
0003d 5f pop edi
0003e 5e pop esi
0003f 5b pop ebx
00040 8b e5 mov esp, ebp
00042 5d pop ebp
00043 c3 ret 0
?Release@CStringData@ATL@@QAEXXZ ENDP ; ATL::CStringData::Release
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?IsShared@CStringData@ATL@@QBE_NXZ
_TEXT SEGMENT
tv66 = -72 ; size = 4
_this$ = -4 ; size = 4
?IsShared@CStringData@ATL@@QBE_NXZ PROC ; ATL::CStringData::IsShared, COMDAT
; _this$ = ecx
; 72 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 48 sub esp, 72 ; 00000048H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 73 : return( nRefs > 1 );
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 83 78 0c 01 cmp DWORD PTR [eax+12], 1
00013 7e 09 jle SHORT $LN3@IsShared
00015 c7 45 b8 01 00
00 00 mov DWORD PTR tv66[ebp], 1
0001c eb 07 jmp SHORT $LN4@IsShared
$LN3@IsShared:
0001e c7 45 b8 00 00
00 00 mov DWORD PTR tv66[ebp], 0
$LN4@IsShared:
00025 8a 45 b8 mov al, BYTE PTR tv66[ebp]
; 74 : }
00028 5f pop edi
00029 5e pop esi
0002a 5b pop ebx
0002b 8b e5 mov esp, ebp
0002d 5d pop ebp
0002e c3 ret 0
?IsShared@CStringData@ATL@@QBE_NXZ ENDP ; ATL::CStringData::IsShared
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlsimpstr.h
; COMDAT ?data@CStringData@ATL@@QAEPAXXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?data@CStringData@ATL@@QAEPAXXZ PROC ; ATL::CStringData::data, COMDAT
; _this$ = ecx
; 58 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 89 4d fc mov DWORD PTR _this$[ebp], ecx
; 59 : return (this+1);
0000c 8b 45 fc mov eax, DWORD PTR _this$[ebp]
0000f 83 c0 10 add eax, 16 ; 00000010H
; 60 : }
00012 5f pop edi
00013 5e pop esi
00014 5b pop ebx
00015 8b e5 mov esp, ebp
00017 5d pop ebp
00018 c3 ret 0
?data@CStringData@ATL@@QAEPAXXZ ENDP ; ATL::CStringData::data
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\atlmfc\include\atlexcept.h
; COMDAT ?AtlThrowImpl@ATL@@YGXJ@Z
_TEXT SEGMENT
_hr$ = 8 ; size = 4
?AtlThrowImpl@ATL@@YGXJ@Z PROC ; ATL::AtlThrowImpl, COMDAT
; 65 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
; 66 : ATLTRACE(atlTraceException, 0, _T("AtlThrow: hr = 0x%x\n"), hr );
; 67 : #ifdef _AFX
; 68 : if( hr == E_OUTOFMEMORY )
00009 81 7d 08 0e 00
07 80 cmp DWORD PTR _hr$[ebp], -2147024882 ; 8007000eH
00010 75 07 jne SHORT $LN2@AtlThrowIm
; 69 : {
; 70 : AfxThrowMemoryException();
00012 e8 00 00 00 00 call ?AfxThrowMemoryException@@YGXXZ ; AfxThrowMemoryException
; 71 : }
00017 eb 09 jmp SHORT $LN4@AtlThrowIm
$LN2@AtlThrowIm:
; 72 : else
; 73 : {
; 74 : AfxThrowOleException( hr );
00019 8b 45 08 mov eax, DWORD PTR _hr$[ebp]
0001c 50 push eax
0001d e8 00 00 00 00 call ?AfxThrowOleException@@YGXJ@Z ; AfxThrowOleException
$LN4@AtlThrowIm:
; 75 : }
; 76 : #else
; 77 : throw CAtlException( hr );
; 78 : #endif
; 79 : };
00022 5f pop edi
00023 5e pop esi
00024 5b pop ebx
00025 8b e5 mov esp, ebp
00027 5d pop ebp
00028 c2 04 00 ret 4
?AtlThrowImpl@ATL@@YGXJ@Z ENDP ; ATL::AtlThrowImpl
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_memcpy_s.h
; COMDAT _memcpy_s
_TEXT SEGMENT
tv79 = -80 ; size = 4
tv75 = -80 ; size = 4
tv66 = -80 ; size = 4
__Expr_val$1 = -12 ; size = 4
__Expr_val$2 = -8 ; size = 4
__Expr_val$3 = -4 ; size = 4
__Destination$ = 8 ; size = 4
__DestinationSize$ = 12 ; size = 4
__Source$ = 16 ; size = 4
__SourceSize$ = 20 ; size = 4
_memcpy_s PROC ; COMDAT
; 45 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 50 sub esp, 80 ; 00000050H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
; 46 : if (_SourceSize == 0)
00009 83 7d 14 00 cmp DWORD PTR __SourceSize$[ebp], 0
0000d 75 07 jne SHORT $LN2@memcpy_s
; 47 : {
; 48 : return 0;
0000f 33 c0 xor eax, eax
00011 e9 f1 00 00 00 jmp $LN1@memcpy_s
$LN2@memcpy_s:
; 49 : }
; 50 :
; 51 : _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_Destination != NULL, EINVAL);
00016 83 7d 08 00 cmp DWORD PTR __Destination$[ebp], 0
0001a 74 09 je SHORT $LN9@memcpy_s
0001c c7 45 b0 01 00
00 00 mov DWORD PTR tv66[ebp], 1
00023 eb 07 jmp SHORT $LN10@memcpy_s
$LN9@memcpy_s:
00025 c7 45 b0 00 00
00 00 mov DWORD PTR tv66[ebp], 0
$LN10@memcpy_s:
0002c 8b 45 b0 mov eax, DWORD PTR tv66[ebp]
0002f 89 45 fc mov DWORD PTR __Expr_val$3[ebp], eax
00032 83 7d fc 00 cmp DWORD PTR __Expr_val$3[ebp], 0
00036 75 1a jne SHORT $LN3@memcpy_s
00038 e8 00 00 00 00 call __errno
0003d c7 00 16 00 00
00 mov DWORD PTR [eax], 22 ; 00000016H
00043 e8 00 00 00 00 call __invalid_parameter_noinfo
00048 b8 16 00 00 00 mov eax, 22 ; 00000016H
0004d e9 b5 00 00 00 jmp $LN1@memcpy_s
$LN3@memcpy_s:
; 52 : if (_Source == NULL || _DestinationSize < _SourceSize)
00052 83 7d 10 00 cmp DWORD PTR __Source$[ebp], 0
00056 74 0c je SHORT $LN5@memcpy_s
00058 8b 45 0c mov eax, DWORD PTR __DestinationSize$[ebp]
0005b 3b 45 14 cmp eax, DWORD PTR __SourceSize$[ebp]
0005e 0f 83 8d 00 00
00 jae $LN4@memcpy_s
$LN5@memcpy_s:
; 53 : {
; 54 : memset(_Destination, 0, _DestinationSize);
00064 8b 45 0c mov eax, DWORD PTR __DestinationSize$[ebp]
00067 50 push eax
00068 6a 00 push 0
0006a 8b 4d 08 mov ecx, DWORD PTR __Destination$[ebp]
0006d 51 push ecx
0006e e8 00 00 00 00 call _memset
00073 83 c4 0c add esp, 12 ; 0000000cH
; 55 :
; 56 : _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_Source != NULL, EINVAL);
00076 83 7d 10 00 cmp DWORD PTR __Source$[ebp], 0
0007a 74 09 je SHORT $LN11@memcpy_s
0007c c7 45 b0 01 00
00 00 mov DWORD PTR tv75[ebp], 1
00083 eb 07 jmp SHORT $LN12@memcpy_s
$LN11@memcpy_s:
00085 c7 45 b0 00 00
00 00 mov DWORD PTR tv75[ebp], 0
$LN12@memcpy_s:
0008c 8b 45 b0 mov eax, DWORD PTR tv75[ebp]
0008f 89 45 f8 mov DWORD PTR __Expr_val$2[ebp], eax
00092 83 7d f8 00 cmp DWORD PTR __Expr_val$2[ebp], 0
00096 75 17 jne SHORT $LN6@memcpy_s
00098 e8 00 00 00 00 call __errno
0009d c7 00 16 00 00
00 mov DWORD PTR [eax], 22 ; 00000016H
000a3 e8 00 00 00 00 call __invalid_parameter_noinfo
000a8 b8 16 00 00 00 mov eax, 22 ; 00000016H
000ad eb 58 jmp SHORT $LN1@memcpy_s
$LN6@memcpy_s:
; 57 : _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_DestinationSize >= _SourceSize, ERANGE);
000af 8b 45 0c mov eax, DWORD PTR __DestinationSize$[ebp]
000b2 3b 45 14 cmp eax, DWORD PTR __SourceSize$[ebp]
000b5 72 09 jb SHORT $LN13@memcpy_s
000b7 c7 45 b0 01 00
00 00 mov DWORD PTR tv79[ebp], 1
000be eb 07 jmp SHORT $LN14@memcpy_s
$LN13@memcpy_s:
000c0 c7 45 b0 00 00
00 00 mov DWORD PTR tv79[ebp], 0
$LN14@memcpy_s:
000c7 8b 4d b0 mov ecx, DWORD PTR tv79[ebp]
000ca 89 4d f4 mov DWORD PTR __Expr_val$1[ebp], ecx
000cd 83 7d f4 00 cmp DWORD PTR __Expr_val$1[ebp], 0
000d1 75 17 jne SHORT $LN7@memcpy_s
000d3 e8 00 00 00 00 call __errno
000d8 c7 00 22 00 00
00 mov DWORD PTR [eax], 34 ; 00000022H
000de e8 00 00 00 00 call __invalid_parameter_noinfo
000e3 b8 22 00 00 00 mov eax, 34 ; 00000022H
000e8 eb 1d jmp SHORT $LN1@memcpy_s
$LN7@memcpy_s:
; 58 :
; 59 : // Unreachable, but required to suppress /analyze warnings:
; 60 : return EINVAL;
000ea b8 16 00 00 00 mov eax, 22 ; 00000016H
000ef eb 16 jmp SHORT $LN1@memcpy_s
$LN4@memcpy_s:
; 61 : }
; 62 : memcpy(_Destination, _Source, _SourceSize);
000f1 8b 45 14 mov eax, DWORD PTR __SourceSize$[ebp]
000f4 50 push eax
000f5 8b 4d 10 mov ecx, DWORD PTR __Source$[ebp]
000f8 51 push ecx
000f9 8b 55 08 mov edx, DWORD PTR __Destination$[ebp]
000fc 52 push edx
000fd e8 00 00 00 00 call _memcpy
00102 83 c4 0c add esp, 12 ; 0000000cH
; 63 : return 0;
00105 33 c0 xor eax, eax
$LN1@memcpy_s:
; 64 : }
00107 5f pop edi
00108 5e pop esi
00109 5b pop ebx
0010a 8b e5 mov esp, ebp
0010c 5d pop ebp
0010d c3 ret 0
_memcpy_s ENDP
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?__empty_global_delete@@YAXPAXIW4align_val_t@std@@@Z
_TEXT SEGMENT
___formal$ = 8 ; size = 4
___formal$ = 12 ; size = 4
___formal$ = 16 ; size = 4
?__empty_global_delete@@YAXPAXIW4align_val_t@std@@@Z PROC ; __empty_global_delete, COMDAT
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 5f pop edi
0000a 5e pop esi
0000b 5b pop ebx
0000c 8b e5 mov esp, ebp
0000e 5d pop ebp
0000f c3 ret 0
?__empty_global_delete@@YAXPAXIW4align_val_t@std@@@Z ENDP ; __empty_global_delete
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?__empty_global_delete@@YAXPAXW4align_val_t@std@@@Z
_TEXT SEGMENT
___formal$ = 8 ; size = 4
___formal$ = 12 ; size = 4
?__empty_global_delete@@YAXPAXW4align_val_t@std@@@Z PROC ; __empty_global_delete, COMDAT
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 5f pop edi
0000a 5e pop esi
0000b 5b pop ebx
0000c 8b e5 mov esp, ebp
0000e 5d pop ebp
0000f c3 ret 0
?__empty_global_delete@@YAXPAXW4align_val_t@std@@@Z ENDP ; __empty_global_delete
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?__empty_global_delete@@YAXPAXI@Z
_TEXT SEGMENT
___formal$ = 8 ; size = 4
___formal$ = 12 ; size = 4
?__empty_global_delete@@YAXPAXI@Z PROC ; __empty_global_delete, COMDAT
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 5f pop edi
0000a 5e pop esi
0000b 5b pop ebx
0000c 8b e5 mov esp, ebp
0000e 5d pop ebp
0000f c3 ret 0
?__empty_global_delete@@YAXPAXI@Z ENDP ; __empty_global_delete
_TEXT ENDS
; Function compile flags: /Odtp /ZI
; File D:\Works\Corpsms_2010\public\ProxySocket\CBase64Coding.cpp
; COMDAT ?__empty_global_delete@@YAXPAX@Z
_TEXT SEGMENT
___formal$ = 8 ; size = 4
?__empty_global_delete@@YAXPAX@Z PROC ; __empty_global_delete, COMDAT
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 40 sub esp, 64 ; 00000040H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 5f pop edi
0000a 5e pop esi
0000b 5b pop ebx
0000c 8b e5 mov esp, ebp
0000e 5d pop ebp
0000f c3 ret 0
?__empty_global_delete@@YAXPAX@Z ENDP ; __empty_global_delete
_TEXT ENDS
END