Function at 0x1400408c0
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 [0x1402db040]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov eax, dword [0x14032e668]
mov ecx, dword [0x1402ea130]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400409ec
mov ecx, dword [0x1402e9848]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140040a3f
mov rcx, qword [0x14032e658]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14032e660]
jne 0x140040a3f
add rax, rcx
cmp qword [rax], 0
je 0x140040a3f
mov ecx, dword [0x1402e9848]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1400409e7
mov rcx, qword [0x14032e658]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14032e660]
jne 0x1400409e7
add rax, rcx
mov r13, qword [rax]
lea r14, [r13 + 8]
mov rcx, qword [r13 + 8]
test rcx, rcx
je 0x1400409af
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 0x140040990
cmp rax, r14
jne 0x140040baf
cmp edi, 1
je case.default.0x1400409e0
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401ac870
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]
xor r13d, r13d
jmp 0x140040980
lea rcx, [0x14032e668]
call fcn.1401aa170
cmp dword [0x14032e668], 0xffffffff
jne 0x14004090f
mov qword [0x14032e660], 0
lea rcx, [0x14032e658]
mov qword [0x14032e658], 0xffffffffffffffff
lea rdx, [0x1400493c0]
call fcn.140028120
lea rcx, [0x14032e668]
call fcn.1401aa094
jmp 0x14004090f
mov ecx, Ordinal_26
call fcn.1401a9d88
mov r15, rax
add rax, 8
xorps xmm0, xmm0
movups xmmword [r15 + 8], xmm0
mov qword [r15], rax
mov ecx, dword [0x1402e9848]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140040ad8
mov rcx, qword [0x14032e658]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14032e660]
jne 0x140040ad8
add rax, rcx
mov r12, qword [rax]
mov ecx, dword [0x1402e9848]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
jne 0x140040aa6
test r15, r15
je 0x140040aca
call fcn.14000ff40
mov rcx, qword [0x14032e658]
shl rcx, 4
mov qword [rax + rcx], r15
mov ecx, dword [0x14032e660]
mov rdx, qword [0x14032e658]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
test r12, r12
je 0x14004094d
jmp 0x140040d45
xor r12d, r12d
jmp 0x140040a8a
mov rax, qword [rbx]
mov rbp, rbx
jmp 0x140040b28
mov rbx, rax
mov rax, qword [rax + 0x20]
cmp rdi, rax
jb 0x140040add
jbe 0x140040d42
mov rax, qword [rbx + 8]
test rax, rax
jne 0x140040ae5
lea rbp, [rbx + 8]
jmp 0x140040b2d
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 0x140040ae5
mov ecx, 0x30
call fcn.1401a9d88
mov r12, rax
mov qword [rax + 0x20], rdi
movabs rax, 0xfffffffc00000000
and rax, r15
cmp rax, qword [0x1402dd748]
jne 0x140040b5c
mov rcx, r15
call fcn.140004d30
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 0x140040b86
mov qword [r13], rax
mov r12, qword [rbp]
mov rcx, qword [r13 + 8]
mov rdx, r12
call fcn.14014bcc0
inc qword [r13 + 0x10]
test r15, r15
mov rbx, qword [rsp + 0x28]
mov rbp, rsi
mov rsi, rdi
mov edi, dword [rsp + 0x34]
jne 0x140040bc6
jmp 0x1400409b8
cmp rsi, qword [rax + 0x20]
jb 0x1400409af
mov r15, qword [rax + 0x28]
test r15, r15
je 0x140040d3f
mov qword [rsp + 0x38], 0
mov r12, qword [r15]
test r12, r12
je 0x140040d26
mov eax, 1
lock xadd dword [r12], eax
test eax, eax
jle 0x140040d29
mov qword [rsp + 0x28], rsi
cmp eax, 0x7fffffff
je 0x140040d2c
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 [0x1402cbd20]
mov ebp, eax
lock dec dword [r12]
je 0x140040d32
test bpl, bpl
jne 0x140040c4d
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 0x140040c7f
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
cmp rcx, qword [0x1402db040]
je 0x140040c6e
call fcn.1401ac870
int3
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [r15 + 8], 0
mov rcx, qword [r14]
test rcx, rcx
mov r8, qword [rsp + 0x28]
je 0x140040d2f
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 0x140040c9e
cmp rdi, r14
je 0x140040d2f
cmp r8, qword [rdi + 0x20]
jb 0x140040d2f
mov rdx, qword [rdi + 8]
test rdx, rdx
jne 0x140040d19
mov rdx, rdi
mov rax, qword [rdx + 0x10]
cmp rdx, qword [rax]
mov rdx, rax
jne 0x140040ccb
cmp qword [r13], rdi
jne 0x140040ce1
mov qword [r13], rax
dec qword [r13 + 0x10]
mov rdx, rdi
call fcn.1401489e0
mov rcx, qword [rdi + 0x28]
movabs rax, 0xfffffffc00000000
and rax, rcx
cmp rax, qword [0x1402dd748]
jne 0x140040d0c
call fcn.140004e70
mov rcx, rdi
call fcn.1401a9dc4
jmp 0x140040c52
mov rax, rdx
mov rdx, qword [rdx]
test rdx, rdx
je 0x140040cd7
jmp 0x140040d19
int3
int3
int3
int3
mov rcx, r12
call fcn.1401a8230
jmp 0x140040c30
int3
int3
mov rcx, qword [r12 + 8]
call fcn.1400493f0
mov rcx, r12
call fcn.1401a9dc4
jmp 0x14004094d
lea rax, sym.imp.USER32.dll_DefWindowProcW
jmp 0x14028b1eb
lea rax, sym.imp.USER32.dll_DestroyWindow
jmp 0x14028b1eb
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, [0x1402cbeb8]
call fcn.1401abbb4
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