Function at 0x180064580
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x20], r9
mov dword [r11 + 0x18], r8d
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push r13
sub rsp, 0x2e0
mov r13, r9
mov rax, rcx
imul r9d, r8d, 0x776
mov dword [rsp + 0x28], r9d
cmp r8d, r9d
ja 0x180064b77
mov qword [r11 - 0x10], rbx
mov qword [r11 - 0x18], rbp
mov qword [r11 - 0x20], rsi
mov qword [r11 - 0x28], rdi
mov qword [r11 - 0x30], r12
mov r12d, dword [rsp + 0x2c]
mov qword [r11 - 0x38], r14
mov r14, qword [rsp + 0x38]
imul r10d, r8d, 0xbf
mov qword [r11 - 0x40], r15
xor edi, edi
mov r15, qword [rsp + 0x48]
lea r11, [0x180000000]
mov dword [rsp + 0x24], r10d
nop word [rax + rax]
cmp r8d, 0x26d16
ja 0x180064ab5
je 0x1800649c8
cmp r8d, 0xc9
je 0x1800649bb
cmp r8d, 0x96c0
je 0x18006485a
cmp r8d, 0xcfc0
je 0x18006484d
cmp r8d, 0x19e6b
jne 0x180064b1c
mov rax, qword [r13]
mov rdx, qword [rax + 0x18]
test rdx, rdx
je 0x180064676
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x180064676
mov qword [rdx + 0x10], rcx
mov rax, qword [r13]
mov rcx, qword [rax + 0x10]
mov rax, qword [rax + 0x18]
mov qword [rcx + 0x18], rax
jmp 0x180064b14
movzx r12d, byte [rsp + 0x20]
mov ebp, 0xa0
mov dword [rsp + 0x30], ebp
lea r15d, [rbp - 0x5b]
nop dword [rax]
mov eax, ebp
sub eax, 0x9e
je 0x1800647de
sub eax, 1
je 0x1800646c9
cmp eax, 1
jne 0x180064820
movzx r12d, al
mov byte [rsp + 0x20], al
xor eax, eax
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x90], eax
jmp 0x180064820
mov rax, qword [r13]
cmp qword [rax + 0x18], 0
je 0x180064820
mov esi, 0xa2
mov dword [rsp + 0x40], esi
lea r12d, [rsi - 0x2a]
nop word [rax + rax]
mov eax, esi
sub eax, 0xa1
je 0x1800647b4
cmp eax, 1
jne 0x1800647c0
mov ebx, 5
lea edi, [rax + 5]
nop
cmp ebx, 5
ja case.default.0x180064726
mov eax, ebx
mov ecx, dword [r11 + rax*4 + 0x64b84]
add rcx, r11
jmp rcx
mov word [rsp + 0x5f], r15w
mov word [rsp + 0x60], r12w
mov dword [rsp + 0x61], 0x702520
jmp case.default.0x180064726
mov dword [rsp + 0x50], 0x476f43
mov dword [rsp + 0x53], 0x537465
jmp case.default.0x180064726
mov ecx, 0xa
mov word [rsp + 0x64], cx
jmp case.default.0x180064726
mov dword [rsp + 0x56], 0x614d6474
jmp case.default.0x180064726
mov ecx, 0x6c61
mov dword [rsp + 0x5a], 0x687372
mov word [rsp + 0x5d], cx
jmp case.default.0x180064726
mov r8, qword [sym.imp.ole32.dll_CoGetStdMarshalEx]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0xa0]
call fcn.180001130
lea r11, [0x180000000]
dec ebx
sub rdi, 1
jne 0x180064710
mov esi, dword [rsp + 0x40]
mov r13, qword [rsp + 0x308]
jmp 0x1800647c0
mov rax, qword [r13]
mov rcx, qword [rax + 0x18]
mov qword [rcx + 0x10], rdi
dec esi
mov dword [rsp + 0x40], esi
cmp esi, 0xa0
ja 0x1800646f0
mov ebp, dword [rsp + 0x30]
movzx r12d, byte [rsp + 0x20]
jmp 0x180064820
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidA]
test eax, eax
jne 0x1800647ff
xor r12b, r12b
mov byte [rsp + 0x20], r12b
jmp 0x18006480f
test r12b, r12b
je 0x18006480f
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rax, qword [r13]
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x180064820
mov qword [rcx + 0x18], rdi
dec ebp
lea r11, [0x180000000]
mov dword [rsp + 0x30], ebp
cmp ebp, 0x9d
ja 0x180064690
mov r14, qword [rsp + 0x38]
mov r15, qword [rsp + 0x48]
mov r12d, dword [rsp + 0x2c]
jmp 0x180064b02
mov qword [rsp + 0x80], rdi
jmp 0x180064b1c
mov rax, qword [r13]
mov dword [rsp + 0x30], edi
cmp dword [rax + 0x1d4], 0
jle 0x180064b0f
mov r9, rdi
mov r13, qword [rsp + 0x78]
mov r8d, 0xa8
mov r10, qword [rsp + 0x310]
nop word [rax + rax]
mov eax, r8d
sub eax, 0xa8
je 0x1800649ab
sub eax, 0x3a
je 0x180064996
sub eax, 0x3a
je 0x18006497b
sub eax, 0x3a
je 0x18006492e
cmp eax, 0x3a
jne 0x1800648e3
movsx edx, byte [r15]
movsx ecx, byte [r15 - 1]
mov r12d, edx
inc ecx
lea eax, [rdx + rdx*2]
add ecx, eax
sar ecx, 2
mov byte [r14], cl
mov byte [r14 + 1], dl
add r14, 2
mov rdx, qword [rsp + 0x2f8]
add r8d, 0x3a
cmp r8d, 0x1ca
jb 0x180064890
mov r10d, dword [rsp + 0x30]
add r9, 8
mov r13, qword [rsp + 0x308]
inc r10d
mov dword [rsp + 0x2c], r12d
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x38], r14
mov rax, qword [r13]
mov dword [rsp + 0x30], r10d
cmp r10d, dword [rax + 0x1d4]
jl 0x180064872
jmp 0x180064b02
mov edx, dword [rdx + 0x28]
sub edx, 2
je 0x1800648db
nop word [rax + rax]
movsx eax, byte [r15]
inc r15
movsx ecx, byte [r15 - 2]
lea r12d, [rax + rax*2]
inc ecx
add ecx, r12d
sar ecx, 2
mov byte [r14], cl
lea ecx, [r12 + 2]
movsx eax, byte [r15]
add ecx, eax
sar ecx, 2
mov byte [r14 + 1], cl
add r14, 2
add edx, 0xffffffff
jne 0x180064940
jmp 0x1800648db
movsx edx, byte [r15]
lea ecx, [r12 + r12*2]
add edx, 2
add edx, ecx
sar edx, 2
mov byte [r14], dl
inc r14
jmp 0x1800648db
movsx eax, byte [r15]
inc r15
mov byte [r14], al
mov r12d, eax
inc r14
jmp 0x1800648e3
mov rax, qword [r10]
mov r14, qword [r9 + r13]
mov r15, qword [r9 + rax]
jmp 0x1800648e3
mov rax, qword [rax]
mov qword [rsp + 0x78], rax
jmp 0x180064b14
mov rax, qword [r13]
mov rcx, qword [rax + 0x20]
test rcx, rcx
je 0x180064b14
cmp qword [rcx + 0x28], rax
jne 0x180064a9d
cmp qword [rax + 0x10], 0
je 0x180064a99
mov r12d, dword [rsp + 0x68]
mov ebx, 0xf3
movzx r15d, byte [rsp + 0x21]
nop
mov eax, ebx
sub eax, 0xf3
je 0x180064a5a
sub eax, 0x3a
je 0x180064a25
cmp eax, 0x3a
jne 0x180064a66
mov rax, qword [r13]
mov rcx, qword [rax + 0x20]
mov rax, qword [rax + 0x10]
mov qword [rcx + 0x28], rax
jmp 0x180064a66
cmp r12d, 0xffffffff
movzx eax, r15b
mov ecx, edi
cmovne ecx, eax
movzx r15d, cl
test cl, cl
je 0x180064a66
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdx, rax
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_TlsFree]
jmp 0x180064a66
mov r15b, 1
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov r12d, eax
add ebx, 0x3a
cmp ebx, 0x1a1
jb 0x180064a00
mov r8d, dword [rsp + 0x300]
mov r9d, dword [rsp + 0x28]
mov r10d, dword [rsp + 0x24]
mov byte [rsp + 0x21], r15b
mov r15, qword [rsp + 0x48]
mov dword [rsp + 0x68], r12d
mov r12d, dword [rsp + 0x2c]
jmp 0x180064a9d
mov qword [rcx + 0x28], rdi
mov rax, qword [r13]
mov rcx, qword [rax + 0x20]
cmp qword [rcx + 0x30], rax
jne 0x180064b14
mov rax, qword [rax + 0x18]
mov qword [rcx + 0x30], rax
jmp 0x180064b14
cmp r8d, 0x33bc1
je 0x180064af5
cmp r8d, 0x40a6c
je 0x180064aef
cmp r8d, 0x4d917
je 0x180064adf
cmp r8d, 0x5a7c2
jne 0x180064b1c
mov qword [r13], rdi
jmp 0x180064b1c
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ole32.dll_OleIsCurrentClipboard]
jmp 0x180064b02
mov rcx, qword [r13]
jmp 0x180064afd
mov rcx, qword [r13]
mov rcx, qword [rcx + 8]
call fcn.18007c144
mov r8d, dword [rsp + 0x300]
mov r9d, dword [rsp + 0x28]
mov r10d, dword [rsp + 0x24]
mov rax, qword [rsp + 0x2f0]
mov rdx, qword [rsp + 0x2f8]
lea r11, [0x180000000]
add r8d, r10d
mov dword [rsp + 0x300], r8d
cmp r8d, r9d
jbe 0x180064600
mov r15, qword [rsp + 0x2a8]
mov r14, qword [rsp + 0x2b0]
mov r12, qword [rsp + 0x2b8]
mov rdi, qword [rsp + 0x2c0]
mov rsi, qword [rsp + 0x2c8]
mov rbp, qword [rsp + 0x2d0]
mov rbx, qword [rsp + 0x2d8]
add rsp, 0x2e0
pop r13
ret