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

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

INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES

PUBLIC	?Ymir_WideCharToMultiByte@@YAHIKPB_WHPADHPBDPAH@Z ; Ymir_WideCharToMultiByte
EXTRN	__imp__WideCharToMultiByte@32:PROC
EXTRN	?EL_String_Encode_Vietnamese@@YAHPB_WHPADH@Z:PROC ; EL_String_Encode_Vietnamese
; Function compile flags: /Ogtpy
; File d:\# metin2\work in progress\source client\client\eterlocale\stringcodec.cpp
;	COMDAT ?Ymir_WideCharToMultiByte@@YAHIKPB_WHPADHPBDPAH@Z
_TEXT	SEGMENT
_CodePage$ = 8						; size = 4
_dwFlags$ = 12						; size = 4
_lpWideCharStr$ = 16					; size = 4
_cchWideChar$ = 20					; size = 4
_lpMultiByteStr$ = 24					; size = 4
_cbMultiByte$ = 28					; size = 4
_lpDefaultChar$ = 32					; size = 4
_lpUsedDefaultChar$ = 36				; size = 4
?Ymir_WideCharToMultiByte@@YAHIKPB_WHPADHPBDPAH@Z PROC	; Ymir_WideCharToMultiByte, COMDAT

; 16   : 	if (CodePage == CP_1258)

  00000	8b 44 24 04	 mov	 eax, DWORD PTR _CodePage$[esp-4]
  00004	3d ea 04 00 00	 cmp	 eax, 1258		; 000004eaH
  00009	75 1d		 jne	 SHORT $LN2@Ymir_WideC

; 17   : 	{
; 18   : 		return EL_String_Encode_Vietnamese(lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte);

  0000b	8b 44 24 18	 mov	 eax, DWORD PTR _cbMultiByte$[esp-4]
  0000f	8b 4c 24 14	 mov	 ecx, DWORD PTR _lpMultiByteStr$[esp-4]
  00013	8b 54 24 10	 mov	 edx, DWORD PTR _cchWideChar$[esp-4]
  00017	50		 push	 eax
  00018	8b 44 24 10	 mov	 eax, DWORD PTR _lpWideCharStr$[esp]
  0001c	51		 push	 ecx
  0001d	52		 push	 edx
  0001e	50		 push	 eax
  0001f	e8 00 00 00 00	 call	 ?EL_String_Encode_Vietnamese@@YAHPB_WHPADH@Z ; EL_String_Encode_Vietnamese
  00024	83 c4 10	 add	 esp, 16			; 00000010H

; 23   : 	}
; 24   : }

  00027	c3		 ret	 0
$LN2@Ymir_WideC:

; 19   : 	}
; 20   : 	else
; 21   : 	{
; 22   : 		return WideCharToMultiByte(CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, lpDefaultChar, lpUsedDefaultChar);

  00028	8b 4c 24 20	 mov	 ecx, DWORD PTR _lpUsedDefaultChar$[esp-4]
  0002c	8b 54 24 1c	 mov	 edx, DWORD PTR _lpDefaultChar$[esp-4]
  00030	51		 push	 ecx
  00031	8b 4c 24 1c	 mov	 ecx, DWORD PTR _cbMultiByte$[esp]
  00035	52		 push	 edx
  00036	8b 54 24 1c	 mov	 edx, DWORD PTR _lpMultiByteStr$[esp+4]
  0003a	51		 push	 ecx
  0003b	8b 4c 24 1c	 mov	 ecx, DWORD PTR _cchWideChar$[esp+8]
  0003f	52		 push	 edx
  00040	8b 54 24 1c	 mov	 edx, DWORD PTR _lpWideCharStr$[esp+12]
  00044	51		 push	 ecx
  00045	8b 4c 24 1c	 mov	 ecx, DWORD PTR _dwFlags$[esp+16]
  00049	52		 push	 edx
  0004a	51		 push	 ecx
  0004b	50		 push	 eax
  0004c	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__WideCharToMultiByte@32

; 23   : 	}
; 24   : }

  00052	c3		 ret	 0
