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

	TITLE	c:\Develop\DScaler423a\DScaler\AspectRatio.cpp
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB OLDNAMES

PUBLIC	?AspectSettings@@3UTAspectSettings@@A		; AspectSettings
PUBLIC	?setAspectAdjust@CAspectRect@@QAEXNN@Z		; CAspectRect::setAspectAdjust
PUBLIC	??0CAspectRectangles@@QAE@XZ			; CAspectRectangles::CAspectRectangles
PUBLIC	??_C@_1FI@DBNBGNPM@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@ ; `string'
PUBLIC	??_C@_1FK@OELHGCOB@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@ ; `string'
EXTRN	_memcmp:PROC
EXTRN	__imp__ScreenToClient@8:PROC
EXTRN	__imp__UnionRect@12:PROC
EXTRN	_memcpy:PROC
;	COMDAT ?InFunction@?6??WorkoutOverlaySize@@YAXHH@Z@4HA
_BSS	SEGMENT
?InFunction@?6??WorkoutOverlaySize@@YAXHH@Z@4HA DD 01H DUP (?) ; `WorkoutOverlaySize'::`7'::InFunction
_BSS	ENDS
;	COMDAT ?SavedAutodetectAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA
_BSS	SEGMENT
?SavedAutodetectAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA DD 01H DUP (?) ; `UpdateSquarePixelsMode'::`2'::SavedAutodetectAspect
;	COMDAT ?SavedAspectMode@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA
_DATA	SEGMENT
?SavedAspectMode@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA DD 0ffffffffH ; `UpdateSquarePixelsMode'::`2'::SavedAspectMode
_DATA	ENDS
;	COMDAT ?SavedSourceAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA
_DATA	SEGMENT
?SavedSourceAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA DD 0ffffffffH ; `UpdateSquarePixelsMode'::`2'::SavedSourceAspect
_DATA	ENDS
;	COMDAT ??_C@_1FK@OELHGCOB@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@
CONST	SEGMENT
??_C@_1FK@OELHGCOB@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@ DB 'Z'
	DB	00H, 'e', 00H, 'r', 00H, 'o', 00H, ' ', 00H, 'h', 00H, 'e', 00H
	DB	'i', 00H, 'g', 00H, 'h', 00H, 't', 00H, ' ', 00H, 'o', 00H, 'r'
	DB	00H, ' ', 00H, 'w', 00H, 'i', 00H, 'd', 00H, 't', 00H, 'h', 00H
	DB	' ', 00H, 'i', 00H, 'n', 00H, ' ', 00H, 'W', 00H, 'o', 00H, 'r'
	DB	00H, 'k', 00H, 'o', 00H, 'u', 00H, 't', 00H, 'O', 00H, 'v', 00H
	DB	'e', 00H, 'r', 00H, 'l', 00H, 'a', 00H, 'y', 00H, 'S', 00H, 'i'
	DB	00H, 'z', 00H, 'e', 00H, '!', 00H, 0aH, 00H, 00H, 00H ; `string'
CONST	ENDS
;	COMDAT ??_C@_1FI@DBNBGNPM@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@
CONST	SEGMENT
??_C@_1FI@DBNBGNPM@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@ DB 'Z'
	DB	00H, 'e', 00H, 'r', 00H, 'o', 00H, ' ', 00H, 'h', 00H, 'e', 00H
	DB	'i', 00H, 'g', 00H, 'h', 00H, 't', 00H, ' ', 00H, 'o', 00H, 'r'
	DB	00H, ' ', 00H, 'w', 00H, 'i', 00H, 'd', 00H, 't', 00H, 'h', 00H
	DB	' ', 00H, 'i', 00H, 'n', 00H, ' ', 00H, 'W', 00H, 'o', 00H, 'r'
	DB	00H, 'k', 00H, 'o', 00H, 'u', 00H, 't', 00H, 'O', 00H, 'v', 00H
	DB	'e', 00H, 'r', 00H, 'l', 00H, 'a', 00H, 'y', 00H, 'S', 00H, 'i'
	DB	00H, 'z', 00H, 'e', 00H, '!', 00H, 00H, 00H	; `string'
?AspectSettings@@3UTAspectSettings@@A DD 0535H		; AspectSettings
	DD	00H
	DD	01H
	DD	0537H
	DD	0537H
	DD	028H
	DD	010H
	DD	01H
	DD	03H
	DD	011H
	DD	00H
	DD	03cH
	DD	03H
	DD	012cH
	DD	0fH
	DD	014H
	DD	07d0H
	DD	01H
	DD	01H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	00H
	DD	01H
	DD	00H
	DD	04H
	DD	04H
	DD	04H
	DD	04H
	DD	01H
	DD	00H
	ORG $+4
	DQ	0000000000000000H
	DQ	0000000000000708H
	DD	03e8H
	DD	064H
	DD	00H
	DD	08H
	DQ	000000000000003cH
	DQ	000000000000003cH
	DD	03e8H
	DD	00H
	DD	00H
	DD	064H
	DD	064H
	DD	032H
	DD	032H
	DD	00H
	DD	03e8H
	DD	00H
	DD	00H
	DD	00H
	DD	0535H
	DD	01H
	DD	00H
	ORG $+4
PUBLIC	?GetDestRect@@YAXPAUtagRECT@@@Z			; GetDestRect
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\aspectratio.cpp
;	COMDAT ?GetDestRect@@YAXPAUtagRECT@@@Z
_TEXT	SEGMENT
_rect$ = 8						; size = 4
?GetDestRect@@YAXPAUtagRECT@@@Z PROC			; GetDestRect, COMDAT

; 345  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp

; 346  :     memcpy(rect, &AspectSettings.DestinationRect, sizeof(RECT));

  00003	6a 10		 push	 16			; 00000010H
  00005	68 4c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+76
  0000a	8b 45 08	 mov	 eax, DWORD PTR _rect$[ebp]
  0000d	50		 push	 eax
  0000e	e8 00 00 00 00	 call	 _memcpy
  00013	83 c4 0c	 add	 esp, 12			; 0000000cH

; 347  : }

  00016	5d		 pop	 ebp
  00017	c3		 ret	 0
?GetDestRect@@YAXPAUtagRECT@@@Z ENDP			; GetDestRect
_TEXT	ENDS
PUBLIC	?GetSourceRect@@YAXPAUtagRECT@@@Z		; GetSourceRect
; Function compile flags: /Odtp
;	COMDAT ?GetSourceRect@@YAXPAUtagRECT@@@Z
_TEXT	SEGMENT
_rect$ = 8						; size = 4
?GetSourceRect@@YAXPAUtagRECT@@@Z PROC			; GetSourceRect, COMDAT

; 338  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp

; 339  :     memcpy(rect, &AspectSettings.SourceRect, sizeof(RECT));

  00003	6a 10		 push	 16			; 00000010H
  00005	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  0000a	8b 45 08	 mov	 eax, DWORD PTR _rect$[ebp]
  0000d	50		 push	 eax
  0000e	e8 00 00 00 00	 call	 _memcpy
  00013	83 c4 0c	 add	 esp, 12			; 0000000cH

; 340  : }

  00016	5d		 pop	 ebp
  00017	c3		 ret	 0
?GetSourceRect@@YAXPAUtagRECT@@@Z ENDP			; GetSourceRect
_TEXT	ENDS
PUBLIC	__real@3ffc72b020c49ba6
PUBLIC	__real@3ff553f7ced91687
PUBLIC	?GetActualSourceFrameAspect@@YANXZ		; GetActualSourceFrameAspect
;	COMDAT __real@3ffc72b020c49ba6
CONST	SEGMENT
__real@3ffc72b020c49ba6 DQ 03ffc72b020c49ba6r	; 1.778
CONST	ENDS
;	COMDAT __real@3ff553f7ced91687
CONST	SEGMENT
__real@3ff553f7ced91687 DQ 03ff553f7ced91687r	; 1.333
; Function compile flags: /Odtp
CONST	ENDS
;	COMDAT ?GetActualSourceFrameAspect@@YANXZ
_TEXT	SEGMENT
tv66 = -12						; size = 4
_SourceAdjust$ = -8					; size = 8
?GetActualSourceFrameAspect@@YANXZ PROC			; GetActualSourceFrameAspect, COMDAT

; 80   : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 0c	 sub	 esp, 12			; 0000000cH

; 81   :     double SourceAdjust = (double)AspectSettings.SourceAspectAdjust / 1000.0;

  00006	db 05 f0 00 00
	00		 fild	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+240
  0000c	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@408f400000000000
  00012	dd 5d f8	 fstp	 QWORD PTR _SourceAdjust$[ebp]

; 82   :     switch (AspectSettings.AspectMode)

  00015	a1 08 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+8
  0001a	89 45 f4	 mov	 DWORD PTR tv66[ebp], eax
  0001d	83 7d f4 01	 cmp	 DWORD PTR tv66[ebp], 1
  00021	74 08		 je	 SHORT $LN3@GetActualS
  00023	83 7d f4 02	 cmp	 DWORD PTR tv66[ebp], 2
  00027	74 0d		 je	 SHORT $LN2@GetActualS
  00029	eb 16		 jmp	 SHORT $LN1@GetActualS
$LN3@GetActualS:

