; Listing generated by Microsoft (R) Optimizing Compiler Version 15.00.30729.01 

	TITLE	d:\# METIN2\work in progress\source client\Client\EterBase\tea.cpp
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES

PUBLIC	??_C@_0P@GHFPNOJB@bad?5allocation?$AA@		; `string'
PUBLIC	?_Value@?$_Is_swap_move@U_Swap_move_tag@std@@@std@@2_NB ; std::_Is_swap_move<std::_Swap_move_tag>::_Value
PUBLIC	?collate@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::collate
PUBLIC	?ctype@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::ctype
PUBLIC	?monetary@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::monetary
PUBLIC	?numeric@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::numeric
PUBLIC	?time@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::time
PUBLIC	?messages@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::messages
PUBLIC	?all@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::all
PUBLIC	?none@?$_Locbase@H@std@@2HB			; std::_Locbase<int>::none
PUBLIC	?table_size@?$ctype@D@std@@2IB			; std::ctype<char>::table_size
PUBLIC	?skipws@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::skipws
PUBLIC	?unitbuf@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::unitbuf
PUBLIC	?uppercase@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::uppercase
PUBLIC	?showbase@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::showbase
PUBLIC	?showpoint@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::showpoint
PUBLIC	?showpos@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::showpos
PUBLIC	?left@?$_Iosb@H@std@@2W4_Fmtflags@12@B		; std::_Iosb<int>::left
PUBLIC	?right@?$_Iosb@H@std@@2W4_Fmtflags@12@B		; std::_Iosb<int>::right
PUBLIC	?internal@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::internal
PUBLIC	?dec@?$_Iosb@H@std@@2W4_Fmtflags@12@B		; std::_Iosb<int>::dec
PUBLIC	?oct@?$_Iosb@H@std@@2W4_Fmtflags@12@B		; std::_Iosb<int>::oct
PUBLIC	?hex@?$_Iosb@H@std@@2W4_Fmtflags@12@B		; std::_Iosb<int>::hex
PUBLIC	?scientific@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::scientific
PUBLIC	?fixed@?$_Iosb@H@std@@2W4_Fmtflags@12@B		; std::_Iosb<int>::fixed
PUBLIC	?hexfloat@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::hexfloat
PUBLIC	?boolalpha@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::boolalpha
PUBLIC	?_Stdio@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::_Stdio
PUBLIC	?adjustfield@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::adjustfield
PUBLIC	?basefield@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::basefield
PUBLIC	?floatfield@?$_Iosb@H@std@@2W4_Fmtflags@12@B	; std::_Iosb<int>::floatfield
PUBLIC	?goodbit@?$_Iosb@H@std@@2W4_Iostate@12@B	; std::_Iosb<int>::goodbit
PUBLIC	?eofbit@?$_Iosb@H@std@@2W4_Iostate@12@B		; std::_Iosb<int>::eofbit
PUBLIC	?failbit@?$_Iosb@H@std@@2W4_Iostate@12@B	; std::_Iosb<int>::failbit
PUBLIC	?badbit@?$_Iosb@H@std@@2W4_Iostate@12@B		; std::_Iosb<int>::badbit
PUBLIC	?_Hardfail@?$_Iosb@H@std@@2W4_Iostate@12@B	; std::_Iosb<int>::_Hardfail
PUBLIC	?in@?$_Iosb@H@std@@2W4_Openmode@12@B		; std::_Iosb<int>::in
PUBLIC	?out@?$_Iosb@H@std@@2W4_Openmode@12@B		; std::_Iosb<int>::out
PUBLIC	?ate@?$_Iosb@H@std@@2W4_Openmode@12@B		; std::_Iosb<int>::ate
PUBLIC	?app@?$_Iosb@H@std@@2W4_Openmode@12@B		; std::_Iosb<int>::app
PUBLIC	?trunc@?$_Iosb@H@std@@2W4_Openmode@12@B		; std::_Iosb<int>::trunc
PUBLIC	?_Nocreate@?$_Iosb@H@std@@2W4_Openmode@12@B	; std::_Iosb<int>::_Nocreate
PUBLIC	?_Noreplace@?$_Iosb@H@std@@2W4_Openmode@12@B	; std::_Iosb<int>::_Noreplace
PUBLIC	?binary@?$_Iosb@H@std@@2W4_Openmode@12@B	; std::_Iosb<int>::binary
PUBLIC	?beg@?$_Iosb@H@std@@2W4_Seekdir@12@B		; std::_Iosb<int>::beg
PUBLIC	?cur@?$_Iosb@H@std@@2W4_Seekdir@12@B		; std::_Iosb<int>::cur
PUBLIC	?end@?$_Iosb@H@std@@2W4_Seekdir@12@B		; std::_Iosb<int>::end
PUBLIC	?value@?$integral_constant@_N$0A@@tr1@std@@2_NB	; std::tr1::integral_constant<bool,0>::value
PUBLIC	?value@?$integral_constant@_N$00@tr1@std@@2_NB	; std::tr1::integral_constant<bool,1>::value
;	COMDAT ?value@?$integral_constant@_N$00@tr1@std@@2_NB
CONST	SEGMENT
?value@?$integral_constant@_N$00@tr1@std@@2_NB DB 01H	; std::tr1::integral_constant<bool,1>::value
CONST	ENDS
;	COMDAT ?value@?$integral_constant@_N$0A@@tr1@std@@2_NB
CONST	SEGMENT
?value@?$integral_constant@_N$0A@@tr1@std@@2_NB DB 00H	; std::tr1::integral_constant<bool,0>::value
CONST	ENDS
;	COMDAT ?end@?$_Iosb@H@std@@2W4_Seekdir@12@B
CONST	SEGMENT
?end@?$_Iosb@H@std@@2W4_Seekdir@12@B DD 02H		; std::_Iosb<int>::end
CONST	ENDS
;	COMDAT ?cur@?$_Iosb@H@std@@2W4_Seekdir@12@B
CONST	SEGMENT
?cur@?$_Iosb@H@std@@2W4_Seekdir@12@B DD 01H		; std::_Iosb<int>::cur
CONST	ENDS
;	COMDAT ?beg@?$_Iosb@H@std@@2W4_Seekdir@12@B
CONST	SEGMENT
?beg@?$_Iosb@H@std@@2W4_Seekdir@12@B DD 00H		; std::_Iosb<int>::beg
CONST	ENDS
;	COMDAT ?binary@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?binary@?$_Iosb@H@std@@2W4_Openmode@12@B DD 020H	; std::_Iosb<int>::binary
CONST	ENDS
;	COMDAT ?_Noreplace@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?_Noreplace@?$_Iosb@H@std@@2W4_Openmode@12@B DD 080H	; std::_Iosb<int>::_Noreplace
CONST	ENDS
;	COMDAT ?_Nocreate@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?_Nocreate@?$_Iosb@H@std@@2W4_Openmode@12@B DD 040H	; std::_Iosb<int>::_Nocreate
CONST	ENDS
;	COMDAT ?trunc@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?trunc@?$_Iosb@H@std@@2W4_Openmode@12@B DD 010H		; std::_Iosb<int>::trunc
CONST	ENDS
;	COMDAT ?app@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?app@?$_Iosb@H@std@@2W4_Openmode@12@B DD 08H		; std::_Iosb<int>::app
CONST	ENDS
;	COMDAT ?ate@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?ate@?$_Iosb@H@std@@2W4_Openmode@12@B DD 04H		; std::_Iosb<int>::ate
CONST	ENDS
;	COMDAT ?out@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?out@?$_Iosb@H@std@@2W4_Openmode@12@B DD 02H		; std::_Iosb<int>::out
CONST	ENDS
;	COMDAT ?in@?$_Iosb@H@std@@2W4_Openmode@12@B
CONST	SEGMENT
?in@?$_Iosb@H@std@@2W4_Openmode@12@B DD 01H		; std::_Iosb<int>::in
CONST	ENDS
;	COMDAT ?_Hardfail@?$_Iosb@H@std@@2W4_Iostate@12@B
CONST	SEGMENT
?_Hardfail@?$_Iosb@H@std@@2W4_Iostate@12@B DD 010H	; std::_Iosb<int>::_Hardfail
CONST	ENDS
;	COMDAT ?badbit@?$_Iosb@H@std@@2W4_Iostate@12@B
CONST	SEGMENT
?badbit@?$_Iosb@H@std@@2W4_Iostate@12@B DD 04H		; std::_Iosb<int>::badbit
CONST	ENDS
;	COMDAT ?failbit@?$_Iosb@H@std@@2W4_Iostate@12@B
CONST	SEGMENT
?failbit@?$_Iosb@H@std@@2W4_Iostate@12@B DD 02H		; std::_Iosb<int>::failbit
CONST	ENDS
;	COMDAT ?eofbit@?$_Iosb@H@std@@2W4_Iostate@12@B
CONST	SEGMENT
?eofbit@?$_Iosb@H@std@@2W4_Iostate@12@B DD 01H		; std::_Iosb<int>::eofbit
CONST	ENDS
;	COMDAT ?goodbit@?$_Iosb@H@std@@2W4_Iostate@12@B
CONST	SEGMENT
?goodbit@?$_Iosb@H@std@@2W4_Iostate@12@B DD 00H		; std::_Iosb<int>::goodbit
CONST	ENDS
;	COMDAT ?floatfield@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?floatfield@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 03000H	; std::_Iosb<int>::floatfield
CONST	ENDS
;	COMDAT ?basefield@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?basefield@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 0e00H	; std::_Iosb<int>::basefield
CONST	ENDS
;	COMDAT ?adjustfield@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?adjustfield@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 01c0H	; std::_Iosb<int>::adjustfield
CONST	ENDS
;	COMDAT ?_Stdio@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?_Stdio@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 08000H	; std::_Iosb<int>::_Stdio
CONST	ENDS
;	COMDAT ?boolalpha@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?boolalpha@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 04000H	; std::_Iosb<int>::boolalpha
CONST	ENDS
;	COMDAT ?hexfloat@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?hexfloat@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 03000H	; std::_Iosb<int>::hexfloat
CONST	ENDS
;	COMDAT ?fixed@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?fixed@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 02000H	; std::_Iosb<int>::fixed
CONST	ENDS
;	COMDAT ?scientific@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?scientific@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 01000H	; std::_Iosb<int>::scientific
CONST	ENDS
;	COMDAT ?hex@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?hex@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 0800H		; std::_Iosb<int>::hex
CONST	ENDS
;	COMDAT ?oct@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?oct@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 0400H		; std::_Iosb<int>::oct
CONST	ENDS
;	COMDAT ?dec@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?dec@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 0200H		; std::_Iosb<int>::dec
CONST	ENDS
;	COMDAT ?internal@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?internal@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 0100H	; std::_Iosb<int>::internal
CONST	ENDS
;	COMDAT ?right@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?right@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 080H		; std::_Iosb<int>::right
CONST	ENDS
;	COMDAT ?left@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?left@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 040H		; std::_Iosb<int>::left
CONST	ENDS
;	COMDAT ?showpos@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?showpos@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 020H	; std::_Iosb<int>::showpos
CONST	ENDS
;	COMDAT ?showpoint@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?showpoint@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 010H	; std::_Iosb<int>::showpoint
CONST	ENDS
;	COMDAT ?showbase@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?showbase@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 08H	; std::_Iosb<int>::showbase
CONST	ENDS
;	COMDAT ?uppercase@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?uppercase@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 04H	; std::_Iosb<int>::uppercase
CONST	ENDS
;	COMDAT ?unitbuf@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?unitbuf@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 02H	; std::_Iosb<int>::unitbuf
CONST	ENDS
;	COMDAT ?skipws@?$_Iosb@H@std@@2W4_Fmtflags@12@B
CONST	SEGMENT
?skipws@?$_Iosb@H@std@@2W4_Fmtflags@12@B DD 01H		; std::_Iosb<int>::skipws
CONST	ENDS
;	COMDAT ?table_size@?$ctype@D@std@@2IB
CONST	SEGMENT
?table_size@?$ctype@D@std@@2IB DD 0100H			; std::ctype<char>::table_size
CONST	ENDS
;	COMDAT ?none@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?none@?$_Locbase@H@std@@2HB DD 00H			; std::_Locbase<int>::none
CONST	ENDS
;	COMDAT ?all@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?all@?$_Locbase@H@std@@2HB DD 03fH			; std::_Locbase<int>::all
CONST	ENDS
;	COMDAT ?messages@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?messages@?$_Locbase@H@std@@2HB DD 020H			; std::_Locbase<int>::messages
CONST	ENDS
;	COMDAT ?time@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?time@?$_Locbase@H@std@@2HB DD 010H			; std::_Locbase<int>::time
CONST	ENDS
;	COMDAT ?numeric@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?numeric@?$_Locbase@H@std@@2HB DD 08H			; std::_Locbase<int>::numeric
CONST	ENDS
;	COMDAT ?monetary@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?monetary@?$_Locbase@H@std@@2HB DD 04H			; std::_Locbase<int>::monetary
CONST	ENDS
;	COMDAT ?ctype@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?ctype@?$_Locbase@H@std@@2HB DD 02H			; std::_Locbase<int>::ctype
CONST	ENDS
;	COMDAT ?collate@?$_Locbase@H@std@@2HB
CONST	SEGMENT
?collate@?$_Locbase@H@std@@2HB DD 01H			; std::_Locbase<int>::collate
CONST	ENDS
_DATA	SEGMENT
__bad_alloc_Message DD FLAT:??_C@_0P@GHFPNOJB@bad?5allocation?$AA@
_DATA	ENDS
;	COMDAT ??_C@_0P@GHFPNOJB@bad?5allocation?$AA@
CONST	SEGMENT
??_C@_0P@GHFPNOJB@bad?5allocation?$AA@ DB 'bad allocation', 00H ; `string'
CONST	ENDS
;	COMDAT ?_Value@?$_Is_swap_move@U_Swap_move_tag@std@@@std@@2_NB
CONST	SEGMENT
?_Value@?$_Is_swap_move@U_Swap_move_tag@std@@@std@@2_NB DB 01H ; std::_Is_swap_move<std::_Swap_move_tag>::_Value
CONST	ENDS
PUBLIC	?tea_code@@YAXKKPBKPAK@Z			; tea_code
; Function compile flags: /Ogtpy
; File d:\# metin2\work in progress\source client\client\eterbase\tea.cpp
;	COMDAT ?tea_code@@YAXKKPBKPAK@Z
_TEXT	SEGMENT
_sz$ = 8						; size = 4
_sy$ = 12						; size = 4
_key$ = 16						; size = 4
_dest$ = 20						; size = 4
?tea_code@@YAXKKPBKPAK@Z PROC				; tea_code, COMDAT

; 34   : 	register unsigned long y = sy, z = sz, sum = 0;

  00000	8b 4c 24 08	 mov	 ecx, DWORD PTR _sy$[esp-4]
  00004	8b 54 24 04	 mov	 edx, DWORD PTR _sz$[esp-4]
  00008	53		 push	 ebx
  00009	55		 push	 ebp
  0000a	56		 push	 esi
  0000b	57		 push	 edi

; 35   : 	unsigned long		n = TEA_ROUND;

  0000c	8b 7c 24 1c	 mov	 edi, DWORD PTR _key$[esp+12]
  00010	33 c0		 xor	 eax, eax
  00012	be 20 00 00 00	 mov	 esi, 32			; 00000020H
$LL2@tea_code:

; 36   : 	
; 37   : 	while (n-- > 0)
; 38   : 	{
; 39   : 		y	+= ((z << 4 ^ z >> 5) + z) ^ (sum + key[sum & 3]);

  00017	8b da		 mov	 ebx, edx
  00019	c1 eb 05	 shr	 ebx, 5
  0001c	8b ea		 mov	 ebp, edx
  0001e	c1 e5 04	 shl	 ebp, 4
  00021	33 dd		 xor	 ebx, ebp
  00023	03 da		 add	 ebx, edx
  00025	8b e8		 mov	 ebp, eax
  00027	83 e5 03	 and	 ebp, 3
  0002a	8b 2c af	 mov	 ebp, DWORD PTR [edi+ebp*4]
  0002d	03 e8		 add	 ebp, eax
  0002f	33 dd		 xor	 ebx, ebp
  00031	03 cb		 add	 ecx, ebx

; 40   : 		sum	+= DELTA;
; 41   : 		z	+= ((y << 4 ^ y >> 5) + y) ^ (sum + key[sum >> 11 & 3]);

  00033	8b d9		 mov	 ebx, ecx
  00035	c1 eb 05	 shr	 ebx, 5
  00038	8b e9		 mov	 ebp, ecx
  0003a	c1 e5 04	 shl	 ebp, 4
  0003d	33 dd		 xor	 ebx, ebp
  0003f	2d 47 86 c8 61	 sub	 eax, 1640531527		; 61c88647H
  00044	8b e8		 mov	 ebp, eax
  00046	c1 ed 0b	 shr	 ebp, 11			; 0000000bH
  00049	83 e5 03	 and	 ebp, 3
  0004c	8b 2c af	 mov	 ebp, DWORD PTR [edi+ebp*4]
  0004f	03 d9		 add	 ebx, ecx
  00051	03 e8		 add	 ebp, eax
  00053	33 dd		 xor	 ebx, ebp
  00055	4e		 dec	 esi
  00056	03 d3		 add	 edx, ebx
  00058	85 f6		 test	 esi, esi
  0005a	77 bb		 ja	 SHORT $LL2@tea_code

; 42   : 	}
; 43   : 	
; 44   : 	*(dest++)	= y;

  0005c	8b 44 24 20	 mov	 eax, DWORD PTR _dest$[esp+12]
  00060	5f		 pop	 edi
  00061	5e		 pop	 esi
  00062	5d		 pop	 ebp
  00063	89 08		 mov	 DWORD PTR [eax], ecx

; 45   : 	*dest	= z;

  00065	89 50 04	 mov	 DWORD PTR [eax+4], edx
  00068	5b		 pop	 ebx

; 46   : }

  00069	c3		 ret	 0
?tea_code@@YAXKKPBKPAK@Z ENDP				; tea_code
_TEXT	ENDS
PUBLIC	?tea_decode@@YAXKKPBKPAK@Z			; tea_decode
; Function compile flags: /Ogtpy
;	COMDAT ?tea_decode@@YAXKKPBKPAK@Z
_TEXT	SEGMENT
_sz$ = 8						; size = 4
_sy$ = 12						; size = 4
_key$ = 16						; size = 4
_dest$ = 20						; size = 4
?tea_decode@@YAXKKPBKPAK@Z PROC				; tea_decode, COMDAT

; 50   : #pragma warning(disable:4307)
; 51   : 	register unsigned long y = sy, z = sz, sum = DELTA * TEA_ROUND;

  00000	8b 54 24 08	 mov	 edx, DWORD PTR _sy$[esp-4]
  00004	8b 4c 24 04	 mov	 ecx, DWORD PTR _sz$[esp-4]
  00008	53		 push	 ebx
  00009	55		 push	 ebp
  0000a	56		 push	 esi
  0000b	57		 push	 edi

; 52   : #pragma warning(default:4307)
; 53   : 
; 54   : 	unsigned long		n = TEA_ROUND;

  0000c	8b 7c 24 1c	 mov	 edi, DWORD PTR _key$[esp+12]
  00010	b8 20 37 ef c6	 mov	 eax, -957401312		; c6ef3720H
  00015	be 20 00 00 00	 mov	 esi, 32			; 00000020H
  0001a	8d 9b 00 00 00
	00		 npad	 6
$LL2@tea_decode:

; 55   : 	
; 56   : 	while (n-- > 0)
; 57   : 	{
; 58   : 		z -= ((y << 4 ^ y >> 5) + y) ^ (sum + key[sum >> 11 & 3]);

  00020	8b da		 mov	 ebx, edx
  00022	c1 eb 05	 shr	 ebx, 5
  00025	8b ea		 mov	 ebp, edx
  00027	c1 e5 04	 shl	 ebp, 4
  0002a	33 dd		 xor	 ebx, ebp
  0002c	8b e8		 mov	 ebp, eax
  0002e	c1 ed 0b	 shr	 ebp, 11			; 0000000bH
  00031	83 e5 03	 and	 ebp, 3
  00034	8b 2c af	 mov	 ebp, DWORD PTR [edi+ebp*4]
  00037	03 e8		 add	 ebp, eax
  00039	03 da		 add	 ebx, edx
  0003b	33 dd		 xor	 ebx, ebp
  0003d	2b cb		 sub	 ecx, ebx

; 59   : 		sum -= DELTA;
; 60   : 		y -= ((z << 4 ^ z >> 5) + z) ^ (sum + key[sum & 3]);

  0003f	8b d9		 mov	 ebx, ecx
  00041	c1 eb 05	 shr	 ebx, 5
  00044	8b e9		 mov	 ebp, ecx
  00046	c1 e5 04	 shl	 ebp, 4
  00049	33 dd		 xor	 ebx, ebp
  0004b	05 47 86 c8 61	 add	 eax, 1640531527		; 61c88647H
  00050	8b e8		 mov	 ebp, eax
  00052	83 e5 03	 and	 ebp, 3
  00055	8b 2c af	 mov	 ebp, DWORD PTR [edi+ebp*4]
  00058	03 d9		 add	 ebx, ecx
  0005a	03 e8		 add	 ebp, eax
  0005c	33 dd		 xor	 ebx, ebp
  0005e	4e		 dec	 esi
  0005f	2b d3		 sub	 edx, ebx
  00061	85 f6		 test	 esi, esi
  00063	77 bb		 ja	 SHORT $LL2@tea_decode

; 61   : 	}
; 62   : 	
; 63   : 	*(dest++)	= y;

  00065	8b 44 24 20	 mov	 eax, DWORD PTR _dest$[esp+12]
  00069	5f		 pop	 edi
  0006a	5e		 pop	 esi
  0006b	5d		 pop	 ebp
  0006c	89 10		 mov	 DWORD PTR [eax], edx