?Ymir_WideCharToMultiByte@@YAHIKPB_WHPADHPBDPAH@Z ENDP	; Ymir_WideCharToMultiByte
_TEXT	ENDS
PUBLIC	?Ymir_MultiByteToWideChar@@YAHIKPBDHPA_WH@Z	; Ymir_MultiByteToWideChar
EXTRN	__imp__MultiByteToWideChar@24:PROC
EXTRN	?EL_String_Decode_Vietnamese@@YAHPBDHPA_WH@Z:PROC ; EL_String_Decode_Vietnamese
; Function compile flags: /Ogtpy
;	COMDAT ?Ymir_MultiByteToWideChar@@YAHIKPBDHPA_WH@Z
_TEXT	SEGMENT
_CodePage$ = 8						; size = 4
_dwFlags$ = 12						; size = 4
_lpMultiByteStr$ = 16					; size = 4
_cbMultiByte$ = 20					; size = 4
_lpWideCharStr$ = 24					; size = 4
_cchWideChar$ = 28					; size = 4
?Ymir_MultiByteToWideChar@@YAHIKPBDHPA_WH@Z PROC	; Ymir_MultiByteToWideChar, COMDAT

; 35   : 	if (CodePage == CP_1258)

  00000	8b 44 24 04	 mov	 eax, DWORD PTR _CodePage$[esp-4]
  00004	3d ea 04 00 00	 cmp	 eax, 1258		; 000004eaH
  00009	75 1d		 jne	 SHORT $LN2@Ymir_Multi

; 36   : 	{
; 37   : 		return EL_String_Decode_Vietnamese(lpMultiByteStr, cbMultiByte, lpWideCharStr, cchWideChar);

  0000b	8b 44 24 18	 mov	 eax, DWORD PTR _cchWideChar$[esp-4]
  0000f	8b 4c 24 14	 mov	 ecx, DWORD PTR _lpWideCharStr$[esp-4]
  00013	8b 54 24 10	 mov	 edx, DWORD PTR _cbMultiByte$[esp-4]
  00017	50		 push	 eax
  00018	8b 44 24 10	 mov	 eax, DWORD PTR _lpMultiByteStr$[esp]
  0001c	51		 push	 ecx
  0001d	52		 push	 edx
  0001e	50		 push	 eax
  0001f	e8 00 00 00 00	 call	 ?EL_String_Decode_Vietnamese@@YAHPBDHPA_WH@Z ; EL_String_Decode_Vietnamese
  00024	83 c4 10	 add	 esp, 16			; 00000010H

; 42   : 	}
; 43   : }

  00027	c3		 ret	 0
$LN2@Ymir_Multi:

; 38   : 	}
; 39   : 	else
; 40   : 	{
; 41   : 		return MultiByteToWideChar(CodePage, dwFlags, lpMultiByteStr, cbMultiByte, lpWideCharStr, cchWideChar);

  00028	8b 4c 24 18	 mov	 ecx, DWORD PTR _cchWideChar$[esp-4]
  0002c	8b 54 24 14	 mov	 edx, DWORD PTR _lpWideCharStr$[esp-4]
  00030	51		 push	 ecx
  00031	8b 4c 24 14	 mov	 ecx, DWORD PTR _cbMultiByte$[esp]
  00035	52		 push	 edx
  00036	8b 54 24 14	 mov	 edx, DWORD PTR _lpMultiByteStr$[esp+4]
  0003a	51		 push	 ecx
  0003b	8b 4c 24 14	 mov	 ecx, DWORD PTR _dwFlags$[esp+8]
  0003f	52		 push	 edx
  00040	51		 push	 ecx
  00041	50		 push	 eax
  00042	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__MultiByteToWideChar@24

; 42   : 	}
; 43   : }

  00048	c3		 ret	 0
?Ymir_MultiByteToWideChar@@YAHIKPBDHPA_WH@Z ENDP	; Ymir_MultiByteToWideChar
_TEXT	ENDS
END
