Function at 0x1400248b8
Capabilities:
Check for time delay via gettickcount
Set thread local storage value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rsi, rcx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
or dword [rbp - 0x29], 0xffffffff
xor r12d, r12d
mov dword [rsi + 0x58], eax
xor eax, eax
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
mov eax, dword [0x14003d120]
mov dword [rbp - 0x19], 0x7fffffff
cmp eax, 0xffffffff
jne 0x140024913
lea rcx, [rbp - 0x29]
call fcn.140024460
mov r14d, eax
jmp 0x140024919
mov dword [rbp - 0x29], eax
mov r14d, r12d
test r14d, r14d
js 0x140024cc3
mov ecx, dword [rbp - 0x29]
lea rdx, [rbp - 0x19]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, dword [rsi + 0x50]
neg eax
sbb edx, edx
xor ecx, ecx
and edx, 2
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoInitializeEx]
mov r14d, eax
test eax, eax
js 0x140024cc3
mov rbx, r12
mov qword [rbp - 1], r12
lea r8, [rbp - 1]
mov qword [rbp - 9], rbx
lea rdx, [rbp - 0x15]
mov rcx, rsi
call fcn.1400245fc
mov rdi, qword [rbp - 1]
mov r14d, eax
test eax, eax
js 0x140024c8a
lea r15, [rsi + 0x5c]
mov qword [rbp - 0x11], rdi
mov rdx, r15
lea r8, [rbp - 9]
mov rcx, rsi
call fcn.1400245fc
mov rbx, qword [rbp - 9]
mov r14d, eax
test eax, eax
js 0x140024c8a
mov rcx, rbx
call qword [sym.imp.api_ms_win_shcore_thread_l1_1_0.dll_SHSetThreadRef]
mov r14d, eax
test eax, eax
js 0x140024c8a
mov eax, dword [rsi + 0x50]
mov rcx, qword [rsi + 0x38]
shl eax, 0x18
or eax, dword [rsi + 0x54]
inc eax
mov dword [rsi + 0x30], r12d
mov dword [rbp - 0x19], eax
test rcx, rcx
je 0x1400249d1
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rbx, qword [rsi + 0x40]
test rbx, rbx
je 0x1400249fc
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400249f4
mov qword [rbx + 0x10], r12
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, rbx
call fcn.140030104
mov qword [rsi + 0x40], r12
mov byte [rsi + 0x60], r12b
lock dec dword [0x14003da60]
jmp 0x140024bde
lea rcx, [rbp + 7]
mov byte [rsi + 0x60], 1
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp + 7]
call qword [sym.imp.USER32.dll_DispatchMessageW]
mov byte [rsi + 0x60], r12b
xor r9d, r9d
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rcx, [rbp + 7]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x140024a10
mov eax, dword [rsi + 0x50]
mov rcx, qword [rsi + 0x90]
shl eax, 0x18
or eax, dword [rsi + 0x54]
bts eax, 0x17
inc eax
mov dword [rbp - 0x19], eax
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [0x140034e68]
mov eax, dword [rsi + 0x50]
mov rcx, qword [rsi + 0x28]
shl eax, 0x18
or eax, dword [rsi + 0x54]
inc eax
mov dword [rbp - 0x19], eax
test rcx, rcx
je 0x140024a91
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov qword [rsi + 0x28], r12
lea rcx, [0x14003da70]
mov qword [rbp - 0x21], r12
mov rdi, r12
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x140024ac9
mov rax, qword [rbx + 0x18]
mov qword [rsi + 0x18], rax
mov qword [rbx + 0x18], r12
cmp qword [rsi + 0x20], rbx
jne 0x140024ac4
mov qword [rsi + 0x20], r12
test rbx, rbx
jne 0x140024b48
mov rbx, qword [0x14003dad8]
test rbx, rbx
je 0x140024b30
mov rax, qword [rbx + 0x18]
mov qword [0x14003dad8], rax
mov qword [rbx + 0x18], r12
mov rax, qword [0x14003dae0]
cmp rax, rbx
cmove rax, r12
mov qword [0x14003dae0], rax
test rbx, rbx
je 0x140024b30
mov eax, dword [rsi + 0x88]
cmp dword [rbx + 8], eax
jne 0x140024b25
mov eax, dword [rbx]
cmp eax, dword [rsi + 0x50]
je 0x140024b15
cmp eax, 3
jne 0x140024b25
mov eax, dword [rbx + 4]
xor eax, dword [rsi + 0x54]
test al, 9
jne 0x140024b25
cmp dword [rsi + 0x30], r12d
jge 0x140024b2b
mov rdi, rbx
mov rbx, r12
test rbx, rbx
jne 0x140024b48
mov byte [rsi + 0x61], r12b
mov rbx, qword [rsi + 0x90]
mov qword [rbp - 0x21], rbx
mov qword [rsi + 0x90], r12
jmp 0x140024b93
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
xor r9d, r9d
mov rdx, rbx
mov r8d, eax
mov rcx, rsi
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
call fcn.140024f58
test rbx, rbx
je 0x140024b8f
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140024b87
mov qword [rbx + 0x10], r12
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, rbx
call fcn.140030104
mov rbx, qword [rbp - 0x21]
lea rcx, [0x14003da70]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
mov rcx, rbx
test rbx, rbx
je 0x140024bbc
mov rax, qword [rcx]
mov rbx, r12
mov qword [rbp - 0x21], rbx
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
test rdi, rdi
je 0x140024bc9
mov rcx, rdi
call fcn.140024774
test rbx, rbx
je 0x140024bde
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
cmp qword [rsi + 0x90], r12
jne 0x140024a2c
cmp dword [r15], 1
jle 0x140024c00
or edx, 0xffffffff
mov rcx, rsi
call fcn.1400246d4
cmp dword [r15], 1
jne 0x140024c44
mov al, byte [0x14003d124]
test al, al
je 0x140024c44
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
lea ebx, [rax + 0x7530]
cmp qword [rsi + 0x90], r12
jne 0x140024a2c
cmp eax, ebx
jae 0x140024c44
mov edx, ebx
mov rcx, rsi
sub edx, eax
call fcn.1400246d4
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
cmp qword [rsi + 0x90], r12
je 0x140024c25
cmp qword [rsi + 0x90], r12
jne 0x140024a2c
cmp dword [r15], 1
jg 0x140024bde
cmp dword [rbp - 0x15], 1
jg 0x140024bde
xor edx, edx
mov rcx, rsi
call fcn.1400247fc
test al, al
je 0x140024bde
xor ecx, ecx
call qword [sym.imp.api_ms_win_shcore_thread_l1_1_0.dll_SHSetThreadRef]
mov rdi, qword [rbp - 1]
mov rbx, qword [rbp - 9]
mov qword [rbp - 0x11], r12
mov dword [rbp - 0x19], 0x7fffffff
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoUninitialize]
test rbx, rbx
je 0x140024ca5
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
test rdi, rdi
je 0x140024cba
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
test r14d, r14d
jns 0x140024daa
mov rcx, qword [rsi + 0x38]
mov dword [rsi + 0x30], r14d
test rcx, rcx
je 0x140024cd6
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x140024ce8
call fcn.140024774
mov qword [rsi + 0x40], r12
lock dec dword [0x14003da60]
lea rcx, [0x14003da70]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
cmp qword [0x14003da58], rsi
lea rcx, [0x14003da58]
je 0x140024d18
mov rcx, qword [rcx]
add rcx, 0x10
cmp qword [rcx], rsi
jne 0x140024d0c
mov rax, qword [rsi + 0x10]
mov qword [rcx], rax
mov rcx, rsi
mov rax, qword [rsi]
mov qword [rsi + 0x10], r12
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
cmp qword [0x14003da58], r12
jne 0x140024d55
mov rcx, qword [0x14003da68]
test rcx, rcx
je 0x140024d55
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [0x14003da68], r12
lea rcx, [0x14003da70]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
jmp 0x140024d86
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140024d7e
mov qword [rbx + 0x10], r12
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x140034e68]
mov rcx, rbx
call fcn.140030104
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x140024daa
mov rax, qword [rbx + 0x18]
mov qword [rsi + 0x18], rax
mov qword [rbx + 0x18], r12
cmp qword [rsi + 0x20], rbx
jne 0x140024da5
mov qword [rsi + 0x20], r12
test rbx, rbx
jne 0x140024d64
mov ecx, dword [rbp - 0x29]
cmp ecx, 0xffffffff
je 0x140024dba
xor edx, edx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret