Function at 0x140035330
Capabilities:
Set thread local storage value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x1401310c8]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, qword [rcx + 0x110]
lea rax, vtable.Win32xx::CWinApp.0
mov qword [rcx], rax
mov rsi, rcx
test rdi, rdi
je 0x140035397
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFlags]
movzx ebx, al
test al, al
je 0x14003538e
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
add ebx, 0xffffffff
jne 0x140035380
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rdi, qword [rsi + 0x118]
test rdi, rdi
je 0x1400353ca
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFlags]
movzx ebx, al
test al, al
je 0x1400353c1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
add ebx, 0xffffffff
jne 0x1400353b3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rax, qword [rsi + 0x68]
mov qword [rsp + 0x20], rax
mov rbx, qword [rax]
mov qword [rsp + 0x50], rbx
cmp rbx, rax
je 0x14003547d
nop dword [rax]
nop dword [rax + rax]
mov rdi, qword [rbx + 0x20]
mov rcx, rdi
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x14003540a
mov rcx, rdi
call qword [sym.imp.USER32.dll_DestroyWindow]
cmp byte [rbx + 0x19], 0
jne 0x14003546b
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x140035443
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x14003543c
nop word [rax + rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140035430
mov qword [rsp + 0x50], rbx
jmp 0x14003546b
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140035463
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x140035463
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140035450
mov rbx, rax
mov qword [rsp + 0x50], rax
mov rax, qword [rsi + 0x68]
mov qword [rsp + 0x20], rax
cmp rbx, rax
jne 0x1400353f0
mov rdi, qword [rsi + 0x80]
mov rbx, qword [rsi + 0x78]
cmp rbx, rdi
je 0x1400354c7
nop dword [rax]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400354be
or eax, 0xffffffff
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1400354be
mov rcx, qword [rbx]
lea edx, [rax + 0x27]
call fcn.140078f0c
mov rcx, qword [rbx + 8]
mov edx, 4
call fcn.140078f0c
add rbx, 0x10
cmp rbx, rdi
jne 0x140035490
mov rax, qword [rsi + 0x78]
mov qword [rsi + 0x80], rax
mov ecx, dword [rsi + 0x100]
cmp ecx, 0xffffffff
je 0x1400354f1
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [rsi + 0x100]
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov r8, qword [rsi + 0x120]
lea rdx, [rsp + 0x28]
mov qword [0x14013ace8], 0
lea rcx, [rsi + 0x120]
mov r9, r8
mov r8, qword [r8]
call fcn.1400383d0
mov rcx, qword [rsi + 0x120]
call fcn.140078bcc
lea rbx, [rsi + 0xc0]
mov eax, dword [rbx + 0x28]
test eax, eax
jle 0x140035548
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock dec dword [rbx + 0x28]
mov eax, dword [rbx + 0x28]
test eax, eax
jg 0x140035534
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rbx, [rsi + 0x90]
mov eax, dword [rbx + 0x28]
test eax, eax
jle 0x140035573
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock dec dword [rbx + 0x28]
mov eax, dword [rbx + 0x28]
test eax, eax
jg 0x14003555f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rsi + 0x78]
call fcn.140038340
mov r8, qword [rsi + 0x68]
lea rdx, [rsp + 0x30]
mov r9, r8
lea rcx, [rsi + 0x68]
mov r8, qword [r8]
call fcn.1400384a0
mov rcx, qword [rsi + 0x68]
call fcn.140078bcc
mov r8, qword [rsi + 0x58]
lea rdx, [rsp + 0x38]
mov r9, r8
lea rcx, [rsi + 0x58]
mov r8, qword [r8]
call fcn.1400383d0
mov rcx, qword [rsi + 0x58]
call fcn.140078bcc
mov r8, qword [rsi + 0x48]
lea rdx, [rsp + 0x40]
mov r9, r8
lea rcx, [rsi + 0x48]
mov r8, qword [r8]
call fcn.1400384a0
mov rcx, qword [rsi + 0x48]
call fcn.140078bcc
mov r8, qword [rsi + 0x38]
lea rdx, [rsp + 0x48]
mov r9, r8
lea rcx, [rsi + 0x38]
mov r8, qword [r8]
call fcn.1400384a0
mov rcx, qword [rsi + 0x38]
call fcn.140078bcc
mov rcx, qword [rsi + 0x18]
lea rax, vtable.Win32xx::CWinThread.0
mov qword [rsi], rax
test rcx, rcx
je 0x14003562e
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi + 0x18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, vtable.Win32xx::CObject.0
mov qword [rsi], rax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400784c0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret