PROC__0045558Ch:
PUSH EBX
PUSH ESI
PUSH EDI
PUSH EBP
SUB ESP, 20
MOV EBX, EAX
MOV AL, BYTE PTR [EBX+31h]
INC AL
CALL PROC__ApplyResolution
PUSH 7
CALL GetSystemMetrics
MOV EDI, EAX
ADD EDI, EDI
ADD EDI, [EBX+40h]
ADD EDI, 4
PUSH 4
CALL GetSystemMetrics
MOV ESI, EAX
ADD ESI, [EBX+44h]
PUSH 8
CALL GetSystemMetrics
ADD EAX, EAX
ADD ESI, EAX
ADD ESI, 4
PUSH 61
CALL GetSystemMetrics
MOV EBP, EAX
PUSH 32
CALL GetSystemMetrics
ADD EAX, EAX
SUB EBP, EAX
PUSH 62
CALL GetSystemMetrics
PUSH EAX
PUSH 33
CALL GetSystemMetrics
ADD EAX, EAX
POP EDX
XCHG EAX, EDX
SUB EAX, EDX
SUB EBP, EDI
SAR EBP, 1
JNS NoCarry1
ADC EBP, 0
NoCarry1:
SUB EAX, ESI
SAR EAX, 1
JNS NoCarry2
ADC EAX, 0
NoCarry2:
MOV [ESP], EAX
PUSH EDI
PUSH ESI
MOV ECX, [ESP+08h]
MOV EDX, EBP
MOV EAX, [EBX+74h]
MOV EBX, [EAX]
CALL [EBX+7Ch]
ADD ESP, 20
POP EBP
POP EDI
POP ESI
POP EBX
RET
PROC__GetMaximumSize:
PUSH ESI
PUSH EDI
PUSH EDX
PUSH 33
POP EAX
CALL PROC__MetricsMax
MOV ESI, EDI
PUSH 32
POP EAX
CALL PROC__MetricsMax
MOV EAX, EDI
MOV ECX, 320
CDQ
IDIV ECX
MOV EDI, EAX
MOV EAX, ESI
MOV ECX, 240
CDQ
IDIV ECX
CMP EAX, EDI
JLE __NoExchange
XCHG EAX, EDI
__NoExchange:
CMP EAX, 8
JLE __NoSizeCap
MOV AL, 8
__NoSizeCap:
DEC AL
POP EDX
POP EDI
POP ESI
RET
PROC__SetResolutionBase:
MOV ESI, 320
MOV EDI, 240
XOR ECX, ECX
XOR EDX, EDX
RET
PROC__0045566Ch:
PUSH ESI
PUSH EDI
PUSH EBX
SUB ESP, 16
MOV EBX, EAX
CMP DL, BYTE PTR [EBX+31h]
JZ __CancelWindowed
MOV EAX, EDX
MOV BYTE PTR [EBX+31h], AL
TEST BYTE PTR [EBX+20h], 16
JNZ __CancelWindowed
TEST BYTE PTR [EBX+20h], 2
JNZ __CancelWindowed
CALL PROC__SetResolutionBase
CMP BYTE PTR [EBX+30h], 1
JNZ __SetFlexible
CMP BYTE PTR [EBX+32h], 0
JNZ __SetWindow
PUSH 1
POP EAX
__SetWindow:
CALL PROC__ApplyResolution
JMP __AfterApply
__SetFlexible:
MOV EAX, EBX
CALL PROC__0045558Ch
__AfterApply:
CMP BYTE PTR [EBX+A8h], 0
JZ __SkipThis
MOV EAX, EBX
CALL PROC__004560A0h
__SkipThis:
MOV EAX, EBX
CALL PROC__00456070h
__CancelWindowed:
ADD ESP, 16
POP EBX
POP EDI
POP ESI
RET
PROC__LoopResolution:
CALL PROC__SetResolutionBase
__ResLoopStep:
ADD ECX, ESI
ADD EDX, EDI
DEC AL
JNZ __ResLoopStep
RET
PROC__MetricsMax:
PUSH EAX
ADD EAX, 29
PUSH EAX
CALL GetSystemMetrics
MOV EDI, EAX
CALL GetSystemMetrics
ADD EAX, EAX
SUB EDI, EAX
RET
PROC__PreviousResolution:
CMP WORD PTR [ESI], 0074h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
TEST DL, DL
JZ __NoDecrease
DEC DL
JMP __CallItNow
__NoDecrease:
CALL PROC__GetMaximumSize
MOV DL, AL
JMP __CallItNow
PROC__NextResolution:
CMP WORD PTR [ESI], 0075h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
INC DL
CALL PROC__GetMaximumSize
CMP DL, AL
JBE __CallItNow
XOR DL, DL
__CallItNow:
MOV EAX, EBX
CALL PROC__0045566Ch
__NoChange:
RET
PROC__ApplyResolution:
CALL PROC__LoopResolution
PUSH EDX
LEA EDX, [ESP+08h]
PUSH EDX
MOV EDX, [ESP+04h]
MOV EAX, ECX
XOR EDX, EDX
XOR EAX, EAX
CALL PROC__0040ECD0h
LEA ESI, [ESP+04h]
LEA EDI, [EBX+38h]
MOVSD
MOVSD
MOVSD
MOVSD
RET
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
PROC__00455484h:
PUSH EBX
PUSH ESI
PUSH EDI
PUSH EBP
SUB ESP, 20
MOV EBX, EAX
MOV AL, BYTE PTR [EBX+31h]
INC AL
CALL PROC__ApplyResolution
PUSH 7
CALL GetSystemMetrics
MOV EDI, EAX
ADD EDI, EDI
ADD EDI, [EBX+40h]
ADD EDI, 4
PUSH 4
CALL GetSystemMetrics
MOV ESI, EAX
ADD ESI, [EBX+44h]
PUSH 8
CALL GetSystemMetrics
ADD EAX, EAX
ADD ESI, EAX
ADD ESI, 4
PUSH 61
CALL GetSystemMetrics
MOV EBP, EAX
PUSH 32
CALL GetSystemMetrics
ADD EAX, EAX
SUB EBP, EAX
PUSH 62
CALL GetSystemMetrics
PUSH EAX
PUSH 33
CALL GetSystemMetrics
ADD EAX, EAX
POP EDX
XCHG EAX, EDX
SUB EAX, EDX
SUB EBP, EDI
SAR EBP, 1
JNS NoCarry1
ADC EBP, 0
NoCarry1:
SUB EAX, ESI
SAR EAX, 1
JNS NoCarry2
ADC EAX, 0
NoCarry2:
MOV [ESP], EAX
PUSH EDI
PUSH ESI
MOV ECX, [ESP+08h]
MOV EDX, EBP
MOV EAX, [EBX+74h]
MOV EBX, [EAX]
CALL [EBX+7Ch]
ADD ESP, 20
POP EBP
POP EDI
POP ESI
POP EBX
RET
PROC__GetMaximumSize:
PUSH ESI
PUSH EDI
PUSH EDX
PUSH 33
POP EAX
CALL PROC__MetricsMax
MOV ESI, EDI
PUSH 32
POP EAX
CALL PROC__MetricsMax
MOV EAX, EDI
MOV ECX, 320
CDQ
IDIV ECX
MOV EDI, EAX
MOV EAX, ESI
MOV ECX, 240
CDQ
IDIV ECX
CMP EAX, EDI
JLE __NoExchange
XCHG EAX, EDI
__NoExchange:
CMP EAX, 8
JLE __NoSizeCap
MOV AL, 8
__NoSizeCap:
DEC AL
POP EDX
POP EDI
POP ESI
RET
PROC__SetResolutionBase:
MOV ESI, 320
MOV EDI, 240
XOR ECX, ECX
XOR EDX, EDX
RET
PROC__00455564h:
PUSH ESI
PUSH EDI
PUSH EBX
SUB ESP, 16
MOV EBX, EAX
CMP DL, BYTE PTR [EBX+31h]
JZ __CancelWindowed
MOV EAX, EDX
MOV BYTE PTR [EBX+31h], AL
TEST BYTE PTR [EBX+20h], 16
JNZ __CancelWindowed
TEST BYTE PTR [EBX+20h], 2
JNZ __CancelWindowed
CALL PROC__SetResolutionBase
CMP BYTE PTR [EBX+30h], 1
JNZ __SetFlexible
CMP BYTE PTR [EBX+32h], 0
JNZ __SetWindow
PUSH 1
POP EAX
__SetWindow:
CALL PROC__ApplyResolution
JMP __AfterApply
__SetFlexible:
MOV EAX, EBX
CALL PROC__00455484h
__AfterApply:
CMP BYTE PTR [EBX+A8h], 0
JZ __SkipThis
MOV EAX, EBX
CALL PROC__004560A0h
__SkipThis:
MOV EAX, EBX
CALL PROC__00456070h
__CancelWindowed:
ADD ESP, 16
POP EBX
POP EDI
POP ESI
RET
PROC__LoopResolution:
CALL PROC__SetResolutionBase
__ResLoopStep:
ADD ECX, ESI
ADD EDX, EDI
DEC AL
JNZ __ResLoopStep
RET
PROC__MetricsMax:
PUSH EAX
ADD EAX, 29
PUSH EAX
CALL GetSystemMetrics
MOV EDI, EAX
CALL GetSystemMetrics
ADD EAX, EAX
SUB EDI, EAX
RET
PROC__PreviousResolution:
CMP WORD PTR [ESI], 0074h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
TEST DL, DL
JZ __NoDecrease
DEC DL
JMP __CallItNow
__NoDecrease:
CALL PROC__GetMaximumSize
MOV DL, AL
JMP __CallItNow
PROC__NextResolution:
CMP WORD PTR [ESI], 0075h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
INC DL
CALL PROC__GetMaximumSize
CMP DL, AL
JBE __CallItNow
XOR DL, DL
__CallItNow:
MOV EAX, EBX
CALL PROC__00455564h
__NoChange:
RET
PROC__ApplyResolution:
CALL PROC__LoopResolution
PUSH EDX
LEA EDX, [ESP+08h]
PUSH EDX
MOV EDX, [ESP+04h]
MOV EAX, ECX
XOR EDX, EDX
XOR EAX, EAX
CALL PROC__0040ECA0h
LEA ESI, [ESP+04h]
LEA EDI, [EBX+38h]
MOVSD
MOVSD
MOVSD
MOVSD
RET
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
PROC__004558F4h:
PUSH EBX
PUSH ESI
PUSH EDI
PUSH EBP
SUB ESP, 20
MOV EBX, EAX
MOV AL, BYTE PTR [EBX+31h]
INC AL
CALL PROC__ApplyResolution
PUSH 7
CALL GetSystemMetrics
MOV EDI, EAX
ADD EDI, EDI
ADD EDI, [EBX+40h]
ADD EDI, 4
PUSH 4
CALL GetSystemMetrics
MOV ESI, EAX
ADD ESI, [EBX+44h]
PUSH 8
CALL GetSystemMetrics
ADD EAX, EAX
ADD ESI, EAX
ADD ESI, 4
PUSH 61
CALL GetSystemMetrics
MOV EBP, EAX
PUSH 32
CALL GetSystemMetrics
ADD EAX, EAX
SUB EBP, EAX
PUSH 62
CALL GetSystemMetrics
PUSH EAX
PUSH 33
CALL GetSystemMetrics
ADD EAX, EAX
POP EDX
XCHG EAX, EDX
SUB EAX, EDX
SUB EBP, EDI
SAR EBP, 1
JNS NoCarry1
ADC EBP, 0
NoCarry1:
SUB EAX, ESI
SAR EAX, 1
JNS NoCarry2
ADC EAX, 0
NoCarry2:
MOV [ESP], EAX
PUSH EDI
PUSH ESI
MOV ECX, [ESP+08h]
MOV EDX, EBP
MOV EAX, [EBX+74h]
MOV EBX, [EAX]
CALL [EBX+7Ch]
ADD ESP, 20
POP EBP
POP EDI
POP ESI
POP EBX
RET
PROC__GetMaximumSize:
PUSH ESI
PUSH EDI
PUSH EDX
PUSH 33
POP EAX
CALL PROC__MetricsMax
MOV ESI, EDI
PUSH 32
POP EAX
CALL PROC__MetricsMax
MOV EAX, EDI
MOV ECX, 320
CDQ
IDIV ECX
MOV EDI, EAX
MOV EAX, ESI
MOV ECX, 240
CDQ
IDIV ECX
CMP EAX, EDI
JLE __NoExchange
XCHG EAX, EDI
__NoExchange:
CMP EAX, 8
JLE __NoSizeCap
MOV AL, 8
__NoSizeCap:
DEC AL
POP EDX
POP EDI
POP ESI
RET
PROC__SetResolutionBase:
MOV ESI, 320
MOV EDI, 240
XOR ECX, ECX
XOR EDX, EDX
RET
PROC__004559D4h:
PUSH ESI
PUSH EDI
PUSH EBX
SUB ESP, 16
MOV EBX, EAX
CMP DL, BYTE PTR [EBX+31h]
JZ __CancelWindowed
MOV EAX, EDX
MOV BYTE PTR [EBX+31h], AL
TEST BYTE PTR [EBX+20h], 16
JNZ __CancelWindowed
TEST BYTE PTR [EBX+20h], 2
JNZ __CancelWindowed
CALL PROC__SetResolutionBase
CMP BYTE PTR [EBX+30h], 1
JNZ __SetFlexible
CMP BYTE PTR [EBX+32h], 0
JNZ __SetWindow
PUSH 1
POP EAX
__SetWindow:
CALL PROC__ApplyResolution
JMP __AfterApply
__SetFlexible:
MOV EAX, EBX
CALL PROC__004558F4h
__AfterApply:
CMP BYTE PTR [EBX+A8h], 0
JZ __SkipThis
MOV EAX, EBX
CALL PROC__00456408h
__SkipThis:
MOV EAX, EBX
CALL PROC__004563D8h
__CancelWindowed:
ADD ESP, 16
POP EBX
POP EDI
POP ESI
RET
PROC__LoopResolution:
CALL PROC__SetResolutionBase
__ResLoopStep:
ADD ECX, ESI
ADD EDX, EDI
DEC AL
JNZ __ResLoopStep
RET
PROC__MetricsMax:
PUSH EAX
ADD EAX, 29
PUSH EAX
CALL GetSystemMetrics
MOV EDI, EAX
CALL GetSystemMetrics
ADD EAX, EAX
SUB EDI, EAX
RET
PROC__PreviousResolution:
CMP WORD PTR [ESI], 0074h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
TEST DL, DL
JZ __NoDecrease
DEC DL
JMP __CallItNow
__NoDecrease:
CALL PROC__GetMaximumSize
MOV DL, AL
JMP __CallItNow
PROC__NextResolution:
CMP WORD PTR [ESI], 0075h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
INC DL
CALL PROC__GetMaximumSize
CMP DL, AL
JBE __CallItNow
XOR DL, DL
__CallItNow:
MOV EAX, EBX
CALL PROC__004559D4h
__NoChange:
RET
PROC__ApplyResolution:
CALL PROC__LoopResolution
PUSH EDX
LEA EDX, [ESP+08h]
PUSH EDX
MOV EDX, [ESP+04h]
MOV EAX, ECX
XOR EDX, EDX
XOR EAX, EAX
CALL PROC__0040ED54h
LEA ESI, [ESP+04h]
LEA EDI, [EBX+38h]
MOVSD
MOVSD
MOVSD
MOVSD
RET
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
PROC__00455E58h:
PUSH EBX
PUSH ESI
PUSH EDI
PUSH EBP
SUB ESP, 20
MOV EBX, EAX
MOV AL, BYTE PTR [EBX+31h]
INC AL
CALL PROC__ApplyResolution
PUSH 7
CALL GetSystemMetrics
MOV EDI, EAX
ADD EDI, EDI
ADD EDI, [EBX+40h]
ADD EDI, 4
PUSH 4
CALL GetSystemMetrics
MOV ESI, EAX
ADD ESI, [EBX+44h]
PUSH 8
CALL GetSystemMetrics
ADD EAX, EAX
ADD ESI, EAX
ADD ESI, 4
PUSH 61
CALL GetSystemMetrics
MOV EBP, EAX
PUSH 32
CALL GetSystemMetrics
ADD EAX, EAX
SUB EBP, EAX
PUSH 62
CALL GetSystemMetrics
PUSH EAX
PUSH 33
CALL GetSystemMetrics
ADD EAX, EAX
POP EDX
XCHG EAX, EDX
SUB EAX, EDX
SUB EBP, EDI
SAR EBP, 1
JNS NoCarry1
ADC EBP, 0
NoCarry1:
SUB EAX, ESI
SAR EAX, 1
JNS NoCarry2
ADC EAX, 0
NoCarry2:
MOV [ESP], EAX
PUSH EDI
PUSH ESI
MOV ECX, [ESP+08h]
MOV EDX, EBP
MOV EAX, [EBX+74h]
MOV EBX, [EAX]
CALL [EBX+7Ch]
ADD ESP, 20
POP EBP
POP EDI
POP ESI
POP EBX
RET
PROC__GetMaximumSize:
PUSH ESI
PUSH EDI
PUSH EDX
PUSH 33
POP EAX
CALL PROC__MetricsMax
MOV ESI, EDI
PUSH 32
POP EAX
CALL PROC__MetricsMax
MOV EAX, EDI
MOV ECX, 320
CDQ
IDIV ECX
MOV EDI, EAX
MOV EAX, ESI
MOV ECX, 240
CDQ
IDIV ECX
CMP EAX, EDI
JLE __NoExchange
XCHG EAX, EDI
__NoExchange:
CMP EAX, 8
JLE __NoSizeCap
MOV AL, 8
__NoSizeCap:
DEC AL
POP EDX
POP EDI
POP ESI
RET
PROC__SetResolutionBase:
MOV ESI, 320
MOV EDI, 240
XOR ECX, ECX
XOR EDX, EDX
RET
PROC__00455F38h:
PUSH ESI
PUSH EDI
PUSH EBX
SUB ESP, 16
MOV EBX, EAX
CMP DL, BYTE PTR [EBX+31h]
JZ __CancelWindowed
MOV EAX, EDX
MOV BYTE PTR [EBX+31h], AL
TEST BYTE PTR [EBX+20h], 16
JNZ __CancelWindowed
TEST BYTE PTR [EBX+20h], 2
JNZ __CancelWindowed
CALL PROC__SetResolutionBase
CMP BYTE PTR [EBX+30h], 1
JNZ __SetFlexible
CMP BYTE PTR [EBX+32h], 0
JNZ __SetWindow
PUSH 1
POP EAX
__SetWindow:
CALL PROC__ApplyResolution
JMP __AfterApply
__SetFlexible:
MOV EAX, EBX
CALL PROC__00455E58h
__AfterApply:
CMP BYTE PTR [EBX+A8h], 0
JZ __SkipThis
MOV EAX, EBX
CALL PROC__0045696Ch
__SkipThis:
MOV EAX, EBX
CALL PROC__0045693Ch
__CancelWindowed:
ADD ESP, 16
POP EBX
POP EDI
POP ESI
RET
PROC__LoopResolution:
CALL PROC__SetResolutionBase
__ResLoopStep:
ADD ECX, ESI
ADD EDX, EDI
DEC AL
JNZ __ResLoopStep
RET
PROC__MetricsMax:
PUSH EAX
ADD EAX, 29
PUSH EAX
CALL GetSystemMetrics
MOV EDI, EAX
CALL GetSystemMetrics
ADD EAX, EAX
SUB EDI, EAX
RET
PROC__PreviousResolution:
CMP WORD PTR [ESI], 0074h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
TEST DL, DL
JZ __NoDecrease
DEC DL
JMP __CallItNow
__NoDecrease:
CALL PROC__GetMaximumSize
MOV DL, AL
JMP __CallItNow
PROC__NextResolution:
CMP WORD PTR [ESI], 0075h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+31h]
INC DL
CALL PROC__GetMaximumSize
CMP DL, AL
JBE __CallItNow
XOR DL, DL
__CallItNow:
MOV EAX, EBX
CALL PROC__00455F38h
__NoChange:
RET
PROC__ApplyResolution:
CALL PROC__LoopResolution
PUSH EDX
LEA EDX, [ESP+08h]
PUSH EDX
MOV EDX, [ESP+04h]
MOV EAX, ECX
XOR EDX, EDX
XOR EAX, EAX
CALL PROC__0040F16Ch
LEA ESI, [ESP+04h]
LEA EDI, [EBX+38h]
MOVSD
MOVSD
MOVSD
MOVSD
RET
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
PROC__0046B328h:
PUSH ESI
PUSH EDI
PUSH EBX
PUSH EBP
SUB ESP, 20
MOV EBX, EAX
MOV AL, BYTE PTR [EBX+3Dh]
INC AL
CALL PROC__ApplyResolution
MOV EBP, 00407174h
PUSH 7
CALL EBP
MOV EDI, EAX
ADD EDI, EDI
ADD EDI, [EBX+4Ch]
ADD EDI, 4
PUSH 4
CALL EBP
MOV ESI, EAX
ADD ESI, [EBX+50h]
PUSH 8
CALL EBP
ADD EAX, EAX
ADD ESI, EAX
ADD ESI, 4
PUSH 61
CALL EBP
PUSH ESI
MOV ESI, EBP
MOV EBP, EAX
PUSH 32
CALL ESI
ADD EAX, EAX
SUB EBP, EAX
PUSH 62
CALL ESI
PUSH EAX
PUSH 33
CALL ESI
ADD EAX, EAX
POP EDX
POP ESI
XCHG EAX, EDX
SUB EAX, EDX
SUB EBP, EDI
SAR EBP, 1
JNS NoCarry1
ADC EBP, 0
NoCarry1:
SUB EAX, ESI
SAR EAX, 1
JNS NoCarry2
ADC EAX, 0
NoCarry2:
MOV [ESP], EAX
PUSH EDI
PUSH ESI
MOV ECX, [ESP+08h]
MOV EDX, EBP
MOV EAX, [EBX+80h]
MOV EBX, [EAX]
CALL [EBX+84h]
ADD ESP, 20
POP EBP
POP EBX
POP EDI
POP ESI
RET
PROC__GetMaximumSize:
PUSH ESI
PUSH EDI
PUSH EDX
PUSH 33
POP EAX
CALL PROC__MetricsMax
MOV ESI, EDI
PUSH 32
POP EAX
CALL PROC__MetricsMax
MOV EAX, EDI
MOV ECX, 320
CDQ
IDIV ECX
XCHG EAX, EDI
XCHG EAX, ESI
MOV ECX, 240
CDQ
IDIV ECX
CMP EAX, EDI
JLE __NoExchange
XCHG EAX, EDI
__NoExchange:
CMP EAX, 8
JLE __NoSizeCap
MOV AL, 8
__NoSizeCap:
DEC AL
POP EDX
POP EDI
POP ESI
RET
PROC__SetResolutionBase:
MOV ESI, 320
MOV EDI, 240
XOR ECX, ECX
XOR EDX, EDX
RET
PROC__0046B400h:
PUSH ESI
PUSH EDI
PUSH EBX
SUB ESP, 16
MOV EBX, EAX
CMP DL, BYTE PTR [EBX+3Dh]
JZ __CancelWindowed
MOV EAX, EDX
MOV BYTE PTR [EBX+3Dh], AL
TEST BYTE PTR [EBX+1Ch], 16
JNZ __CancelWindowed
TEST BYTE PTR [EBX+1Ch], 2
JNZ __CancelWindowed
CALL PROC__SetResolutionBase
CMP BYTE PTR [EBX+3Ch], 1
JNZ __SetFlexible
CMP BYTE PTR [EBX+3Eh], 0
JNZ __SetWindow
PUSH 1
POP EAX
__SetWindow:
CALL PROC__ApplyResolution
JMP __AfterApply
__SetFlexible:
MOV EAX, EBX
CALL PROC__0046B328h
__AfterApply:
CMP BYTE PTR [EBX+B0h], 0
JZ __SkipThis
MOV EAX, EBX
CALL PROC__0046BE60h
__SkipThis:
MOV EAX, EBX
CALL PROC__0046BE30h
__CancelWindowed:
ADD ESP, 16
POP EBX
POP EDI
POP ESI
RET
PROC__LoopResolution:
CALL PROC__SetResolutionBase
__ResLoopStep:
ADD ECX, ESI
ADD EDX, EDI
DEC AL
JNZ __ResLoopStep
RET
PROC__MetricsMax:
PUSH EAX
ADD EAX, 29
PUSH EAX
CALL GetSystemMetrics
MOV EDI, EAX
CALL GetSystemMetrics
ADD EAX, EAX
SUB EDI, EAX
RET
PROC__PreviousResolution:
CMP WORD PTR [ESI], 0074h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+3Dh]
TEST DL, DL
JZ __NoDecrease
DEC DL
JMP __CallItNow
__NoDecrease:
CALL PROC__GetMaximumSize
MOV DL, AL
JMP __CallItNow
PROC__NextResolution:
CMP WORD PTR [ESI], 0075h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+3Dh]
INC DL
CALL PROC__GetMaximumSize
CMP DL, AL
JBE __CallItNow
XOR DL, DL
__CallItNow:
MOV EAX, EBX
CALL PROC__0046B400h
__NoChange:
RET
PROC__ApplyResolution:
CALL PROC__LoopResolution
PUSH EDX
LEA EDX, [ESP+08h]
PUSH EDX
XOR EDX, EDX
XOR EAX, EAX
CALL PROC__004069B0h
LEA ESI, [ESP+04h]
LEA EDI, [EBX+44h]
MOVSD
MOVSD
MOVSD
MOVSD
RET
NOP
NOP
PROC__0046B328h:
PUSH ESI
PUSH EDI
PUSH EBX
PUSH EBP
SUB ESP, 20
MOV EBX, EAX
MOV AL, BYTE PTR [EBX+3Dh]
INC AL
CALL PROC__ApplyResolution
MOV EBP, 00407174h
PUSH 7
CALL EBP
MOV EDI, EAX
ADD EDI, EDI
ADD EDI, [EBX+4Ch]
ADD EDI, 4
PUSH 4
CALL EBP
MOV ESI, EAX
ADD ESI, [EBX+50h]
PUSH 8
CALL EBP
ADD EAX, EAX
ADD ESI, EAX
ADD ESI, 4
PUSH 61
CALL EBP
PUSH ESI
MOV ESI, EBP
MOV EBP, EAX
PUSH 32
CALL ESI
ADD EAX, EAX
SUB EBP, EAX
PUSH 62
CALL ESI
PUSH EAX
PUSH 33
CALL ESI
ADD EAX, EAX
POP EDX
POP ESI
XCHG EAX, EDX
SUB EAX, EDX
SUB EBP, EDI
SAR EBP, 1
JNS NoCarry1
ADC EBP, 0
NoCarry1:
SUB EAX, ESI
SAR EAX, 1
JNS NoCarry2
ADC EAX, 0
NoCarry2:
MOV [ESP], EAX
PUSH EDI
PUSH ESI
MOV ECX, [ESP+08h]
MOV EDX, EBP
MOV EAX, [EBX+80h]
MOV EBX, [EAX]
CALL [EBX+84h]
ADD ESP, 20
POP EBP
POP EBX
POP EDI
POP ESI
RET
PROC__GetMaximumSize:
PUSH ESI
PUSH EDI
PUSH EDX
PUSH 33
POP EAX
CALL PROC__MetricsMax
MOV ESI, EDI
PUSH 32
POP EAX
CALL PROC__MetricsMax
MOV EAX, EDI
MOV ECX, 320
CDQ
IDIV ECX
XCHG EAX, EDI
XCHG EAX, ESI
MOV ECX, 240
CDQ
IDIV ECX
CMP EAX, EDI
JLE __NoExchange
XCHG EAX, EDI
__NoExchange:
CMP EAX, 8
JLE __NoSizeCap
MOV AL, 8
__NoSizeCap:
DEC AL
POP EDX
POP EDI
POP ESI
RET
PROC__SetResolutionBase:
MOV ESI, 320
MOV EDI, 240
XOR ECX, ECX
XOR EDX, EDX
RET
PROC__0046B400h:
PUSH ESI
PUSH EDI
PUSH EBX
SUB ESP, 16
MOV EBX, EAX
CMP DL, BYTE PTR [EBX+3Dh]
JZ __CancelWindowed
MOV EAX, EDX
MOV BYTE PTR [EBX+3Dh], AL
TEST BYTE PTR [EBX+1Ch], 16
JNZ __CancelWindowed
TEST BYTE PTR [EBX+1Ch], 2
JNZ __CancelWindowed
CALL PROC__SetResolutionBase
CMP BYTE PTR [EBX+3Ch], 1
JNZ __SetFlexible
CMP BYTE PTR [EBX+3Eh], 0
JNZ __SetWindow
PUSH 1
POP EAX
__SetWindow:
CALL PROC__ApplyResolution
JMP __AfterApply
__SetFlexible:
MOV EAX, EBX
CALL PROC__0046B328h
__AfterApply:
CMP BYTE PTR [EBX+B0h], 0
JZ __SkipThis
MOV EAX, EBX
CALL PROC__0046BE60h
__SkipThis:
MOV EAX, EBX
CALL PROC__0046BE30h
__CancelWindowed:
ADD ESP, 16
POP EBX
POP EDI
POP ESI
RET
PROC__LoopResolution:
CALL PROC__SetResolutionBase
__ResLoopStep:
ADD ECX, ESI
ADD EDX, EDI
DEC AL
JNZ __ResLoopStep
RET
PROC__MetricsMax:
PUSH EAX
ADD EAX, 29
PUSH EAX
CALL GetSystemMetrics
MOV EDI, EAX
CALL GetSystemMetrics
ADD EAX, EAX
SUB EDI, EAX
RET
PROC__PreviousResolution:
CMP WORD PTR [ESI], 0074h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+3Dh]
TEST DL, DL
JZ __NoDecrease
DEC DL
JMP __CallItNow
__NoDecrease:
CALL PROC__GetMaximumSize
MOV DL, AL
JMP __CallItNow
PROC__NextResolution:
CMP WORD PTR [ESI], 0075h
JNZ __NoChange
MOV DL, BYTE PTR [EBX+3Dh]
INC DL
CALL PROC__GetMaximumSize
CMP DL, AL
JBE __CallItNow
XOR DL, DL
__CallItNow:
MOV EAX, EBX
CALL PROC__0046B400h
__NoChange:
RET
PROC__ApplyResolution:
CALL PROC__LoopResolution
PUSH EDX
LEA EDX, [ESP+08h]
PUSH EDX
XOR EDX, EDX
XOR EAX, EAX
CALL PROC__004069B0h
LEA ESI, [ESP+04h]
LEA EDI, [EBX+44h]
MOVSD
MOVSD
MOVSD
MOVSD
RET
NOP
NOP