; 83   :     {
; 84   :     case 1:
; 85   :         // Letterboxed or full-frame
; 86   :         return SourceAdjust * 1.333; //4.0/3.0;

  0002b	dd 45 f8	 fld	 QWORD PTR _SourceAdjust$[ebp]
  0002e	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@3ff553f7ced91687
  00034	eb 1a		 jmp	 SHORT $LN4@GetActualS
$LN2@GetActualS:

; 87   :     case 2:
; 88   :         // Anamorphic
; 89   :         return SourceAdjust * 1.778; //16.0/9.0;

  00036	dd 45 f8	 fld	 QWORD PTR _SourceAdjust$[ebp]
  00039	dc 0d 00 00 00
	00		 fmul	 QWORD PTR __real@3ffc72b020c49ba6
  0003f	eb 0f		 jmp	 SHORT $LN4@GetActualS
$LN1@GetActualS:

; 90   :     default:
; 91   :         // User-specified
; 92   :         return (SourceAdjust * (double)AspectSettings.SourceAspect)/1000.0;

  00041	db 05 00 00 00
	00		 fild	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A
  00047	dc 4d f8	 fmul	 QWORD PTR _SourceAdjust$[ebp]
  0004a	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@408f400000000000
$LN4@GetActualS:

; 93   :     }
; 94   : }

  00050	8b e5		 mov	 esp, ebp
  00052	5d		 pop	 ebp
  00053	c3		 ret	 0
?GetActualSourceFrameAspect@@YANXZ ENDP			; GetActualSourceFrameAspect
PUBLIC	?UpdateSquarePixelsMode@@YAHH@Z			; UpdateSquarePixelsMode
; Function compile flags: /Odtp
;	COMDAT ?UpdateSquarePixelsMode@@YAHH@Z
_TEXT	SEGMENT
tv87 = -28						; size = 4
tv81 = -24						; size = 4
_width$143010 = -20					; size = 4
_height$143011 = -16					; size = 4
_width$143005 = -12					; size = 4
_height$143006 = -8					; size = 4
_result$ = -4						; size = 4
_set$ = 8						; size = 4
?UpdateSquarePixelsMode@@YAHH@Z PROC			; UpdateSquarePixelsMode, COMDAT

; 350  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	83 ec 1c	 sub	 esp, 28			; 0000001cH

; 351  :     static int SavedSourceAspect = -1;
; 352  :     static int SavedAspectMode = -1;
; 353  :     static int SavedAutodetectAspect = 0;
; 354  :     int result = 0;

  00006	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR _result$[ebp], 0

; 355  : 
; 356  :     if (set)

  0000d	83 7d 08 00	 cmp	 DWORD PTR _set$[ebp], 0
  00011	0f 84 ff 00 00
	00		 je	 $LN9@UpdateSqua

; 357  :     {
; 358  :         if (!AspectSettings.SquarePixels)

  00017	83 3d f8 00 00
	00 00		 cmp	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+248, 0
  0001e	75 29		 jne	 SHORT $LN8@UpdateSqua

; 359  :         {
; 360  :             SavedSourceAspect = AspectSettings.SourceAspect;

  00020	a1 00 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A
  00025	a3 00 00 00 00	 mov	 DWORD PTR ?SavedSourceAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA, eax

; 361  :             SavedAspectMode = AspectSettings.AspectMode;

  0002a	8b 0d 08 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+8
  00030	89 0d 00 00 00
	00		 mov	 DWORD PTR ?SavedAspectMode@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA, ecx

; 362  :             SavedAutodetectAspect = AspectSettings.AutoDetectAspect;

  00036	8b 15 28 00 00
	00		 mov	 edx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+40
  0003c	89 15 00 00 00
	00		 mov	 DWORD PTR ?SavedAutodetectAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA, edx

; 363  :             result = 1;

  00042	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR _result$[ebp], 1
$LN8@UpdateSqua:

; 364  :         }
; 365  :         AspectSettings.AutoDetectAspect = 0;

  00049	c7 05 28 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+40, 0

; 366  :         if (pMultiFrames && pMultiFrames->IsActive())

  00053	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A, 0 ; pMultiFrames
  0005a	74 56		 je	 SHORT $LN7@UpdateSqua
  0005c	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  00062	e8 00 00 00 00	 call	 ?IsActive@CMultiFrames@@QAEHXZ ; CMultiFrames::IsActive
  00067	85 c0		 test	 eax, eax
  00069	74 47		 je	 SHORT $LN7@UpdateSqua

; 367  :         {
; 368  :             int width = pMultiFrames->GetWidth();

  0006b	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  00071	e8 00 00 00 00	 call	 ?GetWidth@CMultiFrames@@QAEHXZ ; CMultiFrames::GetWidth
  00076	89 45 f4	 mov	 DWORD PTR _width$143005[ebp], eax

; 369  :             int height = pMultiFrames->GetHeight();

  00079	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  0007f	e8 00 00 00 00	 call	 ?GetHeight@CMultiFrames@@QAEHXZ ; CMultiFrames::GetHeight
  00084	89 45 f8	 mov	 DWORD PTR _height$143006[ebp], eax

; 370  :             if (height != 0)

  00087	83 7d f8 00	 cmp	 DWORD PTR _height$143006[ebp], 0
  0008b	74 23		 je	 SHORT $LN6@UpdateSqua

; 371  :             {
; 372  :                 AspectSettings.SourceAspect = width * 1000 / height;

  0008d	8b 45 f4	 mov	 eax, DWORD PTR _width$143005[ebp]
  00090	69 c0 e8 03 00
	00		 imul	 eax, 1000		; 000003e8H
  00096	99		 cdq
  00097	f7 7d f8	 idiv	 DWORD PTR _height$143006[ebp]
  0009a	a3 00 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A, eax

; 373  :                 AspectSettings.AspectMode = AR_NONANAMORPHIC;

  0009f	c7 05 08 00 00
	00 01 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+8, 1

; 374  :                 result = 1;

  000a9	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR _result$[ebp], 1
$LN6@UpdateSqua:

; 375  :             }
; 376  :         }

  000b0	eb 62		 jmp	 SHORT $LN5@UpdateSqua
$LN7@UpdateSqua:

; 377  :         else if (Providers_GetCurrentSource() != NULL)

  000b2	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  000b7	85 c0		 test	 eax, eax
  000b9	74 59		 je	 SHORT $LN5@UpdateSqua

; 378  :         {
; 379  :             int width = Providers_GetCurrentSource()->GetWidth();

  000bb	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  000c0	89 45 e8	 mov	 DWORD PTR tv81[ebp], eax
  000c3	8b 45 e8	 mov	 eax, DWORD PTR tv81[ebp]
  000c6	8b 10		 mov	 edx, DWORD PTR [eax]
  000c8	8b 4d e8	 mov	 ecx, DWORD PTR tv81[ebp]
  000cb	8b 42 74	 mov	 eax, DWORD PTR [edx+116]
  000ce	ff d0		 call	 eax
  000d0	89 45 ec	 mov	 DWORD PTR _width$143010[ebp], eax

; 380  :             int height = Providers_GetCurrentSource()->GetHeight();

  000d3	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  000d8	89 45 e4	 mov	 DWORD PTR tv87[ebp], eax
  000db	8b 4d e4	 mov	 ecx, DWORD PTR tv87[ebp]
  000de	8b 11		 mov	 edx, DWORD PTR [ecx]
  000e0	8b 4d e4	 mov	 ecx, DWORD PTR tv87[ebp]
  000e3	8b 42 78	 mov	 eax, DWORD PTR [edx+120]
  000e6	ff d0		 call	 eax
  000e8	89 45 f0	 mov	 DWORD PTR _height$143011[ebp], eax

; 381  :             if (height != 0)

  000eb	83 7d f0 00	 cmp	 DWORD PTR _height$143011[ebp], 0
  000ef	74 23		 je	 SHORT $LN5@UpdateSqua

; 382  :             {
; 383  :                 AspectSettings.SourceAspect = width * 1000 / height;

  000f1	8b 45 ec	 mov	 eax, DWORD PTR _width$143010[ebp]
  000f4	69 c0 e8 03 00
	00		 imul	 eax, 1000		; 000003e8H
  000fa	99		 cdq
  000fb	f7 7d f0	 idiv	 DWORD PTR _height$143011[ebp]
  000fe	a3 00 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A, eax

; 384  :                 AspectSettings.AspectMode = AR_NONANAMORPHIC;

  00103	c7 05 08 00 00
	00 01 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+8, 1

; 385  :                 result = 1;

  0010d	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR _result$[ebp], 1
$LN5@UpdateSqua:

; 386  :             }
; 387  :         }
; 388  :     }
; 389  :     else

  00114	eb 32		 jmp	 SHORT $LN2@UpdateSqua
$LN9@UpdateSqua:

; 390  :     {
; 391  :         if (AspectSettings.SquarePixels)

  00116	83 3d f8 00 00
	00 00		 cmp	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+248, 0
  0011d	74 29		 je	 SHORT $LN2@UpdateSqua

; 392  :         {
; 393  :             AspectSettings.SourceAspect = SavedSourceAspect;

  0011f	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?SavedSourceAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA
  00125	89 0d 00 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A, ecx

; 394  :             AspectSettings.AspectMode = SavedAspectMode;

  0012b	8b 15 00 00 00
	00		 mov	 edx, DWORD PTR ?SavedAspectMode@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA
  00131	89 15 08 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+8, edx

; 395  :             AspectSettings.AutoDetectAspect = SavedAutodetectAspect;

  00137	a1 00 00 00 00	 mov	 eax, DWORD PTR ?SavedAutodetectAspect@?1??UpdateSquarePixelsMode@@YAHH@Z@4HA
  0013c	a3 28 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+40, eax

; 396  :             result = 1;

  00141	c7 45 fc 01 00
	00 00		 mov	 DWORD PTR _result$[ebp], 1
$LN2@UpdateSqua:

; 397  :         }
; 398  :     }
; 399  :     AspectSettings.SquarePixels = set;

  00148	8b 4d 08	 mov	 ecx, DWORD PTR _set$[ebp]
  0014b	89 0d f8 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+248, ecx