; 64   : 	*dest	= z;

  0006e	89 48 04	 mov	 DWORD PTR [eax+4], ecx
  00071	5b		 pop	 ebx

; 65   : }

  00072	c3		 ret	 0
?tea_decode@@YAXKKPBKPAK@Z ENDP				; tea_decode
_TEXT	ENDS
PUBLIC	_tea_encrypt
EXTRN	_memset:PROC
; Function compile flags: /Ogtpy
;	COMDAT _tea_encrypt
_TEXT	SEGMENT
_dest$ = 8						; size = 4
_src$ = 12						; size = 4
_key$ = 16						; size = 4
_size$ = 20						; size = 4
_tea_encrypt PROC					; COMDAT

; 69   : 	int		i;
; 70   : 	int		resize;
; 71   : 	
; 72   : 	if (size % 8 != 0)

  00000	8b 44 24 10	 mov	 eax, DWORD PTR _size$[esp-4]
  00004	8b c8		 mov	 ecx, eax
  00006	81 e1 07 00 00
	80		 and	 ecx, -2147483641	; 80000007H
  0000c	56		 push	 esi
  0000d	57		 push	 edi
  0000e	79 05		 jns	 SHORT $LN11@tea_encryp
  00010	49		 dec	 ecx
  00011	83 c9 f8	 or	 ecx, -8			; fffffff8H
  00014	41		 inc	 ecx
$LN11@tea_encryp:
  00015	8b 74 24 10	 mov	 esi, DWORD PTR _src$[esp+4]

; 73   : 	{
; 74   : 		resize = size + 8 - (size % 8);

  00019	8b f8		 mov	 edi, eax
  0001b	74 18		 je	 SHORT $LN4@tea_encryp
  0001d	2b f9		 sub	 edi, ecx
  0001f	83 c7 08	 add	 edi, 8

; 75   : 		memset((char *) src + size, 0, resize - size);

  00022	8b cf		 mov	 ecx, edi
  00024	2b c8		 sub	 ecx, eax
  00026	51		 push	 ecx
  00027	8d 14 06	 lea	 edx, DWORD PTR [esi+eax]
  0002a	6a 00		 push	 0
  0002c	52		 push	 edx
  0002d	e8 00 00 00 00	 call	 _memset
  00032	83 c4 0c	 add	 esp, 12			; 0000000cH
$LN4@tea_encryp:

; 76   : 	}
; 77   : 	else
; 78   : 		resize = size;
; 79   : 	
; 80   : 	for (i = 0; i < resize >> 3; i++, dest += 2, src += 2)

  00035	8b c7		 mov	 eax, edi
  00037	c1 f8 03	 sar	 eax, 3
  0003a	85 c0		 test	 eax, eax
  0003c	7e 2a		 jle	 SHORT $LN10@tea_encryp
  0003e	53		 push	 ebx
  0003f	8b 5c 24 10	 mov	 ebx, DWORD PTR _dest$[esp+8]
  00043	55		 push	 ebp
  00044	8b e8		 mov	 ebp, eax
$LL3@tea_encryp:

; 81   : 		tea_code(*(src + 1), *src, key, dest);

  00046	8b 44 24 1c	 mov	 eax, DWORD PTR _key$[esp+12]
  0004a	8b 0e		 mov	 ecx, DWORD PTR [esi]
  0004c	8b 56 04	 mov	 edx, DWORD PTR [esi+4]
  0004f	53		 push	 ebx
  00050	50		 push	 eax
  00051	51		 push	 ecx
  00052	52		 push	 edx
  00053	e8 00 00 00 00	 call	 ?tea_code@@YAXKKPBKPAK@Z ; tea_code
  00058	83 c4 10	 add	 esp, 16			; 00000010H
  0005b	83 c3 08	 add	 ebx, 8
  0005e	83 c6 08	 add	 esi, 8
  00061	83 ed 01	 sub	 ebp, 1
  00064	75 e0		 jne	 SHORT $LL3@tea_encryp
  00066	5d		 pop	 ebp
  00067	5b		 pop	 ebx
$LN10@tea_encryp:

; 82   : 	
; 83   : 	return (resize);

  00068	8b c7		 mov	 eax, edi
  0006a	5f		 pop	 edi
  0006b	5e		 pop	 esi

; 84   : }

  0006c	c3		 ret	 0
_tea_encrypt ENDP
_TEXT	ENDS
PUBLIC	_tea_decrypt
; Function compile flags: /Ogtpy
;	COMDAT _tea_decrypt
_TEXT	SEGMENT
_dest$ = 8						; size = 4
_src$ = 12						; size = 4
_key$ = 16						; size = 4
_resize$ = 20						; size = 4
_size$ = 20						; size = 4
_tea_decrypt PROC					; COMDAT

; 88   : 	int		i;
; 89   : 	int		resize;
; 90   : 	
; 91   : 	if (size % 8 != 0)

  00000	8b 44 24 10	 mov	 eax, DWORD PTR _size$[esp-4]
  00004	8b c8		 mov	 ecx, eax
  00006	81 e1 07 00 00
	80		 and	 ecx, -2147483641	; 80000007H
  0000c	79 05		 jns	 SHORT $LN11@tea_decryp
  0000e	49		 dec	 ecx
  0000f	83 c9 f8	 or	 ecx, -8			; fffffff8H
  00012	41		 inc	 ecx
$LN11@tea_decryp:
  00013	74 05		 je	 SHORT $LN5@tea_decryp

; 92   : 		resize = size + 8 - (size % 8);

  00015	2b c1		 sub	 eax, ecx
  00017	83 c0 08	 add	 eax, 8
$LN5@tea_decryp:
  0001a	53		 push	 ebx

; 93   : 	else
; 94   : 		resize = size;
; 95   : 	
; 96   : 	for (i = 0; i < resize >> 3; i++, dest += 2, src += 2)

  0001b	8b d8		 mov	 ebx, eax
  0001d	c1 fb 03	 sar	 ebx, 3
  00020	89 44 24 14	 mov	 DWORD PTR _resize$[esp], eax
  00024	85 db		 test	 ebx, ebx
  00026	7e 32		 jle	 SHORT $LN1@tea_decryp
  00028	55		 push	 ebp
  00029	8b 6c 24 14	 mov	 ebp, DWORD PTR _key$[esp+4]
  0002d	56		 push	 esi
  0002e	8b 74 24 14	 mov	 esi, DWORD PTR _src$[esp+8]
  00032	57		 push	 edi
  00033	8b 7c 24 14	 mov	 edi, DWORD PTR _dest$[esp+12]
$LL3@tea_decryp:

; 97   : 		tea_decode(*(src + 1), *src, key, dest);

  00037	8b 06		 mov	 eax, DWORD PTR [esi]
  00039	8b 4e 04	 mov	 ecx, DWORD PTR [esi+4]
  0003c	57		 push	 edi
  0003d	55		 push	 ebp
  0003e	50		 push	 eax
  0003f	51		 push	 ecx
  00040	e8 00 00 00 00	 call	 ?tea_decode@@YAXKKPBKPAK@Z ; tea_decode
  00045	83 c4 10	 add	 esp, 16			; 00000010H
  00048	83 c7 08	 add	 edi, 8
  0004b	83 c6 08	 add	 esi, 8
  0004e	83 eb 01	 sub	 ebx, 1
  00051	75 e4		 jne	 SHORT $LL3@tea_decryp

; 98   : 	
; 99   : 	return (resize);

  00053	8b 44 24 20	 mov	 eax, DWORD PTR _resize$[esp+12]
  00057	5f		 pop	 edi
  00058	5e		 pop	 esi
  00059	5d		 pop	 ebp
$LN1@tea_decryp:
  0005a	5b		 pop	 ebx

; 100  : }

  0005b	c3		 ret	 0
_tea_decrypt ENDP
_TEXT	ENDS
END
