Function at 0x140042890
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rbx, r9
mov rbp, r8
mov edi, edx
mov rsi, rcx
mov rax, qword [0x14022c040]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov eax, dword [0x14023e4d8]
mov ecx, dword [0x14023adf0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140042a9b
mov ecx, dword [0x14023a76c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140042bd9
mov rcx, qword [0x14023e4c8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14023e4d0]
jne 0x140042bd9
add rax, rcx
cmp qword [rax], 0
je 0x140042bd9
mov ecx, dword [0x14023a76c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140042a5b
mov rcx, qword [0x14023e4c8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14023e4d0]
jne 0x140042a5b
add rax, rcx
mov r13, qword [rax]
lea r14, [r13 + 8]
mov rcx, qword [r13 + 8]
test rcx, rcx
je 0x140042a63
mov rax, r14
xor edx, edx
cmp qword [rcx + 0x20], rsi
setb dl
cmovae rax, rcx
mov rcx, qword [rcx + rdx*8]
test rcx, rcx
jne 0x140042968
cmp rax, r14
je 0x140042a63
cmp qword [rax + 0x20], rsi
ja 0x140042a63
mov r15, qword [rax + 0x28]
test r15, r15
je 0x140042d41
mov qword [rsp + 0x38], 0
mov r12, qword [r15]
test r12, r12
je 0x140042d28
mov eax, 1
lock xadd dword [r12], eax
test eax, eax
jle 0x140042d2b
mov qword [rsp + 0x28], rsi
cmp eax, 0x7fffffff
je 0x140042d2e
mov rax, qword [r15]
mov rax, qword [rax + 8]
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
mov rcx, r12
mov edx, edi
mov rsi, rbp
mov r8, rbp
mov r9, rbx
call qword [0x14021e390]
mov ebp, eax
lock dec dword [r12]
je 0x140042d34
test bpl, bpl
jne 0x140042a25
mov rcx, qword [rsp + 0x28]
mov edx, edi
mov r8, rsi
mov r9, rbx
call qword [sym.imp.USER32.dll_DefWindowProcW]
mov qword [rsp + 0x38], rax
cmp edi, 2
je 0x140042c72
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
cmp rcx, qword [0x14022c040]
je 0x140042a4a
call fcn.1401363f0
int3
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor r13d, r13d
jmp 0x140042954
cmp edi, 1
je case.default.0x140042a94
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401363f0
mov rcx, rsi
mov edx, edi
mov r8, rbp
mov r9, rbx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.USER32.dll_DefWindowProcW]
lea rcx, [0x14023e4d8]
call fcn.140133c60
cmp dword [0x14023e4d8], 0xffffffff
jne 0x1400428df
mov qword [0x14023e4d0], 0
lea rcx, [0x14023e4c8]
mov qword [0x14023e4c8], 0xffffffffffffffff
lea rdx, [0x140053d30]
call fcn.140032420
lea rcx, [0x14023e4d8]
call fcn.140133eb0
jmp 0x1400428df
mov dword [rsp + 0x34], edi
mov rax, rsi
mov rsi, rbp
mov qword [rsp + 0x28], rbx
mov r15, qword [rbx]
mov rdi, rax
mov qword [r15 + 8], rax
mov rax, qword [r14]
mov rbp, r14
mov rbx, r14
test rax, rax
jne 0x140042ba8
mov ecx, 0x30
call fcn.140133b54
mov r12, rax
add rax, 0x20
je 0x140042d26
mov qword [rax], rdi
movabs rax, 0xfffffffc00000000
and rax, r15
cmp rax, qword [0x14022e648]
jne 0x140042b51
mov rcx, r15
call fcn.1400037d0
mov qword [r12 + 0x28], r15
xorps xmm0, xmm0
movups xmmword [r12], xmm0
mov qword [r12 + 0x10], rbx
mov qword [rbp], r12
mov rax, qword [r13]
mov rax, qword [rax]
test rax, rax
je 0x140042b7b
mov qword [r13], rax
mov r12, qword [rbp]
mov rcx, qword [r13 + 8]
mov rdx, r12
call fcn.1400d7810
inc qword [r13 + 0x10]
test r15, r15
mov rbx, qword [rsp + 0x28]
mov rbp, rsi
mov rsi, rdi
mov edi, dword [rsp + 0x34]
jne 0x14004299e
jmp 0x140042a6c
mov rbx, rax
cmp qword [rax + 0x20], rdi
ja 0x140042bc9
jae 0x140042d44
mov rax, qword [rbx + 8]
test rax, rax
jne 0x140042ba8
lea rbp, [rbx + 8]
jmp 0x140042b19
mov rax, qword [rbx]
mov rbp, rbx
jmp 0x140042b10
xor r12d, r12d
jmp 0x140042c24
mov ecx, 0x18
call fcn.140133b54
mov r15, rax
add rax, 8
xorps xmm0, xmm0
movups xmmword [r15 + 8], xmm0
mov qword [r15], rax
mov ecx, dword [0x14023a76c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140042bd4
mov rcx, qword [0x14023e4c8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14023e4d0]
jne 0x140042bd4
add rax, rcx
mov r12, qword [rax]
mov ecx, dword [0x14023a76c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
jne 0x140042c40
test r15, r15
je 0x140042c64
call fcn.140012300
mov rcx, qword [0x14023e4c8]
shl rcx, 4
mov qword [rax + rcx], r15
mov ecx, dword [0x14023e4d0]
mov rdx, qword [0x14023e4c8]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
test r12, r12
je 0x14004291d
jmp 0x140042d47
mov qword [r15 + 8], 0
mov rcx, qword [r14]
test rcx, rcx
mov r8, qword [rsp + 0x28]
je 0x140042d31
mov rax, rcx
mov rdi, r14
xor edx, edx
cmp qword [rax + 0x20], r8
setb dl
cmovae rdi, rax
mov rax, qword [rax + rdx*8]
test rax, rax
jne 0x140042c91
cmp rdi, r14
je 0x140042d31
cmp qword [rdi + 0x20], r8
ja 0x140042d31
mov rdx, qword [rdi + 8]
test rdx, rdx
jne 0x140042d19
mov rdx, rdi
mov rax, qword [rdx + 0x10]
cmp qword [rax], rdx
mov rdx, rax
jne 0x140042cc2
lea rsi, [rdi + 0x20]
cmp qword [r13], rdi
jne 0x140042cdc
mov qword [r13], rax
dec qword [r13 + 0x10]
mov rdx, rdi
call fcn.1400d5a20
test rsi, rsi
je 0x140042d26
mov rcx, qword [rdi + 0x28]
movabs rax, 0xfffffffc00000000
and rax, rcx
cmp rax, qword [0x14022e648]
jne 0x140042d0c
call fcn.140003910
mov rcx, rdi
call fcn.140133b2c
jmp 0x140042a2e
mov rax, rdx
mov rdx, qword [rdx]
test rdx, rdx
je 0x140042cce
jmp 0x140042d19
ud2
int3
int3
int3
int3
mov rcx, r12
call fcn.140132010
jmp 0x140042a08
int3
int3
mov rcx, qword [r12 + 8]
call fcn.140053d60
mov rcx, r12
call fcn.140133b2c
jmp 0x14004291d
lea rax, sym.imp.USER32.dll_DefWindowProcW
jmp 0x1401ec5f5
lea rax, sym.imp.USER32.dll_DestroyWindow
jmp 0x1401ec5f5
push rcx
push rdx
push r8
push r9
sub rsp, 0x48
movdqa xmmword [rsp], xmm0
movdqa xmmword [rsp + 0x10], xmm1
movdqa xmmword [rsp + 0x20], xmm2
movdqa xmmword [rsp + 0x30], xmm3
mov rdx, rax
lea rcx, [0x14021e4f8]
call fcn.1401358a8
movdqa xmm0, xmmword [rsp]
movdqa xmm1, xmmword [rsp + 0x10]
movdqa xmm2, xmmword [rsp + 0x20]
movdqa xmm3, xmmword [rsp + 0x30]
add rsp, 0x48
pop r9
pop r8
pop rdx
pop rcx
jmp rax