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

Disassembly:
push rbx
push rsi
push rdi
push r13
mov eax, 0x10158
call fcn.180020aa0
sub rsp, rax
mov rax, qword [0x18002d000]
xor rax, rsp
mov qword [rsp + 0x10140], rax
mov qword [rsp + 0xe8], rcx
mov ecx, dword [0x18002dbb0]
xor ebx, ebx
mov r13d, 1
mov dword [rsp + 0x98], edx
mov qword [rsp + 0xa0], rbx
mov edi, ebx
mov qword [rsp + 0x100], 0xf0000
mov dword [rsp + 0x10c], 0x10000
mov dword [rsp + 0x108], r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
jne 0x1800182fe
mov qword [rsp + 0x30], rbx
lea rcx, str..dcrypt
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1800182ef
mov eax, 0x591
jmp 0x18001834f
mov ecx, dword [0x18002dbb0]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0xa8]
lea r8, [rsp + 0x100]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x140]
mov r9d, 0x10
mov edx, 0x22021c
mov rcx, rsi
mov dword [rsp + 0x28], 0x10000
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x18001834d
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x18001834f
mov eax, ebx
test eax, eax
mov r9d, ebx
setne r9b
test r9d, r9d
je 0x18001837d
lea r8, str.Error_searching_start__d_n
lea rcx, str.misc.c
mov edx, 0x271
call sym.dcapi.dll_log_print
mov eax, r13d
jmp 0x180018994
mov r10d, dword [str._SM_]
mov qword [rsp + 0x10188], rbp
lea rdx, [rsp + 0x140]
mov qword [rsp + 0x10190], r12
mov r9d, ebx
nop
cmp dword [rdx], r10d
mov r8d, dword [rdx]
lea rcx, str._DMI_
cmove edi, r13d
cmp r8d, dword [rcx]
jne 0x1800183c8
movzx r8d, byte [rdx + 4]
add rcx, 4
cmp r8b, byte [rcx]
jne 0x1800183c8
mov eax, ebx
jmp 0x1800183cd
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x1800183d5
test edi, edi
jne 0x180018406
add r9d, 0x10
add rdx, 0x10
cmp r9d, 0x10000
jl 0x1800183a0
lea r8, str.Not_Found_Information...
lea rcx, str.misc.c
mov edx, 0x28b
call sym.dcapi.dll_log_print
mov eax, r13d
jmp 0x180018984
movzx eax, byte [rdx + 0xa]
movzx ebp, byte [rdx + 0xb]
xor dil, dil
shl eax, 0x10
shl ebp, 0x18
xor r8b, r8b
add ebp, eax
movzx eax, byte [rdx + 9]
shl eax, 8
add ebp, eax
movzx eax, byte [rdx + 8]
add ebp, eax
movzx eax, byte [rdx + 7]
shl ax, 8
movzx esi, ax
movzx eax, byte [rdx + 6]
or esi, eax
movzx eax, byte [rdx + 0xd]
shl ax, 8
movzx r12d, ax
movzx eax, byte [rdx + 0xc]
or r12d, eax
lea rax, [rdx + 1]
mov edx, 5
xor cl, cl
nop word [rax + rax]
add dil, byte [rax - 1]
add cl, byte [rax]
add r8b, byte [rax + 1]
add rax, 3
dec rdx
jne 0x180018460
add cl, r8b
add dil, cl
jne 0x1800183e6
mov ecx, esi
call qword [sym.imp.msvcrt.dll_malloc]
mov rdi, rax
mov qword [rsp + 0x90], rax
test rax, rax
jne 0x1800184b7
lea r8, str.Error_allocating_memory_for_structure_table...
lea rcx, str.misc.c
mov edx, 0x293
call sym.dcapi.dll_log_print
mov eax, r13d
jmp 0x180018984
mov eax, ebp
lea rdx, [rsp + 0xf0]
mov r9, rdi
mov r8d, 0x10
mov ecx, 0x22021c
mov dword [rsp + 0xf8], r13d
mov qword [rsp + 0xf0], rax
mov dword [rsp + 0xfc], esi
mov dword [rsp + 0x20], esi
call sym.dcapi.dll_dc_device_control
mov r9d, ebx
test eax, eax
setne r9b
test r9d, r9d
je 0x180018526
lea r8, str.Error_searching_sstart__d_n
lea rcx, str.misc.c
mov edx, 0x2a7
call sym.dcapi.dll_log_print
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
mov eax, r13d
jmp 0x180018984
mov r13, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x90]
mov qword [rsp + 0x10198], r14
mov r14, qword [rsp + 0x90]
mov qword [rsp + 0x10150], r15
mov r15, rdi
mov qword [rsp + 0xb0], rdi
test r12d, r12d
je 0x18001892f
mov rax, qword [rsp + 0x90]
mov edx, r12d
mov r12, qword [rsp + 0x90]
mov qword [rsp + 0xe0], rsi
mov esi, dword [rsp + 0x98]
mov qword [rsp + 0xa8], rdx
mov qword [rsp + 0xd8], r12
mov qword [rsp + 0xc8], r13
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xc0], r14
nop dword [rax]
movzx ecx, byte [r15]
dec ecx
je 0x1800186cc
dec ecx
jne 0x1800188d0
test esi, esi
jne 0x1800188d0
movzx edx, byte [r15 + 4]
mov rcx, r15
call fcn.180017570
mov r11, rax
mov qword [rsp + 0xd0], rax
test rax, rax
je 0x180018625
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r11
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x180018625
or rcx, 0xffffffffffffffff
mov rdi, r11
repne scasb al, byte [rdi]
not rcx
dec rcx
add ebx, ecx
mov qword [rsp + 0xa0], rbx
movzx edx, byte [r15 + 5]
mov rcx, r15
call fcn.180017570
mov r14, rax
mov qword [rsp + 0xc0], rax
test rax, rax
je 0x18001866e
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r14
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x18001866e
or rcx, 0xffffffffffffffff
mov rdi, r14
repne scasb al, byte [rdi]
not rcx
dec rcx
add ebx, ecx
mov qword [rsp + 0xa0], rbx
movzx edx, byte [r15 + 7]
mov rcx, r15
call fcn.180017570
mov r12, rax
mov qword [rsp + 0xd8], rax
test rax, rax
je 0x1800188c8
mov rdx, qword [rsp + 0xa8]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x1800188d0
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
add ebx, ecx
mov qword [rsp + 0xa0], rbx
jmp 0x1800188d0
cmp dword [rsp + 0x98], 0
jne 0x1800187b5
movzx edx, byte [r15 + 4]
mov rcx, r15
call fcn.180017570
mov rdx, rax
mov qword [rsp + 0xc8], rax
test rax, rax
je 0x180018723
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x180018723
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
add ebx, ecx
mov qword [rsp + 0xa0], rbx
movzx edx, byte [r15 + 5]
mov rcx, r15
call fcn.180017570
mov rdx, rax
mov qword [rsp + 0xb8], rax
test rax, rax
je 0x18001876c
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x18001876c
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
add ebx, ecx
mov qword [rsp + 0xa0], rbx
movzx edx, byte [r15 + 7]
mov rcx, r15
call fcn.180017570
mov rdx, rax
mov qword [rsp + 0xe0], rax
test rax, rax
je 0x1800187b5
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x1800187b5
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
add ebx, ecx
mov qword [rsp + 0xa0], rbx
mov r8, qword [rsp + 0xb0]
xor eax, eax
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x118], rax
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x128], rax
mov dword [rsp + 0x130], eax
mov byte [rsp + 0x134], al
movzx eax, byte [r15 + 0x17]
movzx ecx, byte [r15 + 0x16]
movzx edx, byte [r15 + 0x15]
movzx edi, byte [r15 + 0x14]
movzx r10d, byte [r15 + 0x13]
movzx r11d, byte [r15 + 0x12]
movzx ebx, byte [r15 + 0x11]
movzx esi, byte [r15 + 0x10]
movzx ebp, byte [r15 + 0xe]
movzx r12d, byte [r15 + 0xf]
movzx r13d, byte [r15 + 0xc]
movzx r14d, byte [r15 + 0xd]
movzx r15d, byte [r15 + 8]
movzx r9d, byte [r8 + 0xa]
movzx r8d, byte [r8 + 0xb]
mov dword [rsp + 0x88], eax
mov dword [rsp + 0x80], ecx
mov dword [rsp + 0x78], edx
mov dword [rsp + 0x70], edi
mov dword [rsp + 0x68], r10d
mov dword [rsp + 0x60], r11d
mov dword [rsp + 0x58], ebx
mov dword [rsp + 0x50], esi
mov dword [rsp + 0x48], ebp
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r15d
mov r15, qword [rsp + 0xb0]
lea rdx, str._02X_02X_02X_02X__02X_02X__02X_02X__02X_02X__02X_02X_02X_02X_02X_02X
movzx eax, byte [r15 + 9]
lea rcx, [rsp + 0x110]
mov dword [rsp + 0x20], eax
call qword [sym.imp.msvcrt.dll_sprintf]
mov rbx, qword [rsp + 0xa0]
mov r12, qword [rsp + 0xd8]
mov r14, qword [rsp + 0xc0]
mov esi, dword [rsp + 0x98]
add ebx, 0x24
mov qword [rsp + 0xa0], rbx
mov rdx, qword [rsp + 0xa8]
movzx eax, byte [r15 + 1]
add rax, r15
cmp byte [rax], 0
jne 0x1800188e3
cmp byte [rax + 1], 0
je 0x1800188e8
inc rax
jmp 0x1800188d8
lea r15, [rax + 2]
dec rdx
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xa8], rdx
jne 0x1800185c0
mov rsi, qword [rsp + 0xe0]
mov rbp, qword [rsp + 0xb8]
mov r13, qword [rsp + 0xc8]
mov r15, qword [rsp + 0xd0]
mov rdi, qword [rsp + 0x90]
jmp 0x18001893f
mov r15, qword [rsp + 0x90]
mov r12, qword [rsp + 0x90]
lea ecx, [rbx + 1]
call qword [sym.imp.msvcrt.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x1800189b1
lea r8, str.Error_allocating_memory_for_structure_information...
lea rcx, str.misc.c
mov edx, 0x310
call sym.dcapi.dll_log_print
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
lea eax, [rbx + 1]
mov r14, qword [rsp + 0x10198]
mov r15, qword [rsp + 0x10150]
mov rbp, qword [rsp + 0x10188]
mov r12, qword [rsp + 0x10190]
mov rcx, qword [rsp + 0x10140]
xor rcx, rsp
call fcn.18000ee20
add rsp, 0x10158
pop r13
pop rdi
pop rsi
pop rbx
ret
lea rax, [rsp + 0x110]
mov rdx, rbx
lea rcx, [rsp + 0x110]
sub rdx, rax
nop word [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx + rcx - 1], al
test al, al
jne 0x1800189d0
cmp dword [rsp + 0x98], 0
jne 0x180018af0
test r13, r13
je 0x180018a11
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
nop
movzx eax, byte [r13 + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x180018a00
test rbp, rbp
je 0x180018a3f
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [rcx + rbp]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x180018a30
test rsi, rsi
je 0x180018a60
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
movzx eax, byte [rsi + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x180018a51
test r12, r12
je 0x180018a90
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [r12 + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x180018a80
test r15, r15
je 0x180018ac0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor edx, edx
nop word [rax + rax]
movzx eax, byte [r15 + rdx]
inc rdx
mov byte [rdi + rdx - 2], al
test al, al
jne 0x180018ab0
test r14, r14
je 0x180018af0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [r14 + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x180018ae0
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.msvcrt.dll_free]
mov rdx, qword [rsp + 0xe8]
xor eax, eax
mov qword [rdx], rbx
jmp 0x180018974