; 400  :     return result;

  00151	8b 45 fc	 mov	 eax, DWORD PTR _result$[ebp]

; 401  : }

  00154	8b e5		 mov	 esp, ebp
  00156	5d		 pop	 ebp
  00157	c3		 ret	 0
?UpdateSquarePixelsMode@@YAHH@Z ENDP			; UpdateSquarePixelsMode
; Function compile flags: /Odtp
_TEXT	ENDS
;	COMDAT ??0CAspectRectangles@@QAE@XZ
_TEXT	SEGMENT
_this$ = -4						; size = 4
??0CAspectRectangles@@QAE@XZ PROC			; CAspectRectangles::CAspectRectangles, COMDAT
; _this$ = ecx
  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx
  00007	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  0000a	83 c1 20	 add	 ecx, 32			; 00000020H
  0000d	e8 00 00 00 00	 call	 ??0CAspectRect@@QAE@XZ	; CAspectRect::CAspectRect
  00012	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  00015	83 c1 38	 add	 ecx, 56			; 00000038H
  00018	e8 00 00 00 00	 call	 ??0CAspectRect@@QAE@XZ	; CAspectRect::CAspectRect
  0001d	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  00020	83 c1 50	 add	 ecx, 80			; 00000050H
  00023	e8 00 00 00 00	 call	 ??0CAspectRect@@QAE@XZ	; CAspectRect::CAspectRect
  00028	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  0002b	83 c1 68	 add	 ecx, 104		; 00000068H
  0002e	e8 00 00 00 00	 call	 ??0CAspectRect@@QAE@XZ	; CAspectRect::CAspectRect
  00033	8b 45 fc	 mov	 eax, DWORD PTR _this$[ebp]
  00036	8b e5		 mov	 esp, ebp
  00038	5d		 pop	 ebp
  00039	c3		 ret	 0
??0CAspectRectangles@@QAE@XZ ENDP			; CAspectRectangles::CAspectRectangles
; Function compile flags: /Odtp
; File c:\develop\dscaler423a\dscaler\aspectrect.h
_TEXT	ENDS
;	COMDAT ?setAspectAdjust@CAspectRect@@QAEXNN@Z
_TEXT	SEGMENT
_this$ = -4						; size = 4
_source$ = 8						; size = 8
_target$ = 16						; size = 8
?setAspectAdjust@CAspectRect@@QAEXNN@Z PROC		; CAspectRect::setAspectAdjust, COMDAT
; _this$ = ecx

; 100  :     {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	51		 push	 ecx
  00004	89 4d fc	 mov	 DWORD PTR _this$[ebp], ecx

; 101  :         m_OutputAdjustment = target/RoundTo3dp(source);

  00007	83 ec 08	 sub	 esp, 8
  0000a	dd 45 08	 fld	 QWORD PTR _source$[ebp]
  0000d	dd 1c 24	 fstp	 QWORD PTR [esp]
  00010	8b 4d fc	 mov	 ecx, DWORD PTR _this$[ebp]
  00013	e8 00 00 00 00	 call	 ?RoundTo3dp@CAspectRect@@QAENN@Z ; CAspectRect::RoundTo3dp
  00018	dc 7d 10	 fdivr	 QWORD PTR _target$[ebp]
  0001b	8b 45 fc	 mov	 eax, DWORD PTR _this$[ebp]
  0001e	dd 58 10	 fstp	 QWORD PTR [eax+16]

; 102  :     }

  00021	8b e5		 mov	 esp, ebp
  00023	5d		 pop	 ebp
  00024	c2 10 00	 ret	 16			; 00000010H
?setAspectAdjust@CAspectRect@@QAEXNN@Z ENDP		; CAspectRect::setAspectAdjust
PUBLIC	?WorkoutOverlaySize@@YAXHH@Z			; WorkoutOverlaySize
;	COMDAT xdata$x
; File c:\develop\dscaler423a\dscaler\aspectratio.cpp
xdata$x	SEGMENT
__unwindtable$?WorkoutOverlaySize@@YAXHH@Z DD 0ffffffffH
	DD	FLAT:__unwindfunclet$?WorkoutOverlaySize@@YAXHH@Z$0
__ehfuncinfo$?WorkoutOverlaySize@@YAXHH@Z DD 019930522H
	DD	01H
	DD	FLAT:__unwindtable$?WorkoutOverlaySize@@YAXHH@Z
	DD	2 DUP(00H)
	DD	2 DUP(00H)
	DD	00H
	DD	00H
; Function compile flags: /Odtp
xdata$x	ENDS
;	COMDAT ?WorkoutOverlaySize@@YAXHH@Z
_TEXT	SEGMENT
tv393 = -280						; size = 4
tv385 = -276						; size = 4
tv316 = -272						; size = 4
tv308 = -268						; size = 4
tv290 = -264						; size = 4
tv282 = -260						; size = 4
tv498 = -256						; size = 4
tv496 = -252						; size = 4
tv79 = -248						; size = 4
tv72 = -244						; size = 4
_invalidate$142977 = -240				; size = 16
_invalidate$142974 = -224				; size = 16
_SourceWidth$142929 = -208				; size = 4
_ScreenRect$142933 = -204				; size = 16
_RequestResize$142958 = -188				; size = 4
_pSource$142935 = -184					; size = 4
_FilterChain$142957 = -180				; size = 36
_SourceHeight$142928 = -144				; size = 4
_ar$142934 = -140					; size = 128
__$EHRec$ = -12						; size = 12
_ForceRedraw$ = 8					; size = 4
_allowResize$ = 12					; size = 4
?WorkoutOverlaySize@@YAXHH@Z PROC			; WorkoutOverlaySize, COMDAT

; 100  : {

  00000	55		 push	 ebp
  00001	8b ec		 mov	 ebp, esp
  00003	6a ff		 push	 -1
  00005	68 00 00 00 00	 push	 __ehhandler$?WorkoutOverlaySize@@YAXHH@Z
  0000a	64 a1 00 00 00
	00		 mov	 eax, DWORD PTR fs:0
  00010	50		 push	 eax
  00011	81 ec 0c 01 00
	00		 sub	 esp, 268		; 0000010cH
  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

; 101  :     // be very careful here as we don't want to cause a deadlock
; 102  :     // we need to interact with the main window in here but we need to
; 103  :     // do so in a way that halts processing and also copes with the window thread being busy
; 104  :     // while we want to do this
; 105  :     if(!IsMainWindowThread())

  00028	e8 00 00 00 00	 call	 ?IsMainWindowThread@@YAHXZ ; IsMainWindowThread
  0002d	85 c0		 test	 eax, eax
  0002f	75 24		 jne	 SHORT $LN29@WorkoutOve

; 106  :     {
; 107  :         ResetMainWindowEvent();

  00031	e8 00 00 00 00	 call	 ?ResetMainWindowEvent@@YAXXZ ; ResetMainWindowEvent

; 108  :         PostMessageToMainWindow(UWM_OVERLAY_UPDATE, ForceRedraw, allowResize);

  00036	8b 45 0c	 mov	 eax, DWORD PTR _allowResize$[ebp]
  00039	50		 push	 eax
  0003a	8b 4d 08	 mov	 ecx, DWORD PTR _ForceRedraw$[ebp]
  0003d	51		 push	 ecx
  0003e	68 08 90 00 00	 push	 36872			; 00009008H
  00043	e8 00 00 00 00	 call	 ?PostMessageToMainWindow@@YAXIIJ@Z ; PostMessageToMainWindow
  00048	83 c4 0c	 add	 esp, 12			; 0000000cH

; 109  :         WaitForMainWindowEvent();

  0004b	e8 00 00 00 00	 call	 ?WaitForMainWindowEvent@@YAXXZ ; WaitForMainWindowEvent

; 110  :     }
; 111  :     else

  00050	e9 c6 06 00 00	 jmp	 $LN28@WorkoutOve
$LN29@WorkoutOve:

; 112  :     {
; 113  :         int SourceHeight;
; 114  :         int SourceWidth;
; 115  : 
; 116  :         static BOOL InFunction = FALSE;
; 117  :         if(InFunction == TRUE) return;

  00055	83 3d 00 00 00
	00 01		 cmp	 DWORD PTR ?InFunction@?6??WorkoutOverlaySize@@YAXHH@Z@4HA, 1
  0005c	75 05		 jne	 SHORT $LN27@WorkoutOve
  0005e	e9 b8 06 00 00	 jmp	 $LN30@WorkoutOve
$LN27@WorkoutOve:

; 118  : 
; 119  :         GetActiveOutput()->CheckChangeMonitor(GetMainWnd());

  00063	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  00068	89 85 0c ff ff
	ff		 mov	 DWORD PTR tv72[ebp], eax
  0006e	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00073	50		 push	 eax
  00074	8b 95 0c ff ff
	ff		 mov	 edx, DWORD PTR tv72[ebp]
  0007a	8b 02		 mov	 eax, DWORD PTR [edx]
  0007c	8b 8d 0c ff ff
	ff		 mov	 ecx, DWORD PTR tv72[ebp]
  00082	8b 50 08	 mov	 edx, DWORD PTR [eax+8]
  00085	ff d2		 call	 edx

; 120  :         RECT ScreenRect;
; 121  :         GetActiveOutput()->GetMonitorRect(GetMainWnd(), &ScreenRect);

  00087	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  0008c	89 85 08 ff ff
	ff		 mov	 DWORD PTR tv79[ebp], eax
  00092	8d 85 34 ff ff
	ff		 lea	 eax, DWORD PTR _ScreenRect$142933[ebp]
  00098	50		 push	 eax
  00099	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  0009e	50		 push	 eax
  0009f	8b 8d 08 ff ff
	ff		 mov	 ecx, DWORD PTR tv79[ebp]
  000a5	8b 11		 mov	 edx, DWORD PTR [ecx]
  000a7	8b 8d 08 ff ff
	ff		 mov	 ecx, DWORD PTR tv79[ebp]
  000ad	8b 42 0c	 mov	 eax, DWORD PTR [edx+12]
  000b0	ff d0		 call	 eax

; 122  : 
; 123  :         CAspectRectangles ar;

  000b2	8d 8d 74 ff ff
	ff		 lea	 ecx, DWORD PTR _ar$142934[ebp]
  000b8	e8 00 00 00 00	 call	 ??0CAspectRectangles@@QAE@XZ

; 124  :         CSource* pSource = Providers_GetCurrentSource();

  000bd	e8 00 00 00 00	 call	 ?Providers_GetCurrentSource@@YAPAVCSource@@XZ ; Providers_GetCurrentSource
  000c2	89 85 48 ff ff
	ff		 mov	 DWORD PTR _pSource$142935[ebp], eax

; 125  : 
; 126  :         if (pMultiFrames && pMultiFrames->IsActive())

  000c8	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A, 0 ; pMultiFrames
  000cf	74 33		 je	 SHORT $LN26@WorkoutOve
  000d1	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  000d7	e8 00 00 00 00	 call	 ?IsActive@CMultiFrames@@QAEHXZ ; CMultiFrames::IsActive
  000dc	85 c0		 test	 eax, eax
  000de	74 24		 je	 SHORT $LN26@WorkoutOve

; 127  :         {
; 128  :             SourceHeight = pMultiFrames->GetHeight();

  000e0	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  000e6	e8 00 00 00 00	 call	 ?GetHeight@CMultiFrames@@QAEHXZ ; CMultiFrames::GetHeight
  000eb	89 85 70 ff ff
	ff		 mov	 DWORD PTR _SourceHeight$142928[ebp], eax

; 129  :             SourceWidth = pMultiFrames->GetWidth();

  000f1	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  000f7	e8 00 00 00 00	 call	 ?GetWidth@CMultiFrames@@QAEHXZ ; CMultiFrames::GetWidth
  000fc	89 85 30 ff ff
	ff		 mov	 DWORD PTR _SourceWidth$142929[ebp], eax
  00102	eb 51		 jmp	 SHORT $LN23@WorkoutOve
$LN26@WorkoutOve:

; 130  :         }
; 131  :         else if (pSource)

  00104	83 bd 48 ff ff
	ff 00		 cmp	 DWORD PTR _pSource$142935[ebp], 0
  0010b	74 34		 je	 SHORT $LN24@WorkoutOve

; 132  :         {
; 133  :             SourceHeight = pSource->GetHeight();

  0010d	8b 8d 48 ff ff
	ff		 mov	 ecx, DWORD PTR _pSource$142935[ebp]
  00113	8b 11		 mov	 edx, DWORD PTR [ecx]
  00115	8b 8d 48 ff ff
	ff		 mov	 ecx, DWORD PTR _pSource$142935[ebp]
  0011b	8b 42 78	 mov	 eax, DWORD PTR [edx+120]
  0011e	ff d0		 call	 eax
  00120	89 85 70 ff ff
	ff		 mov	 DWORD PTR _SourceHeight$142928[ebp], eax

; 134  :             SourceWidth = pSource->GetWidth();

  00126	8b 8d 48 ff ff
	ff		 mov	 ecx, DWORD PTR _pSource$142935[ebp]
  0012c	8b 11		 mov	 edx, DWORD PTR [ecx]
  0012e	8b 8d 48 ff ff
	ff		 mov	 ecx, DWORD PTR _pSource$142935[ebp]
  00134	8b 42 74	 mov	 eax, DWORD PTR [edx+116]
  00137	ff d0		 call	 eax
  00139	89 85 30 ff ff
	ff		 mov	 DWORD PTR _SourceWidth$142929[ebp], eax

; 135  :         }
; 136  :         else

  0013f	eb 14		 jmp	 SHORT $LN23@WorkoutOve
$LN24@WorkoutOve:

; 137  :         {
; 138  :             SourceHeight = 720;

  00141	c7 85 70 ff ff
	ff d0 02 00 00	 mov	 DWORD PTR _SourceHeight$142928[ebp], 720 ; 000002d0H

; 139  :             SourceWidth = 480;

  0014b	c7 85 30 ff ff
	ff e0 01 00 00	 mov	 DWORD PTR _SourceWidth$142929[ebp], 480 ; 000001e0H
$LN23@WorkoutOve:

; 140  :         }
; 141  :         // If source width or source height is null, we do nothing
; 142  :         if (SourceWidth == 0 || SourceHeight == 0)

  00155	83 bd 30 ff ff
	ff 00		 cmp	 DWORD PTR _SourceWidth$142929[ebp], 0
  0015c	74 09		 je	 SHORT $LN21@WorkoutOve
  0015e	83 bd 70 ff ff
	ff 00		 cmp	 DWORD PTR _SourceHeight$142928[ebp], 0
  00165	75 14		 jne	 SHORT $LN22@WorkoutOve
$LN21@WorkoutOve:

; 143  :         {
; 144  :             LOG(2,_T("Zero height or width in WorkoutOverlaySize!"));

  00167	68 00 00 00 00	 push	 OFFSET ??_C@_1FI@DBNBGNPM@?$AAZ?$AAe?$AAr?$AAo?$AA?5?$AAh?$AAe?$AAi?$AAg?$AAh?$AAt?$AA?5?$AAo?$AAr?$AA?5?$AAw?$AAi?$AAd?$AAt?$AAh?$AA?5?$AAi?$AAn?$AA?5?$AAW?$AAo?$AAr?$AAk?$AAo?$AAu?$AAt?$AAO@
  0016c	6a 02		 push	 2
  0016e	e8 00 00 00 00	 call	 ?LOG@@YAXHPB_WZZ	; LOG
  00173	83 c4 08	 add	 esp, 8

; 145  :             LOGD(_T("Zero height or width in WorkoutOverlaySize!\n"));
; 146  :             return;

  00176	e9 a0 05 00 00	 jmp	 $LN30@WorkoutOve
$LN22@WorkoutOve:

; 147  :         }
; 148  : 
; 149  :         InFunction = TRUE;

  0017b	c7 05 00 00 00
	00 01 00 00 00	 mov	 DWORD PTR ?InFunction@?6??WorkoutOverlaySize@@YAXHH@Z@4HA, 1

; 150  :         UpdateWindowState();

  00185	e8 00 00 00 00	 call	 ?UpdateWindowState@@YAXXZ ; UpdateWindowState

; 151  : 
; 152  :         // Setup the rectangles...
; 153  :         // Previous ones...
; 154  :         ar.m_PrevDestRect = AspectSettings.DestinationRect;

  0018a	8b 0d 4c 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+76
  00190	89 8d 74 ff ff
	ff		 mov	 DWORD PTR _ar$142934[ebp], ecx
  00196	8b 15 50 00 00
	00		 mov	 edx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+80
  0019c	89 95 78 ff ff
	ff		 mov	 DWORD PTR _ar$142934[ebp+4], edx
  001a2	a1 54 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+84
  001a7	89 85 7c ff ff
	ff		 mov	 DWORD PTR _ar$142934[ebp+8], eax
  001ad	8b 0d 58 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+88
  001b3	89 4d 80	 mov	 DWORD PTR _ar$142934[ebp+12], ecx

; 155  :         ar.m_PrevSrcRect = AspectSettings.SourceRect;

  001b6	8b 15 5c 00 00
	00		 mov	 edx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+92
  001bc	89 55 84	 mov	 DWORD PTR _ar$142934[ebp+16], edx
  001bf	a1 60 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+96
  001c4	89 45 88	 mov	 DWORD PTR _ar$142934[ebp+20], eax
  001c7	8b 0d 64 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+100
  001cd	89 4d 8c	 mov	 DWORD PTR _ar$142934[ebp+24], ecx
  001d0	8b 15 68 00 00
	00		 mov	 edx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+104
  001d6	89 55 90	 mov	 DWORD PTR _ar$142934[ebp+28], edx

; 156  :         // Source frame
; 157  :         ar.m_OriginalOverlaySrcRect.left = 0;

  001d9	c7 45 ac 00 00
	00 00		 mov	 DWORD PTR _ar$142934[ebp+56], 0

; 158  :         ar.m_OriginalOverlaySrcRect.right = SourceWidth;

  001e0	8b 85 30 ff ff
	ff		 mov	 eax, DWORD PTR _SourceWidth$142929[ebp]
  001e6	89 45 b4	 mov	 DWORD PTR _ar$142934[ebp+64], eax

; 159  :         ar.m_OriginalOverlaySrcRect.top = 0;

  001e9	c7 45 b0 00 00
	00 00		 mov	 DWORD PTR _ar$142934[ebp+60], 0

; 160  :         ar.m_OriginalOverlaySrcRect.bottom = SourceHeight;

  001f0	8b 8d 70 ff ff
	ff		 mov	 ecx, DWORD PTR _SourceHeight$142928[ebp]
  001f6	89 4d b8	 mov	 DWORD PTR _ar$142934[ebp+68], ecx

; 161  :         // Set the aspect adjustment factor...
; 162  :         if (AspectSettings.SquarePixels)

  001f9	83 3d f8 00 00
	00 00		 cmp	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+248, 0
  00200	74 2e		 je	 SHORT $LN20@WorkoutOve

; 163  :         {
; 164  :             ar.m_OriginalOverlaySrcRect.setAspectAdjust((double)SourceWidth/(double)SourceHeight,
; 165  :                                                     (double)SourceWidth/(double)SourceHeight);

  00202	db 85 30 ff ff
	ff		 fild	 DWORD PTR _SourceWidth$142929[ebp]
  00208	da b5 70 ff ff
	ff		 fidiv	 DWORD PTR _SourceHeight$142928[ebp]
  0020e	83 ec 08	 sub	 esp, 8
  00211	dd 1c 24	 fstp	 QWORD PTR [esp]
  00214	db 85 30 ff ff
	ff		 fild	 DWORD PTR _SourceWidth$142929[ebp]
  0021a	da b5 70 ff ff
	ff		 fidiv	 DWORD PTR _SourceHeight$142928[ebp]
  00220	83 ec 08	 sub	 esp, 8
  00223	dd 1c 24	 fstp	 QWORD PTR [esp]
  00226	8d 4d ac	 lea	 ecx, DWORD PTR _ar$142934[ebp+56]
  00229	e8 00 00 00 00	 call	 ?setAspectAdjust@CAspectRect@@QAEXNN@Z ; CAspectRect::setAspectAdjust

; 166  :         }
; 167  :         else

  0022e	eb 25		 jmp	 SHORT $LN19@WorkoutOve
$LN20@WorkoutOve:

; 168  :         {
; 169  :             ar.m_OriginalOverlaySrcRect.setAspectAdjust((double)SourceWidth/(double)SourceHeight,
; 170  :                                                     GetActualSourceFrameAspect());

  00230	e8 00 00 00 00	 call	 ?GetActualSourceFrameAspect@@YANXZ ; GetActualSourceFrameAspect
  00235	83 ec 08	 sub	 esp, 8
  00238	dd 1c 24	 fstp	 QWORD PTR [esp]
  0023b	db 85 30 ff ff
	ff		 fild	 DWORD PTR _SourceWidth$142929[ebp]
  00241	da b5 70 ff ff
	ff		 fidiv	 DWORD PTR _SourceHeight$142928[ebp]
  00247	83 ec 08	 sub	 esp, 8
  0024a	dd 1c 24	 fstp	 QWORD PTR [esp]
  0024d	8d 4d ac	 lea	 ecx, DWORD PTR _ar$142934[ebp+56]
  00250	e8 00 00 00 00	 call	 ?setAspectAdjust@CAspectRect@@QAEXNN@Z ; CAspectRect::setAspectAdjust
$LN19@WorkoutOve:

; 171  :         }
; 172  : 
; 173  :         // Destination rectangle
; 174  :         //ar.m_OriginalOverlayDestRect.setToClient(hWnd,TRUE);
; 175  :         GetDisplayAreaRect(GetMainWnd(), &ar.m_OriginalOverlayDestRect, TRUE);

  00255	6a 01		 push	 1
  00257	8d 55 94	 lea	 edx, DWORD PTR _ar$142934[ebp+32]
  0025a	52		 push	 edx
  0025b	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00260	50		 push	 eax
  00261	e8 00 00 00 00	 call	 ?GetDisplayAreaRect@@YAHPAUHWND__@@PAUtagRECT@@H@Z ; GetDisplayAreaRect
  00266	83 c4 0c	 add	 esp, 12			; 0000000cH

; 176  :         ClientToScreen(GetMainWnd(), (POINT*) &ar.m_OriginalOverlayDestRect.left);

  00269	8d 45 94	 lea	 eax, DWORD PTR _ar$142934[ebp+32]
  0026c	50		 push	 eax
  0026d	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00272	50		 push	 eax
  00273	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__ClientToScreen@8

; 177  :         ClientToScreen(GetMainWnd(), (POINT*) &ar.m_OriginalOverlayDestRect.right);

  00279	8d 4d 9c	 lea	 ecx, DWORD PTR _ar$142934[ebp+40]
  0027c	51		 push	 ecx
  0027d	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00282	50		 push	 eax
  00283	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__ClientToScreen@8

; 178  : 
; 179  :         // Set the aspect adjustment factor if the screen aspect is specified...
; 180  :         if (AspectSettings.TargetAspect)

  00289	83 3d 04 00 00
	00 00		 cmp	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+4, 0
  00290	74 52		 je	 SHORT $LN18@WorkoutOve

; 181  :         {
; 182  :             ar.m_OriginalOverlayDestRect.setAspectAdjust((double) (ScreenRect.right  - ScreenRect.left) / (double) (ScreenRect.bottom - ScreenRect.top),
; 183  :                                                     AspectSettings.TargetAspect/1000.0);

  00292	db 05 04 00 00
	00		 fild	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+4
  00298	dc 35 00 00 00
	00		 fdiv	 QWORD PTR __real@408f400000000000
  0029e	83 ec 08	 sub	 esp, 8
  002a1	dd 1c 24	 fstp	 QWORD PTR [esp]
  002a4	8b 95 3c ff ff
	ff		 mov	 edx, DWORD PTR _ScreenRect$142933[ebp+8]
  002aa	2b 95 34 ff ff
	ff		 sub	 edx, DWORD PTR _ScreenRect$142933[ebp]
  002b0	89 95 04 ff ff
	ff		 mov	 DWORD PTR tv496[ebp], edx
  002b6	db 85 04 ff ff
	ff		 fild	 DWORD PTR tv496[ebp]
  002bc	8b 85 40 ff ff
	ff		 mov	 eax, DWORD PTR _ScreenRect$142933[ebp+12]
  002c2	2b 85 38 ff ff
	ff		 sub	 eax, DWORD PTR _ScreenRect$142933[ebp+4]
  002c8	89 85 00 ff ff
	ff		 mov	 DWORD PTR tv498[ebp], eax
  002ce	db 85 00 ff ff
	ff		 fild	 DWORD PTR tv498[ebp]
  002d4	de f9		 fdivp	 ST(1), ST(0)
  002d6	83 ec 08	 sub	 esp, 8
  002d9	dd 1c 24	 fstp	 QWORD PTR [esp]
  002dc	8d 4d 94	 lea	 ecx, DWORD PTR _ar$142934[ebp+32]
  002df	e8 00 00 00 00	 call	 ?setAspectAdjust@CAspectRect@@QAEXNN@Z ; CAspectRect::setAspectAdjust
$LN18@WorkoutOve:

; 184  :         }
; 185  : 
; 186  :         // Set current values to original for starters...
; 187  :         ar.m_CurrentOverlaySrcRect = ar.m_OriginalOverlaySrcRect;

  002e4	8d 4d ac	 lea	 ecx, DWORD PTR _ar$142934[ebp+56]
  002e7	51		 push	 ecx
  002e8	8d 4d dc	 lea	 ecx, DWORD PTR _ar$142934[ebp+104]
  002eb	e8 00 00 00 00	 call	 ??4CAspectRect@@QAEAAV0@ABV0@@Z ; CAspectRect::operator=

; 188  :         ar.m_CurrentOverlayDestRect = ar.m_OriginalOverlayDestRect;

  002f0	8d 55 94	 lea	 edx, DWORD PTR _ar$142934[ebp+32]
  002f3	52		 push	 edx
  002f4	8d 4d c4	 lea	 ecx, DWORD PTR _ar$142934[ebp+80]
  002f7	e8 00 00 00 00	 call	 ??4CAspectRect@@QAEAAV0@ABV0@@Z ; CAspectRect::operator=

; 189  : 
; 190  :         // Build filter chain and apply
; 191  :         /// \todo Filter chain should be saved and only rebuilt if options are changed
; 192  :         CMasterFilterChain FilterChain(SourceWidth, SourceHeight);

  002fc	8b 85 70 ff ff
	ff		 mov	 eax, DWORD PTR _SourceHeight$142928[ebp]
  00302	50		 push	 eax
  00303	8b 8d 30 ff ff
	ff		 mov	 ecx, DWORD PTR _SourceWidth$142929[ebp]
  00309	51		 push	 ecx
  0030a	8d 8d 4c ff ff
	ff		 lea	 ecx, DWORD PTR _FilterChain$142957[ebp]
  00310	e8 00 00 00 00	 call	 ??0CMasterFilterChain@@QAE@HH@Z ; CMasterFilterChain::CMasterFilterChain
  00315	c7 45 fc 00 00
	00 00		 mov	 DWORD PTR __$EHRec$[ebp+8], 0

; 193  :         BOOL RequestResize(FALSE);

  0031c	c7 85 44 ff ff
	ff 00 00 00 00	 mov	 DWORD PTR _RequestResize$142958[ebp], 0

; 194  :         FilterChain.adjustAspect(ar, RequestResize);

  00326	8d 95 44 ff ff
	ff		 lea	 edx, DWORD PTR _RequestResize$142958[ebp]
  0032c	52		 push	 edx
  0032d	8d 85 74 ff ff
	ff		 lea	 eax, DWORD PTR _ar$142934[ebp]
  00333	50		 push	 eax
  00334	8d 8d 4c ff ff
	ff		 lea	 ecx, DWORD PTR _FilterChain$142957[ebp]
  0033a	e8 00 00 00 00	 call	 ?adjustAspect@CMasterFilterChain@@UAEXAAVCAspectRectangles@@AAH@Z ; CMasterFilterChain::adjustAspect

; 195  : 
; 196  : 		if (RequestResize && allowResize)

  0033f	83 bd 44 ff ff
	ff 00		 cmp	 DWORD PTR _RequestResize$142958[ebp], 0
  00346	74 33		 je	 SHORT $LN17@WorkoutOve
  00348	83 7d 0c 00	 cmp	 DWORD PTR _allowResize$[ebp], 0
  0034c	74 2d		 je	 SHORT $LN17@WorkoutOve

; 197  :         {
; 198  :             InFunction = FALSE;

  0034e	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?InFunction@?6??WorkoutOverlaySize@@YAXHH@Z@4HA, 0

; 199  :             WorkoutOverlaySize(FALSE, FALSE); // Prevent further recursion - only allow 1 level of request for readjusting the overlay

  00358	6a 00		 push	 0
  0035a	6a 00		 push	 0
  0035c	e8 00 00 00 00	 call	 ?WorkoutOverlaySize@@YAXHH@Z ; WorkoutOverlaySize
  00361	83 c4 08	 add	 esp, 8

; 200  :             return;

  00364	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  0036b	8d 8d 4c ff ff
	ff		 lea	 ecx, DWORD PTR _FilterChain$142957[ebp]
  00371	e8 00 00 00 00	 call	 ??1CMasterFilterChain@@UAE@XZ
  00376	e9 a0 03 00 00	 jmp	 $LN30@WorkoutOve
$LN17@WorkoutOve:

; 201  :         }
; 202  : 
; 203  :         // If we're in half-height Mode, squish the source rectangle accordingly.  This
; 204  :         // allows the overlay hardware to do our bobbing for us.
; 205  :         if ( (!pMultiFrames || !pMultiFrames->IsActive())
; 206  :         && (InHalfHeightMode() == TRUE) )

  0037b	83 3d 00 00 00
	00 00		 cmp	 DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A, 0 ; pMultiFrames
  00382	74 0f		 je	 SHORT $LN15@WorkoutOve
  00384	8b 0d 00 00 00
	00		 mov	 ecx, DWORD PTR ?pMultiFrames@@3PAVCMultiFrames@@A ; pMultiFrames
  0038a	e8 00 00 00 00	 call	 ?IsActive@CMultiFrames@@QAEHXZ ; CMultiFrames::IsActive
  0038f	85 c0		 test	 eax, eax
  00391	75 20		 jne	 SHORT $LN16@WorkoutOve
$LN15@WorkoutOve:
  00393	e8 00 00 00 00	 call	 ?InHalfHeightMode@@YAHXZ ; InHalfHeightMode
  00398	83 f8 01	 cmp	 eax, 1
  0039b	75 16		 jne	 SHORT $LN16@WorkoutOve

; 207  :         {
; 208  :             ar.m_CurrentOverlaySrcRect.top /= 2;

  0039d	8b 45 e0	 mov	 eax, DWORD PTR _ar$142934[ebp+108]
  003a0	99		 cdq
  003a1	2b c2		 sub	 eax, edx
  003a3	d1 f8		 sar	 eax, 1
  003a5	89 45 e0	 mov	 DWORD PTR _ar$142934[ebp+108], eax

; 209  :             ar.m_CurrentOverlaySrcRect.bottom /= 2;

  003a8	8b 45 e8	 mov	 eax, DWORD PTR _ar$142934[ebp+116]
  003ab	99		 cdq
  003ac	2b c2		 sub	 eax, edx
  003ae	d1 f8		 sar	 eax, 1
  003b0	89 45 e8	 mov	 DWORD PTR _ar$142934[ebp+116], eax
$LN16@WorkoutOve:

; 210  :         }
; 211  : 
; 212  :         // Save the settings....
; 213  :         AspectSettings.SourceRect = ar.m_CurrentOverlaySrcRect;

  003b3	8b 4d dc	 mov	 ecx, DWORD PTR _ar$142934[ebp+104]
  003b6	89 0d 5c 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+92, ecx
  003bc	8b 55 e0	 mov	 edx, DWORD PTR _ar$142934[ebp+108]
  003bf	89 15 60 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+96, edx
  003c5	8b 45 e4	 mov	 eax, DWORD PTR _ar$142934[ebp+112]
  003c8	a3 64 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+100, eax
  003cd	8b 4d e8	 mov	 ecx, DWORD PTR _ar$142934[ebp+116]
  003d0	89 0d 68 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+104, ecx

; 214  :         AspectSettings.DestinationRectWindow = ar.m_CurrentOverlayDestRect;

  003d6	8b 55 c4	 mov	 edx, DWORD PTR _ar$142934[ebp+80]
  003d9	89 15 6c 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+108, edx
  003df	8b 45 c8	 mov	 eax, DWORD PTR _ar$142934[ebp+84]
  003e2	a3 70 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+112, eax
  003e7	8b 4d cc	 mov	 ecx, DWORD PTR _ar$142934[ebp+88]
  003ea	89 0d 74 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+116, ecx
  003f0	8b 55 d0	 mov	 edx, DWORD PTR _ar$142934[ebp+92]
  003f3	89 15 78 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+120, edx

; 215  :         AspectSettings.DestinationRect = ar.m_CurrentOverlayDestRect;

  003f9	8b 45 c4	 mov	 eax, DWORD PTR _ar$142934[ebp+80]
  003fc	a3 4c 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+76, eax
  00401	8b 4d c8	 mov	 ecx, DWORD PTR _ar$142934[ebp+84]
  00404	89 0d 50 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+80, ecx
  0040a	8b 55 cc	 mov	 edx, DWORD PTR _ar$142934[ebp+88]
  0040d	89 15 54 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+84, edx
  00413	8b 45 d0	 mov	 eax, DWORD PTR _ar$142934[ebp+92]
  00416	a3 58 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+88, eax

; 216  :         ScreenToClient(GetMainWnd(), ((PPOINT)&AspectSettings.DestinationRect.left));

  0041b	68 4c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+76
  00420	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00425	50		 push	 eax
  00426	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__ScreenToClient@8

; 217  :         ScreenToClient(GetMainWnd(), ((PPOINT)&AspectSettings.DestinationRect.right));

  0042c	68 54 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+84
  00431	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00436	50		 push	 eax
  00437	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__ScreenToClient@8

; 218  : 
; 219  :         // cut the on-screen overlay surface out of the monitor screen area
; 220  :         if (AspectSettings.DestinationRectWindow.right > ScreenRect.right)

  0043d	8b 0d 74 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+116
  00443	3b 8d 3c ff ff
	ff		 cmp	 ecx, DWORD PTR _ScreenRect$142933[ebp+8]
  00449	7e 0c		 jle	 SHORT $LN14@WorkoutOve

; 221  :         {
; 222  :             AspectSettings.DestinationRectWindow.right = ScreenRect.right;

  0044b	8b 95 3c ff ff
	ff		 mov	 edx, DWORD PTR _ScreenRect$142933[ebp+8]
  00451	89 15 74 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+116, edx
$LN14@WorkoutOve:

; 223  :         }
; 224  : 
; 225  :         if (AspectSettings.DestinationRectWindow.left < ScreenRect.left)

  00457	a1 6c 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+108
  0045c	3b 85 34 ff ff
	ff		 cmp	 eax, DWORD PTR _ScreenRect$142933[ebp]
  00462	7d 0c		 jge	 SHORT $LN13@WorkoutOve

; 226  :         {
; 227  :             AspectSettings.DestinationRectWindow.left = ScreenRect.left;

  00464	8b 8d 34 ff ff
	ff		 mov	 ecx, DWORD PTR _ScreenRect$142933[ebp]
  0046a	89 0d 6c 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+108, ecx
$LN13@WorkoutOve:

; 228  :         }
; 229  : 
; 230  :         if (AspectSettings.DestinationRectWindow.top < ScreenRect.top)

  00470	8b 15 70 00 00
	00		 mov	 edx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+112
  00476	3b 95 38 ff ff
	ff		 cmp	 edx, DWORD PTR _ScreenRect$142933[ebp+4]
  0047c	7d 0b		 jge	 SHORT $LN12@WorkoutOve

; 231  :         {
; 232  :             AspectSettings.DestinationRectWindow.top = ScreenRect.top;

  0047e	8b 85 38 ff ff
	ff		 mov	 eax, DWORD PTR _ScreenRect$142933[ebp+4]
  00484	a3 70 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+112, eax
$LN12@WorkoutOve:

; 233  :         }
; 234  : 
; 235  :         if (AspectSettings.DestinationRectWindow.bottom > ScreenRect.bottom)

  00489	8b 0d 78 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+120
  0048f	3b 8d 40 ff ff
	ff		 cmp	 ecx, DWORD PTR _ScreenRect$142933[ebp+12]
  00495	7e 0c		 jle	 SHORT $LN11@WorkoutOve

; 236  :         {
; 237  :             AspectSettings.DestinationRectWindow.bottom = ScreenRect.bottom;

  00497	8b 95 40 ff ff
	ff		 mov	 edx, DWORD PTR _ScreenRect$142933[ebp+12]
  0049d	89 15 78 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+120, edx
$LN11@WorkoutOve:

; 238  :         }
; 239  :         AspectSettings.DestinationRectWindow.left   -= ScreenRect.left;

  004a3	a1 6c 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+108
  004a8	2b 85 34 ff ff
	ff		 sub	 eax, DWORD PTR _ScreenRect$142933[ebp]
  004ae	a3 6c 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+108, eax

; 240  :         AspectSettings.DestinationRectWindow.right  -= ScreenRect.left;

  004b3	8b 0d 74 00 00
	00		 mov	 ecx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+116
  004b9	2b 8d 34 ff ff
	ff		 sub	 ecx, DWORD PTR _ScreenRect$142933[ebp]
  004bf	89 0d 74 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+116, ecx

; 241  :         AspectSettings.DestinationRectWindow.top    -= ScreenRect.top;

  004c5	8b 15 70 00 00
	00		 mov	 edx, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+112
  004cb	2b 95 38 ff ff
	ff		 sub	 edx, DWORD PTR _ScreenRect$142933[ebp+4]
  004d1	89 15 70 00 00
	00		 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+112, edx

; 242  :         AspectSettings.DestinationRectWindow.bottom -= ScreenRect.top;

  004d7	a1 78 00 00 00	 mov	 eax, DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+120
  004dc	2b 85 38 ff ff
	ff		 sub	 eax, DWORD PTR _ScreenRect$142933[ebp+4]
  004e2	a3 78 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+120, eax

; 243  : 
; 244  :         // Invert the rectangle if necessary...
; 245  :         //
; 246  :         // Removed for now - seems to cause application to crash - looks
; 247  :         // like video drivers can't deal with this...
; 248  :         /*
; 249  :         if (( AspectSettings.invertX && AspectSettings.SourceRect.right > AspectSettings.SourceRect.left)
; 250  :             ||
; 251  :             (!AspectSettings.invertX && AspectSettings.SourceRect.right < AspectSettings.SourceRect.left))
; 252  :         {
; 253  :             int t = AspectSettings.SourceRect.right;
; 254  :             AspectSettings.SourceRect.right = AspectSettings.SourceRect.left;
; 255  :             AspectSettings.SourceRect.left = t;
; 256  :         }
; 257  :         if (( AspectSettings.invertY && AspectSettings.SourceRect.bottom > AspectSettings.SourceRect.top)
; 258  :             ||
; 259  :             (!AspectSettings.invertY && AspectSettings.SourceRect.bottom < AspectSettings.SourceRect.top)) {
; 260  :             int t = AspectSettings.SourceRect.top;
; 261  :             AspectSettings.SourceRect.top = AspectSettings.SourceRect.bottom;
; 262  :             AspectSettings.SourceRect.bottom = t;
; 263  :         }
; 264  :         */
; 265  : 
; 266  :         if(ForceRedraw)

  004e7	83 7d 08 00	 cmp	 DWORD PTR _ForceRedraw$[ebp], 0
  004eb	0f 84 80 00 00
	00		 je	 $LN10@WorkoutOve

; 267  :         {
; 268  :             // if we have changed source recatangle then we seem to need
; 269  :             // to do a hide first
; 270  :             // at least on nVidia cards
; 271  :             if (memcmp(&ar.m_PrevSrcRect,&AspectSettings.SourceRect,sizeof(ar.m_PrevSrcRect)))

  004f1	6a 10		 push	 16			; 00000010H
  004f3	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  004f8	8d 4d 84	 lea	 ecx, DWORD PTR _ar$142934[ebp+16]
  004fb	51		 push	 ecx
  004fc	e8 00 00 00 00	 call	 _memcmp
  00501	83 c4 0c	 add	 esp, 12			; 0000000cH
  00504	85 c0		 test	 eax, eax
  00506	74 27		 je	 SHORT $LN9@WorkoutOve

; 272  :             {
; 273  :                 GetActiveOutput()->Overlay_Update(NULL, NULL, DDOVER_HIDE);

  00508	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  0050d	89 85 fc fe ff
	ff		 mov	 DWORD PTR tv282[ebp], eax
  00513	68 00 02 00 00	 push	 512			; 00000200H
  00518	6a 00		 push	 0
  0051a	6a 00		 push	 0
  0051c	8b 95 fc fe ff
	ff		 mov	 edx, DWORD PTR tv282[ebp]
  00522	8b 02		 mov	 eax, DWORD PTR [edx]
  00524	8b 8d fc fe ff
	ff		 mov	 ecx, DWORD PTR tv282[ebp]
  0052a	8b 50 20	 mov	 edx, DWORD PTR [eax+32]
  0052d	ff d2		 call	 edx
$LN9@WorkoutOve:

; 274  :             }
; 275  : 
; 276  :             GetActiveOutput()->Overlay_Update(&AspectSettings.SourceRect, &AspectSettings.DestinationRectWindow, DDOVER_SHOW);

  0052f	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  00534	89 85 f8 fe ff
	ff		 mov	 DWORD PTR tv290[ebp], eax
  0053a	68 00 40 00 00	 push	 16384			; 00004000H
  0053f	68 6c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+108
  00544	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  00549	8b 85 f8 fe ff
	ff		 mov	 eax, DWORD PTR tv290[ebp]
  0054f	8b 10		 mov	 edx, DWORD PTR [eax]
  00551	8b 8d f8 fe ff
	ff		 mov	 ecx, DWORD PTR tv290[ebp]
  00557	8b 42 20	 mov	 eax, DWORD PTR [edx+32]
  0055a	ff d0		 call	 eax

; 277  : 
; 278  :             InvalidateRect(GetMainWnd(), NULL, FALSE);

  0055c	6a 00		 push	 0
  0055e	6a 00		 push	 0
  00560	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00565	50		 push	 eax
  00566	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__InvalidateRect@12

; 279  :         }
; 280  :         else

  0056c	e9 8e 01 00 00	 jmp	 $LN2@WorkoutOve
$LN10@WorkoutOve:

; 281  :         {
; 282  :             // Set the overlay
; 283  :             if (!AspectSettings.DeferedSetOverlay) // MRS 2-22-01 - Defered overlay set

  00571	83 3d 7c 00 00
	00 00		 cmp	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+124, 0
  00578	0f 85 b8 00 00
	00		 jne	 $LN7@WorkoutOve

; 284  :             {
; 285  :                 // if we have changed source recatangle then we seem to need
; 286  :                 // to do a hide first
; 287  :                 // at least on nVidia cards
; 288  :                 if (memcmp(&ar.m_PrevSrcRect,&AspectSettings.SourceRect,sizeof(ar.m_PrevSrcRect)))

  0057e	6a 10		 push	 16			; 00000010H
  00580	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  00585	8d 4d 84	 lea	 ecx, DWORD PTR _ar$142934[ebp+16]
  00588	51		 push	 ecx
  00589	e8 00 00 00 00	 call	 _memcmp
  0058e	83 c4 0c	 add	 esp, 12			; 0000000cH
  00591	85 c0		 test	 eax, eax
  00593	74 27		 je	 SHORT $LN6@WorkoutOve

; 289  :                 {
; 290  :                     GetActiveOutput()->Overlay_Update(NULL, NULL, DDOVER_HIDE);

  00595	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  0059a	89 85 f4 fe ff
	ff		 mov	 DWORD PTR tv308[ebp], eax
  005a0	68 00 02 00 00	 push	 512			; 00000200H
  005a5	6a 00		 push	 0
  005a7	6a 00		 push	 0
  005a9	8b 95 f4 fe ff
	ff		 mov	 edx, DWORD PTR tv308[ebp]
  005af	8b 02		 mov	 eax, DWORD PTR [edx]
  005b1	8b 8d f4 fe ff
	ff		 mov	 ecx, DWORD PTR tv308[ebp]
  005b7	8b 50 20	 mov	 edx, DWORD PTR [eax+32]
  005ba	ff d2		 call	 edx
$LN6@WorkoutOve:

; 291  :                 }
; 292  : 
; 293  :                 GetActiveOutput()->Overlay_Update(&AspectSettings.SourceRect, &AspectSettings.DestinationRectWindow, DDOVER_SHOW);

  005bc	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  005c1	89 85 f0 fe ff
	ff		 mov	 DWORD PTR tv316[ebp], eax
  005c7	68 00 40 00 00	 push	 16384			; 00004000H
  005cc	68 6c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+108
  005d1	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  005d6	8b 85 f0 fe ff
	ff		 mov	 eax, DWORD PTR tv316[ebp]
  005dc	8b 10		 mov	 edx, DWORD PTR [eax]
  005de	8b 8d f0 fe ff
	ff		 mov	 ecx, DWORD PTR tv316[ebp]
  005e4	8b 42 20	 mov	 eax, DWORD PTR [edx+32]
  005e7	ff d0		 call	 eax

; 294  : 
; 295  :                 // repaint if needed
; 296  :                 if (memcmp(&ar.m_PrevDestRect,&AspectSettings.DestinationRect,sizeof(ar.m_PrevDestRect)))

  005e9	6a 10		 push	 16			; 00000010H
  005eb	68 4c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+76
  005f0	8d 8d 74 ff ff
	ff		 lea	 ecx, DWORD PTR _ar$142934[ebp]
  005f6	51		 push	 ecx
  005f7	e8 00 00 00 00	 call	 _memcmp
  005fc	83 c4 0c	 add	 esp, 12			; 0000000cH
  005ff	85 c0		 test	 eax, eax
  00601	74 2e		 je	 SHORT $LN5@WorkoutOve

; 297  :                 {
; 298  :                     // MRS 2-22-01 Invalidate just the union of the old region and the new region - no need to invalidate all of the window.
; 299  :                     RECT invalidate;
; 300  :                     UnionRect(&invalidate,&ar.m_PrevDestRect,&AspectSettings.DestinationRect);

  00603	68 4c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+76
  00608	8d 95 74 ff ff
	ff		 lea	 edx, DWORD PTR _ar$142934[ebp]
  0060e	52		 push	 edx
  0060f	8d 85 20 ff ff
	ff		 lea	 eax, DWORD PTR _invalidate$142974[ebp]
  00615	50		 push	 eax
  00616	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__UnionRect@12

; 301  :                     InvalidateRect(GetMainWnd(), &invalidate, FALSE);

  0061c	6a 00		 push	 0
  0061e	8d 8d 20 ff ff
	ff		 lea	 ecx, DWORD PTR _invalidate$142974[ebp]
  00624	51		 push	 ecx
  00625	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  0062a	50		 push	 eax
  0062b	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__InvalidateRect@12
$LN5@WorkoutOve:

; 302  :                 }
; 303  :             }
; 304  :             else

  00631	e9 c9 00 00 00	 jmp	 $LN2@WorkoutOve
$LN7@WorkoutOve:

; 305  :             {
; 306  :                 // repaint now and set off overlay setting for later
; 307  :                 if (memcmp(&ar.m_PrevDestRect,&AspectSettings.DestinationRect,sizeof(ar.m_PrevDestRect)))

  00636	6a 10		 push	 16			; 00000010H
  00638	68 4c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+76
  0063d	8d 95 74 ff ff
	ff		 lea	 edx, DWORD PTR _ar$142934[ebp]
  00643	52		 push	 edx
  00644	e8 00 00 00 00	 call	 _memcmp
  00649	83 c4 0c	 add	 esp, 12			; 0000000cH
  0064c	85 c0		 test	 eax, eax
  0064e	74 3a		 je	 SHORT $LN3@WorkoutOve

; 308  :                 {
; 309  :                     // MRS 2-22-01 Invalidate just the union of the old region and the new region - no need to invalidate all of the window.
; 310  :                     RECT invalidate;
; 311  :                     UnionRect(&invalidate,&ar.m_PrevDestRect,&AspectSettings.DestinationRect);

  00650	68 4c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+76
  00655	8d 85 74 ff ff
	ff		 lea	 eax, DWORD PTR _ar$142934[ebp]
  0065b	50		 push	 eax
  0065c	8d 8d 10 ff ff
	ff		 lea	 ecx, DWORD PTR _invalidate$142977[ebp]
  00662	51		 push	 ecx
  00663	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__UnionRect@12

; 312  :                     InvalidateRect(GetMainWnd(), &invalidate, FALSE);

  00669	6a 00		 push	 0
  0066b	8d 95 10 ff ff
	ff		 lea	 edx, DWORD PTR _invalidate$142977[ebp]
  00671	52		 push	 edx
  00672	e8 00 00 00 00	 call	 ?GetMainWnd@@YAPAUHWND__@@XZ ; GetMainWnd
  00677	50		 push	 eax
  00678	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__InvalidateRect@12

; 313  :                     AspectSettings.OverlayNeedsSetting = TRUE;

  0067e	c7 05 80 00 00
	00 01 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+128, 1

; 314  :                 }
; 315  :                 else

  00688	eb 75		 jmp	 SHORT $LN2@WorkoutOve
$LN3@WorkoutOve:

; 316  :                 {
; 317  :                     // if we have changed source recatangle then we seem to need
; 318  :                     // to do a hide first
; 319  :                     // at least on nVidia cards
; 320  :                     if (memcmp(&ar.m_PrevSrcRect,&AspectSettings.SourceRect,sizeof(ar.m_PrevSrcRect)))

  0068a	6a 10		 push	 16			; 00000010H
  0068c	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  00691	8d 45 84	 lea	 eax, DWORD PTR _ar$142934[ebp+16]
  00694	50		 push	 eax
  00695	e8 00 00 00 00	 call	 _memcmp
  0069a	83 c4 0c	 add	 esp, 12			; 0000000cH
  0069d	85 c0		 test	 eax, eax
  0069f	74 27		 je	 SHORT $LN1@WorkoutOve

; 321  :                     {
; 322  :                         GetActiveOutput()->Overlay_Update(NULL, NULL, DDOVER_HIDE);

  006a1	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  006a6	89 85 ec fe ff
	ff		 mov	 DWORD PTR tv385[ebp], eax
  006ac	68 00 02 00 00	 push	 512			; 00000200H
  006b1	6a 00		 push	 0
  006b3	6a 00		 push	 0
  006b5	8b 8d ec fe ff
	ff		 mov	 ecx, DWORD PTR tv385[ebp]
  006bb	8b 11		 mov	 edx, DWORD PTR [ecx]
  006bd	8b 8d ec fe ff
	ff		 mov	 ecx, DWORD PTR tv385[ebp]
  006c3	8b 42 20	 mov	 eax, DWORD PTR [edx+32]
  006c6	ff d0		 call	 eax
$LN1@WorkoutOve:

; 323  :                     }
; 324  :                     // If not invalidating, we need to update the overlay now...
; 325  :                     GetActiveOutput()->Overlay_Update(&AspectSettings.SourceRect, &AspectSettings.DestinationRectWindow, DDOVER_SHOW);

  006c8	e8 00 00 00 00	 call	 ?GetActiveOutput@@YAPAVIOutput@@XZ ; GetActiveOutput
  006cd	89 85 e8 fe ff
	ff		 mov	 DWORD PTR tv393[ebp], eax
  006d3	68 00 40 00 00	 push	 16384			; 00004000H
  006d8	68 6c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+108
  006dd	68 5c 00 00 00	 push	 OFFSET ?AspectSettings@@3UTAspectSettings@@A+92
  006e2	8b 8d e8 fe ff
	ff		 mov	 ecx, DWORD PTR tv393[ebp]
  006e8	8b 11		 mov	 edx, DWORD PTR [ecx]
  006ea	8b 8d e8 fe ff
	ff		 mov	 ecx, DWORD PTR tv393[ebp]
  006f0	8b 42 20	 mov	 eax, DWORD PTR [edx+32]
  006f3	ff d0		 call	 eax

; 326  :                     AspectSettings.OverlayNeedsSetting = FALSE;

  006f5	c7 05 80 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?AspectSettings@@3UTAspectSettings@@A+128, 0
$LN2@WorkoutOve:

; 327  :                 }
; 328  :             }
; 329  :         }
; 330  : 
; 331  :         InFunction = FALSE;

  006ff	c7 05 00 00 00
	00 00 00 00 00	 mov	 DWORD PTR ?InFunction@?6??WorkoutOverlaySize@@YAXHH@Z@4HA, 0

; 332  :     }

  00709	c7 45 fc ff ff
	ff ff		 mov	 DWORD PTR __$EHRec$[ebp+8], -1
  00710	8d 8d 4c ff ff
	ff		 lea	 ecx, DWORD PTR _FilterChain$142957[ebp]
  00716	e8 00 00 00 00	 call	 ??1CMasterFilterChain@@UAE@XZ
$LN28@WorkoutOve:
$LN30@WorkoutOve:

; 333  : }

  0071b	8b 4d f4	 mov	 ecx, DWORD PTR __$EHRec$[ebp]
  0071e	64 89 0d 00 00
	00 00		 mov	 DWORD PTR fs:0, ecx
  00725	59		 pop	 ecx
  00726	8b e5		 mov	 esp, ebp
  00728	5d		 pop	 ebp
  00729	c3		 ret	 0
_TEXT	ENDS
;	COMDAT text$x
text$x	SEGMENT
__unwindfunclet$?WorkoutOverlaySize@@YAXHH@Z$0:
  00000	8d 8d 4c ff ff
	ff		 lea	 ecx, DWORD PTR _FilterChain$142957[ebp]
  00006	e9 00 00 00 00	 jmp	 ??1CMasterFilterChain@@UAE@XZ
__ehhandler$?WorkoutOverlaySize@@YAXHH@Z:
  0000b	8b 54 24 08	 mov	 edx, DWORD PTR [esp+8]
  0000f	8d 42 0c	 lea	 eax, DWORD PTR [edx+12]
  00012	8b 8a f0 fe ff
	ff		 mov	 ecx, DWORD PTR [edx-272]
  00018	33 c8		 xor	 ecx, eax
  0001a	e8 00 00 00 00	 call	 @__security_check_cookie@4
  0001f	b8 00 00 00 00	 mov	 eax, OFFSET __ehfuncinfo$?WorkoutOverlaySize@@YAXHH@Z
  00024	e9 00 00 00 00	 jmp	 ___CxxFrameHandler3
text$x	ENDS
?WorkoutOverlaySize@@YAXHH@Z ENDP			; WorkoutOverlaySize
END
