Function at 0x140019308
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x18], r8
mov byte [rsp + 0x10], dl
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rsi, rcx
mov rdi, r9
mov ecx, dword [0x14003d17c]
mov r12b, dl
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
or ebx, 0xffffffff
mov r14, rax
test rax, rax
jne 0x140019361
mov ebx, dword [0x14003d17c]
lea rdx, [rbp - 0x10]
and dword [rbp - 0x10], eax
lea r14, [rbp - 0x10]
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
inc dword [r14]
mov rdx, qword [0x14003d048]
lea rax, [0x14003d048]
mov r13, qword [rbp + 0x60]
mov r15d, 0x1df
lea r9, [0x140035650]
cmp rdx, rax
je 0x1400193e6
test byte [rdx + 0x1c], 1
je 0x1400193e6
mov eax, dword [r14]
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400193a6
mov eax, ecx
mov ecx, r15d
sub rcx, rax
jmp 0x1400193a8
xor ecx, ecx
mov qword [rsp + 0x40], r13
lea r8, str.TRUE
mov qword [rsp + 0x38], rdi
lea rax, str.FALSE
test r12b, r12b
cmovne rax, r8
add r9, rcx
mov rcx, qword [rbp + 0x50]
mov qword [rsp + 0x30], rcx
mov rcx, qword [rdx + 0x10]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
call fcn.140014e88
and dword [rbp - 0x20], 0
lea rdx, [rbp - 0x18]
and qword [rbp - 0x18], 0
lea rax, [rsi + 0x80]
mov qword [rsp + 0x38], rdx
lea rcx, [rsi + 0x88]
lea rdx, [rbp - 0x20]
xor r9d, r9d
mov qword [rsp + 0x30], rdx
mov r8, r13
mov qword [rsp + 0x28], rax
mov edx, edi
mov qword [rsp + 0x20], rcx
xor r12b, r12b
mov rcx, qword [rbp + 0x50]
call qword [sym.imp.deviceassociation.dll_DafCreateAssociationContextFromOobBlob]
mov edi, eax
cmp eax, 0x640018
jne 0x14001943e
mov byte [rsi + 0x10d], 1
test eax, eax
js 0x140019645
mov r10, qword [0x14003d048]
lea rax, [0x14003d048]
cmp r10, rax
je 0x1400194a7
test byte [r10 + 0x1c], 4
je 0x1400194a7
mov eax, dword [r14]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x14001947a
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x14001947c
xor ecx, ecx
mov rax, qword [rsi + 0x88]
lea r9, [0x140035650]
add r9, rcx
mov qword [rsp + 0x20], rax
mov rcx, qword [r10 + 0x10]
lea r8, [0x1400367b8]
mov edx, 0x56
call fcn.140004a7c
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
mov qword [rsi + 0xe0], rax
test rax, rax
jne 0x1400194e5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
jmp 0x1400194e7
xor edi, edi
test edi, edi
js 0x140019645
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
mov qword [rsi + 0xd8], rax
test rax, rax
jne 0x14001952d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
jmp 0x14001952f
xor edi, edi
test edi, edi
js 0x140019645
mov r8, qword [rbp - 0x18]
mov rcx, rsi
mov edx, dword [rbp - 0x20]
call fcn.1400159b4
mov edi, eax
test eax, eax
jns 0x140019645
mov rcx, rsi
call fcn.140016fec
xor edx, edx
test al, al
jne 0x14001961d
mov r10, qword [0x14003d048]
lea rax, [0x14003d048]
cmp r10, rax
je 0x1400195b8
test byte [r10 + 0x1c], 4
je 0x1400195b8
mov eax, dword [r14]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x140019596
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x140019599
mov rcx, rdx
lea r9, [0x140035650]
mov edx, 0x57
add r9, rcx
lea r8, [0x1400367b8]
mov rcx, qword [r10 + 0x10]
call fcn.1400012b0
mov rcx, rsi
call fcn.140016110
mov edi, eax
mov r10, qword [0x14003d048]
lea rax, [0x14003d048]
cmp r10, rax
je 0x140019645
test byte [r10 + 0x1c], 4
je 0x140019645
mov eax, dword [r14]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x1400195f6
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x1400195f8
xor ecx, ecx
lea r9, [0x140035650]
mov dword [rsp + 0x20], edi
add r9, rcx
lea r8, [0x1400367b8]
mov rcx, qword [r10 + 0x10]
mov edx, 0x58
call fcn.140001304
jmp 0x140019645
cmp byte [rsi + 0x108], dl
je 0x140019640
cmp byte [rsi + 0x10b], dl
je 0x140019640
cmp byte [rsi + 0x10a], dl
je 0x140019640
mov r12b, dl
cmp byte [rsi + 0x109], dl
jne 0x140019643
mov r12b, 1
mov edi, edx
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
test byte [0x14003d7c0], 4
mov qword [rbp - 8], rax
mov dword [rbp + 0x40], 1
je 0x14001968f
mov rcx, qword [rsi + 0x90]
lea rdx, [0x140035af8]
mov r9, qword [rsi + 0x88]
test rcx, rcx
mov r8, r13
cmovne rdx, rcx
mov qword [rsp + 0x20], rdx
lea rdx, [0x140035908]
call fcn.14001a6fc
test edi, edi
js 0x1400196cc
cmp byte [rbp + 0x48], 0
je 0x1400196c8
and qword [0x14003d9b8], 0
xor edx, edx
xor ecx, ecx
mov byte [0x14003d9c0], 1
mov r8d, 0x280003
call qword [sym.imp.api_ms_win_mm_playsound_l1_1_0.dll_PlaySoundW]
lea rdx, [rbp + 0x40]
mov rcx, rsi
call fcn.1400172e8
mov edi, eax
jmp 0x1400196cc
and dword [rbp + 0x40], 0
test byte [0x14003d7c0], 8
lea r13, [0x140035af8]
je 0x1400196fd
mov rax, qword [rsi + 0xb0]
lea rdx, [0x1400354a8]
mov r8d, dword [rbp + 0x40]
test rax, rax
mov r9, r13
cmovne r9, rax
call fcn.14001a670
test edi, edi
js 0x1400199e6
cmp dword [rbp + 0x40], 0
jne 0x1400197d1
mov byte [rsi + 0x10f], 1
test r12b, r12b
je 0x1400197d1
mov r10, qword [0x14003d048]
lea r12, [0x14003d048]
cmp r10, r12
je 0x140019774
test byte [r10 + 0x1c], 4
je 0x140019774
mov eax, dword [r14]
inc eax
lea ecx, [rax + rax*4]
cmp ecx, 0x1e1
ja 0x140019753
mov eax, ecx
mov rcx, r15
sub rcx, rax
jmp 0x140019755
xor ecx, ecx
lea r9, [0x140035650]
mov edx, 0x59
add r9, rcx
lea r8, [0x1400367b8]
mov rcx, qword [r10 + 0x10]
call fcn.1400012b0
mov rcx, rsi
call fcn.140016110
mov edi, eax
mov rcx, qword [0x14003d048]
cmp rcx, r12
je 0x1400197df
test byte [rcx + 0x1c], 4
je 0x1400197df
mov eax, dword [r14]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x1400197aa
mov eax, edx
mov rdx, r15
sub rdx, rax
jmp 0x1400197ac
xor edx, edx
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, rdx
mov dword [rsp + 0x20], edi
mov edx, 0x5a
lea r8, [0x1400367b8]
call fcn.140001304
jmp 0x1400197d8
lea r12, [0x14003d048]
mov rcx, qword [0x14003d048]
test edi, edi
js 0x1400199ed
cmp byte [rsi + 0x104], 0
je 0x140019982
mov dl, byte [rsi + 0x10f]
test dl, dl
je 0x140019930
mov rax, qword [0x140035ae0]
cmp rax, qword [rsi + 0x28]
jne 0x14001981c
mov rax, qword [0x140035ae8]
cmp rax, qword [rsi + 0x30]
je 0x140019836
mov rax, qword [0x140036550]
cmp rax, qword [rsi + 0x28]
jne 0x14001989e
mov rax, qword [0x140036558]
cmp rax, qword [rsi + 0x30]
jne 0x14001989e
cmp rcx, r12
je 0x14001987c
test byte [rcx + 0x1c], 4
je 0x14001987c
mov eax, dword [r14]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x14001985b
mov eax, edx
mov rdx, r15
sub rdx, rax
jmp 0x14001985d
xor edx, edx
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, rdx
lea r8, [0x1400367b8]
mov edx, 0x5b
call fcn.1400012b0
mov r9, qword [rsi + 0x18]
mov rcx, rsi
mov r8, qword [rsi + 0x20]
mov rdx, qword [rbp + 0x50]
call fcn.140019ac8
mov rcx, qword [0x14003d048]
mov edi, eax
jmp 0x140019982
test dl, dl
je 0x140019930
mov rax, qword [0x140035ab0]
cmp rax, qword [rsi + 0x28]
jne 0x140019930
mov rax, qword [0x140035ab8]
cmp rax, qword [rsi + 0x30]
jne 0x140019930
mov rcx, rsi
call fcn.140018458
mov edi, eax
test eax, eax
js 0x1400199e6
mov rcx, qword [0x14003d048]
cmp rcx, r12
je 0x140019926
test byte [rcx + 0x1c], 4
je 0x140019926
mov eax, dword [r14]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x1400198fe
mov eax, edx
mov rdx, r15
sub rdx, rax
jmp 0x140019900
xor edx, edx
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, rdx
lea r8, [0x1400367b8]
mov edx, 0x5c
call fcn.1400012b0
mov rcx, qword [0x14003d048]
mov edi, 0x80640010
jmp 0x1400199ed
cmp rcx, r12
je 0x14001997d
test byte [rcx + 0x1c], 4
je 0x14001997d
mov eax, dword [r14]
inc eax
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x140019955
mov eax, edx
mov rdx, r15
sub rdx, rax
jmp 0x140019957
xor edx, edx
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, rdx
lea r8, [0x1400367b8]
mov edx, 0x5d
call fcn.1400012b0
mov rcx, qword [0x14003d048]
mov edi, 0x80640010
test edi, edi
js 0x1400199ed
mov rax, qword [0x140035ae0]
cmp rax, qword [rsi + 0x28]
jne 0x1400199a0
mov rax, qword [0x140035ae8]
cmp rax, qword [rsi + 0x30]
je 0x1400199ba
mov rax, qword [0x140036550]
cmp rax, qword [rsi + 0x28]
jne 0x1400199ed
mov rax, qword [0x140036558]
cmp rax, qword [rsi + 0x30]
jne 0x1400199ed
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount64]
mov rcx, qword [rbp - 8]
cmp rax, rcx
jb 0x1400199ce
sub rax, rcx
jmp 0x1400199d4
sub rax, rcx
dec rax
mov ecx, 0x1f4
cmp rax, rcx
jae 0x1400199e6
sub ecx, eax
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
mov rcx, qword [0x14003d048]
mov rax, qword [rbp - 0x18]
test rax, rax
je 0x140019a06
mov rcx, rax
call qword [sym.imp.deviceassociation.dll_DafMemFree]
mov rcx, qword [0x14003d048]
test edi, edi
jns 0x140019a3a
test byte [0x14003d7c0], 8
je 0x140019a3a
mov rax, qword [rsi + 0xb0]
lea rdx, [0x140035848]
test rax, rax
mov r8d, edi
cmovne r13, rax
mov r9, r13
call fcn.14001a670
mov rcx, qword [0x14003d048]
lea rax, [0x14003d048]
cmp rcx, rax
je 0x140019a8c
test byte [rcx + 0x1c], 1
je 0x140019a8c
mov eax, dword [r14]
lea edx, [rax + rax*4]
cmp edx, 0x1e1
ja 0x140019a61
mov eax, edx
sub r15, rax
jmp 0x140019a64
xor r15d, r15d
mov rcx, qword [rcx + 0x10]
lea r9, [0x140035650]
add r9, r15
mov dword [rsp + 0x28], edi
mov edx, 0x5e
mov qword [rsp + 0x20], rsi
lea r8, [0x1400367b8]
call fcn.140001730
or eax, 0xffffffff
add dword [r14], eax
cmp ebx, eax
je 0x140019aad
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
test rax, rax
je 0x140019aad
xor edx, edx
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
mov eax, edi
mov rbx, qword [rsp + 0xc8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret