.text:000007FF71CCA648 ; MMRESULT __stdcall timeBeginPeriod(UINT uPeriod)
.text:000007FF71CCA648 public timeBeginPeriod
.text:000007FF71CCA648 timeBeginPeriod proc near ; CODE XREF: timeSetEventInternal+A7↓p
.text:000007FF71CCA648 ; midiOutTimerTick+1CA↓p
.text:000007FF71CCA648 ; DATA XREF: ...
.text:000007FF71CCA648
.text:000007FF71CCA648 ActualResolution= dword ptr 8
.text:000007FF71CCA648 arg_8 = qword ptr 10h
.text:000007FF71CCA648 arg_10 = qword ptr 18h
.text:000007FF71CCA648
.text:000007FF71CCA648 ; FUNCTION CHUNK AT .text:000007FF71CCD636 SIZE 0000008A BYTES
.text:000007FF71CCA648
.text:000007FF71CCA648 mov [rsp+arg_8], rbx
.text:000007FF71CCA64D mov [rsp+arg_10], rbp
.text:000007FF71CCA652 push rdi
.text:000007FF71CCA653 push r12
.text:000007FF71CCA655 push r13
.text:000007FF71CCA657 sub rsp, 20h
.text:000007FF71CCA65B mov edi, ecx
.text:000007FF71CCA65D cmp ecx, cs:TDD_MAXRESOLUTION
.text:000007FF71CCA663 jb loc_7FF71CCD636
.text:000007FF71CCA669 cmp ecx, cs:uPeriod
.text:000007FF71CCA66F jnb loc_7FF71CCD640
.text:000007FF71CCA675 lea rcx, ResolutionCritSec ; lpCriticalSection
.text:000007FF71CCA67C call cs:__imp_EnterCriticalSection
.text:000007FF71CCA682 mov r11d, edi
.text:000007FF71CCA685 lea rbp, TimerData
.text:000007FF71CCA68C sub r11d, cs:TDD_MAXRESOLUTION
.text:000007FF71CCA693 mov r13d, 0FFFFh
.text:000007FF71CCA699 movzx eax, word ptr [rbp+r11*2+46h]
.text:000007FF71CCA69F cmp ax, r13w
.text:000007FF71CCA6A3 jz loc_7FF71CCD647
.text:000007FF71CCA6A9 inc ax
.text:000007FF71CCA6AC mov [rbp+r11*2+46h], ax
.text:000007FF71CCA6B2 cmp ax, 1
.text:000007FF71CCA6B6 jnz loc_7FF71CCD6B9
.text:000007FF71CCA6BC cmp edi, cs:dword_7FF71CEE3FC
.text:000007FF71CCA6C2 jnb loc_7FF71CCD6B9
.text:000007FF71CCA6C8 mov rcx, cs:WPP_GLOBAL_Control
.text:000007FF71CCA6CF lea r12, WPP_GLOBAL_Control
.text:000007FF71CCA6D6 cmp rcx, r12
.text:000007FF71CCA6D9 jz short loc_7FF71CCA6EC
.text:000007FF71CCA6DB bt dword ptr [rcx+1Ch], 16h
.text:000007FF71CCA6E0 jnb short loc_7FF71CCA6EC
.text:000007FF71CCA6E2 cmp byte ptr [rcx+19h], 5
.text:000007FF71CCA6E6 jnb loc_7FF71CCD656
.text:000007FF71CCA6EC
.text:000007FF71CCA6EC loc_7FF71CCA6EC: ; CODE XREF: timeBeginPeriod+91↑j
.text:000007FF71CCA6EC ; timeBeginPeriod+98↑j ...
.text:000007FF71CCA6EC mov eax, cs:MinimumTime
.text:000007FF71CCA6F2 mov ecx, edi
.text:000007FF71CCA6F4 lea r8, [rsp+38h+ActualResolution] ; ActualResolution
.text:000007FF71CCA6F9 imul ecx, 2710h
.text:000007FF71CCA6FF cmp ecx, eax
.text:000007FF71CCA701 mov dl, 1 ; SetOrUnset
.text:000007FF71CCA703 cmovb ecx, eax ; RequestedResolution
.text:000007FF71CCA706 mov [rsp+38h+ActualResolution], ecx
.text:000007FF71CCA70A call cs:__imp_NtSetTimerResolution
.text:000007FF71CCA710 xor ebx, ebx
.text:000007FF71CCA712 cmp eax, ebx
.text:000007FF71CCA714 jl loc_7FF71CCD674
.text:000007FF71CCA71A mov ecx, [rsp+38h+ActualResolution]
.text:000007FF71CCA71E mov eax, 0D1B71759h
.text:000007FF71CCA723 mov cs:dword_7FF71CEE3F8, edi
.text:000007FF71CCA729 add ecx, 26ACh
.text:000007FF71CCA72F mul ecx
.text:000007FF71CCA731 shr edx, 0Dh
.text:000007FF71CCA734 mov cs:dword_7FF71CEE3FC, edx
.text:000007FF71CCA73A jmp short $+2
.text:000007FF71CCA73C ; ---------------------------------------------------------------------------
.text:000007FF71CCA73C
.text:000007FF71CCA73C loc_7FF71CCA73C: ; CODE XREF: timeBeginPeriod+F2↑j
.text:000007FF71CCA73C ; timeBeginPeriod+306C↓j ...
.text:000007FF71CCA73C lea rcx, ResolutionCritSec ; lpCriticalSection
.text:000007FF71CCA743 call cs:__imp_LeaveCriticalSection
.text:000007FF71CCA749 mov eax, ebx
.text:000007FF71CCA74B
.text:000007FF71CCA74B loc_7FF71CCA74B: ; CODE XREF: timeBeginPeriod+2FF3↓j
.text:000007FF71CCA74B ; timeBeginPeriod+2FFA↓j
.text:000007FF71CCA74B mov rbx, [rsp+38h+arg_8]
.text:000007FF71CCA750 mov rbp, [rsp+38h+arg_10]
.text:000007FF71CCA755 add rsp, 20h
.text:000007FF71CCA759 pop r13
.text:000007FF71CCA75B pop r12
.text:000007FF71CCA75D pop rdi
.text:000007FF71CCA75E retn
.text:000007FF71CCA75E ; ---------------------------------------------------------------------------
.text:000007FF71CCA75F db 9 dup(90h)
.text:000007FF71CCA75F timeBeginPeriod endp
.text:000007FF71CCA75F
.text:000007FF71CCA768 ; Exported entry 138. timeEndPeriod
.text:000007FF71CCA768
.text:000007FF71CCA768 ; =============== S U B R O U T I N E =======================================
.text:000007FF71CCA768
.text:000007FF71CCA768
.text:000007FF71CCA768 ; MMRESULT __stdcall timeEndPeriod(UINT uPeriod)
.text:000007FF71CCA768 public timeEndPeriod
.text:000007FF71CCA768 timeEndPeriod proc near ; CODE XREF: timeKillEvent+4D↓p
.text:000007FF71CCA768 ; timeSetEventInternal+2AA9↓p ...
.text:000007FF71CCA768
.text:000007FF71CCA768 arg_0 = dword ptr 8
.text:000007FF71CCA768 ActualResolution= dword ptr 10h
.text:000007FF71CCA768 arg_10 = qword ptr 18h
.text:000007FF71CCA768
.text:000007FF71CCA768 ; FUNCTION CHUNK AT .text:000007FF71CCD6C0 SIZE 000000CE BYTES
.text:000007FF71CCA768
.text:000007FF71CCA768 mov [rsp+arg_10], rbx
.text:000007FF71CCA76D push rbp
.text:000007FF71CCA76E push rsi
.text:000007FF71CCA76F push rdi
.text:000007FF71CCA770 sub rsp, 20h
.text:000007FF71CCA774 mov ebx, ecx
.text:000007FF71CCA776 cmp ecx, cs:TDD_MAXRESOLUTION
.text:000007FF71CCA77C jb loc_7FF71CCD6C0
.text:000007FF71CCA782 cmp ecx, cs:uPeriod
.text:000007FF71CCA788 jnb loc_7FF71CCD6CA
.text:000007FF71CCA78E lea rcx, ResolutionCritSec ; lpCriticalSection
.text:000007FF71CCA795 call cs:__imp_EnterCriticalSection
.text:000007FF71CCA79B mov r8d, cs:TDD_MAXRESOLUTION
.text:000007FF71CCA7A2 mov r11d, ebx
.text:000007FF71CCA7A5 sub r11d, r8d
.text:000007FF71CCA7A8 lea r9, TimerData
.text:000007FF71CCA7AF xor edi, edi
.text:000007FF71CCA7B1 movzx eax, word ptr [r9+r11*2+46h]
.text:000007FF71CCA7B7 cmp ax, di
.text:000007FF71CCA7BA jz loc_7FF71CCD6D1
.text:000007FF71CCA7C0 mov ebp, 1
.text:000007FF71CCA7C5 sub ax, bp
.text:000007FF71CCA7C8 mov [r9+r11*2+46h], ax
.text:000007FF71CCA7CE jnz short loc_7FF71CCA82B
.text:000007FF71CCA7D0 cmp ebx, cs:dword_7FF71CEE3F8
.text:000007FF71CCA7D6 jnz short loc_7FF71CCA82B
.text:000007FF71CCA7D8 mov edx, cs:uPeriod
.text:000007FF71CCA7DE jmp short $+2
.text:000007FF71CCA7E0 ; ---------------------------------------------------------------------------
.text:000007FF71CCA7E0
.text:000007FF71CCA7E0 loc_7FF71CCA7E0: ; CODE XREF: timeEndPeriod+76↑j
.text:000007FF71CCA7E0 ; timeEndPeriod+8B↓j
.text:000007FF71CCA7E0 cmp ebx, edx
.text:000007FF71CCA7E2 jnb short loc_7FF71CCA7F5
.text:000007FF71CCA7E4 mov eax, ebx
.text:000007FF71CCA7E6 sub eax, r8d
.text:000007FF71CCA7E9 cmp [r9+rax*2+46h], di
.text:000007FF71CCA7EF jnz short loc_7FF71CCA7F5
.text:000007FF71CCA7F1 add ebx, ebp
.text:000007FF71CCA7F3 jmp short loc_7FF71CCA7E0
.text:000007FF71CCA7F5 ; ---------------------------------------------------------------------------
.text:000007FF71CCA7F5
.text:000007FF71CCA7F5 loc_7FF71CCA7F5: ; CODE XREF: timeEndPeriod+7A↑j
.text:000007FF71CCA7F5 ; timeEndPeriod+87↑j
.text:000007FF71CCA7F5 mov ecx, cs:dword_7FF71CEE3FC
.text:000007FF71CCA7FB lea r8, [rsp+38h+ActualResolution] ; ActualResolution
.text:000007FF71CCA800 xor edx, edx ; SetOrUnset
.text:000007FF71CCA802 imul ecx, 2710h ; RequestedResolution
.text:000007FF71CCA808 call cs:__imp_NtSetTimerResolution
.text:000007FF71CCA80E mov r11d, cs:uPeriod
.text:000007FF71CCA815 mov cs:dword_7FF71CEE3FC, r11d
.text:000007FF71CCA81C mov cs:dword_7FF71CEE3F8, ebx
.text:000007FF71CCA822 cmp ebx, r11d
.text:000007FF71CCA825 jb loc_7FF71CCD6DB
.text:000007FF71CCA82B
.text:000007FF71CCA82B loc_7FF71CCA82B: ; CODE XREF: timeEndPeriod+66↑j
.text:000007FF71CCA82B ; timeEndPeriod+6E↑j ...
.text:000007FF71CCA82B lea rcx, ResolutionCritSec ; lpCriticalSection
.text:000007FF71CCA832 call cs:__imp_LeaveCriticalSection
.text:000007FF71CCA838 mov eax, edi
.text:000007FF71CCA83A
.text:000007FF71CCA83A loc_7FF71CCA83A: ; CODE XREF: timeEndPeriod+2F5D↓j
.text:000007FF71CCA83A ; timeEndPeriod+2F64↓j
.text:000007FF71CCA83A mov rbx, [rsp+38h+arg_10]
.text:000007FF71CCA83F add rsp, 20h
.text:000007FF71CCA843 pop rdi
.text:000007FF71CCA844 pop rsi
.text:000007FF71CCA845 pop rbp
.text:000007FF71CCA846 retn
.text:000007FF71CCA846 ; ---------------------------------------------------------------------------
.text:000007FF71CCA847 align 10h
.text:000007FF71CCA847 timeEndPeriod endp