joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001cd40
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x30
cmp qword [rcx + 8], 0
mov rbx, rdx
mov rsi, rcx
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x50], 0
je 0x14001cd75
mov r8d, 1
call fcn.14001c450
mov dword [rsp + 0x50], eax
jmp 0x14001cd96
mov rcx, qword [rcx]
lea r9, [rsp + 0x50]
mov r8d, 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x50]
cmp eax, 1
je 0x14001cda8
xor eax, eax
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
movzx ecx, byte [rsp + 0x40]
test cl, cl
js 0x14001cdc7
mov byte [rbx], cl
mov byte [rbx + 1], 0
mov eax, 1
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
movzx eax, cl
mov qword [rsp + 0x48], rdi
and al, 0xe0
cmp al, 0xc0
jne 0x14001cddc
mov edi, 2
jmp 0x14001cdfa
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x14001cdec
mov edi, 3
jmp 0x14001cdfa
movzx eax, cl
and al, 0xf8
cmp al, 0xf0
jne 0x14001ce65
mov edi, 4
mov byte [rbx], cl
cmp qword [rsi + 8], 0
lea rdx, [rbx + 1]
je 0x14001ce1a
lea eax, [rdi - 1]
mov rcx, rsi
movsxd r8, eax
call fcn.14001c450
mov rcx, rax
jmp 0x14001ce39
mov rcx, qword [rsi]
lea r8d, [rdi - 1]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x50]
lea eax, [rdi - 1]
cmp ecx, eax
je 0x14001ce52
xor eax, eax
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
movsxd rax, edi
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
mov rdi, qword [rsp + 0x48]
mov word [rbx], 0x3f
mov rbx, qword [rsp + 0x58]
mov eax, 1
add rsp, 0x30
pop rsi
ret

Function at 0x14001e71c
Capabilities:
Get graphical window text

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov ebx, edx
mov rdx, rcx
mov rcx, qword [0x1400ba5a0]
call fcn.140034af0
xor ebp, ebp
mov rsi, rax
test rax, rax
je 0x14001e79c
mov rcx, qword [rax + 8]
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x14001e761
mov edx, ebx
mov rcx, rsi
call rax
jmp 0x14001e79c
mov rcx, qword [rsi]
call qword [sym.imp.USER32.DLL_GetWindowTextLengthW]
mov edx, ebx
mov ecx, eax
mov edi, eax
call fcn.140035c80
lea r8d, [rdi + 1]
mov word [rax], bp
mov rcx, qword [rsi]
mov rdx, rax
mov rbx, rax
call qword [sym.imp.USER32.DLL_GetWindowTextW]
mov rcx, rbx
call sub.msvcrt.dll_wcslen
sub edi, eax
mov ecx, edi
call fcn.140035dc0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140028c74
Capabilities:
Get common file path
Get file system object information

Disassembly:
push rbx
sub rsp, 0x500
mov ebx, ecx
lea rcx, [rsp + 0x30]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
bts ebx, 0xe
lea r8, [rsp + 0x240]
lea rcx, [rsp + 0x30]
mov r9d, 0x2b8
xor edx, edx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.SHELL32.DLL_SHGetFileInfoW]
add rsp, 0x500
pop rbx
ret

Function at 0x140028cbc
Capabilities:
Terminate thread

Disassembly:
test rcx, rcx
je 0x140028d50
push rbx
sub rsp, 0x20
cmp dword [0x1400b9ecc], 1
mov rbx, rcx
je 0x140028d4b
lea rcx, [0x1400ba1a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [0x1400ba1d0]
and qword [0x1400ba1e0], 0
mov qword [0x1400ba1d8], rbx
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [0x1400ba1c8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [0x1400ba1d0]
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140028d3e
mov rcx, qword [0x1400ba198]
xor edx, edx
mov dword [0x1400b9ecc], 1
call qword [sym.imp.KERNEL32.dll_TerminateThread]
lea rcx, [0x1400ba1a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0x20
pop rbx
ret
Function at 0x14002909c
Capabilities:
Create thread

Disassembly:
push rsi
sub rsp, 0x30
cmp dword [0x1400b9cb0], 0
jne 0x1400291a6
lea rcx, [0x1400ba630]
mov esi, 1
mov dword [0x1400b9cb0], esi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov rcx, qword [0x1400b7294]
mov r8d, 0x640
lea edx, [rsi + 7]
mov dword [0x1400b9cb4], 0x1f4
mov dword [0x1400b9cb8], r8d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
movsxd r8, dword [0x1400b9cb4]
mov rcx, qword [0x1400b7294]
lea edx, [rsi + 7]
add r8, r8
mov qword [0x1400ba190], rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
and dword [0x1400b9cbc], 0
lea rcx, [0x1400ba1a0]
mov qword [0x1400ba188], rax
mov dword [0x1400b9ec8], esi
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor r9d, r9d
xor r8d, r8d
mov edx, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
mov edx, esi
xor ecx, ecx
mov qword [0x1400ba1c8], rax
call qword [sym.imp.KERNEL32.dll_CreateEventW]
cmp qword [0x1400ba1c8], 0
mov qword [0x1400ba1d0], rax
je 0x1400291a0
test rax, rax
je 0x1400291a0
and dword [0x1400b9ecc], 0
lea rax, [rsp + 0x40]
lea r8, [0x1400289f0]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x1400ba198], rax
jmp 0x1400291a6
mov dword [0x1400b9ecc], esi
add rsp, 0x30
pop rsi
ret

Function at 0x1400291ac
Capabilities:
Terminate thread

Disassembly:
test rcx, rcx
je 0x140029271
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rax, rdx
mov rbx, rcx
test rax, rax
je 0x140029267
cmp dword [0x1400b9ecc], 1
je 0x140029267
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x1f]
call qword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140029267
lea rcx, [0x1400ba1a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [0x1400ba1d0]
mov qword [0x1400ba1d8], rbx
mov qword [0x1400ba1e0], rdi
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [0x1400ba1c8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [0x1400ba1d0]
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14002925a
mov rcx, qword [0x1400ba198]
xor edx, edx
mov dword [0x1400b9ecc], 1
call qword [sym.imp.KERNEL32.dll_TerminateThread]
lea rcx, [0x1400ba1a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140029428
Capabilities:
Check os version

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push rbp
lea rbp, [rax - 0x288]
sub rsp, 0x380
lea rcx, [rbp + 0x40]
mov ebx, 0xc8
xor r14d, r14d
xor edi, edi
mov dword [rbp + 0x40], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x1400295ef
mov eax, dword [rbp + 0x50]
dec eax
je 0x1400295cd
dec eax
jne 0x1400295ef
lea r8d, [rbx + 0x54]
lea rcx, [rsp + 0x20]
xor edx, edx
xor esi, esi
call sub.msvcrt.dll_memset
lea rcx, str.ntdll.dll
mov dword [rsp + 0x20], 0x11c
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400294d1
lea rdx, str.RtlGetVersion
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400294d1
lea rcx, [rsp + 0x20]
call rax
xor ecx, ecx
test eax, eax
sete cl
jmp 0x1400294d3
xor ecx, ecx
test ecx, ecx
je 0x1400294ee
mov r14d, dword [rsp + 0x24]
mov edi, dword [rsp + 0x28]
mov eax, 1
cmp byte [rbp + 0x3a], al
jne 0x14002951e
mov esi, eax
jmp 0x14002951e
lea rcx, [rbp + 0x160]
mov dword [rbp + 0x160], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x14002951e
mov r14d, dword [rbp + 0x44]
mov edi, dword [rbp + 0x48]
mov eax, 1
cmp byte [rbp + 0x27a], al
cmove esi, eax
sub r14d, 3
je 0x1400295c6
dec r14d
je 0x1400295bf
dec r14d
je 0x140029599
dec r14d
je 0x140029555
cmp r14d, 4
jne 0x1400295ef
test edi, edi
jne 0x1400295ef
lea ebx, [rdi + 0x6e]
jmp 0x1400295ef
test edi, edi
je 0x14002958d
dec edi
je 0x140029581
dec edi
je 0x140029575
dec edi
jne 0x1400295ef
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x69
jmp 0x1400295ef
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x5f
jmp 0x1400295ef
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x55
jmp 0x1400295ef
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x4b
jmp 0x1400295ef
test edi, edi
je 0x1400295b8
dec edi
je 0x1400295b1
dec edi
jne 0x1400295ef
neg esi
sbb ebx, ebx
and ebx, 0xfffffffb
add ebx, 0x41
jmp 0x1400295ef
mov ebx, 0x3c
jmp 0x1400295ef
mov ebx, 0x32
jmp 0x1400295ef
mov ebx, 0x14
jmp 0x1400295ef
mov ebx, 5
jmp 0x1400295ef
mov eax, dword [rbp + 0x48]
test eax, eax
je 0x1400295ea
cmp eax, 0xa
je 0x1400295e3
cmp eax, 0x5a
jne 0x1400295ef
lea ebx, [rax - 0x32]
jmp 0x1400295ef
mov ebx, 0x1e
jmp 0x1400295ef
mov ebx, 0xa
lea r11, [rsp + 0x380]
movsxd rax, ebx
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
Function at 0x14002a2cc
Capabilities:
Log keystrokes via polling

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rcx
call qword [sym.imp.USER32.DLL_GetFocus]
mov rbx, rax
test rax, rax
je 0x14002a375
mov ecx, 9
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
jns 0x14002a375
mov ecx, 0x11
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
js 0x14002a375
mov ecx, 0x10
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
js 0x14002a375
mov ecx, 0x12
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
js 0x14002a375
lea rdx, [rsp + 0x20]
mov r8d, 5
mov rcx, rbx
call qword [sym.imp.USER32.DLL_GetClassNameW]
lea rdx, str.Rich
lea rcx, [rsp + 0x20]
mov r8d, 4
call sub.msvcrt.dll_wcsncmp
test eax, eax
jne 0x14002a375
xor r9d, r9d
xor r8d, r8d
mov edx, 0x44e
mov rcx, rbx
call qword [sym.imp.USER32.DLL_SendMessageW]
bt rax, 0xb
jae 0x14002a41f
test rdi, rdi
je 0x14002a3b4
mov ecx, 0x11
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
js 0x14002a3a7
mov ecx, 0x10
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
js 0x14002a3a7
mov ecx, 0x12
call qword [sym.imp.USER32.DLL_GetKeyState]
test al, al
jns 0x14002a3b4
mov edx, 1
mov rcx, rdi
call fcn.14002a42c
test rbx, rbx
je 0x14002a3ce
lea rdx, str.PB_Hotkey
mov rcx, rbx
call qword [sym.imp.USER32.DLL_GetPropW]
test rax, rax
jne 0x14002a41f
lea rdx, str.PB_WindowID
mov rcx, rdi
call qword [sym.imp.USER32.DLL_GetPropW]
mov rbx, rax
test rax, rax
je 0x14002a41f
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.USER32.DLL_GetWindowThreadProcessId]
test eax, eax
je 0x14002a41f
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x48], eax
jne 0x14002a41f
mov rcx, qword [0x1400ba5b0]
lea rdx, [rbx - 1]
call fcn.140034af0
test rax, rax
je 0x14002a41f
mov rax, qword [rax + 0x10]
jmp 0x14002a421
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x14002c384
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400ba730], eax
add rsp, 0x28
ret
Function at 0x14002c920
Capabilities:
Get file size
Read file on windows

Disassembly:
xor r8d, r8d
jmp 0x14002c928
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov rax, rdx
xor ebx, ebx
mov r14, rcx
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rax
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14002c9eb
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [0x1400b7294]
xor edx, edx
mov r8d, eax
mov edi, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x14002c9e2
lea r9, [rsp + 0x78]
mov r8d, edi
mov rdx, rax
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14002c9d0
cmp dword [rsp + 0x78], edi
jne 0x14002c9d0
mov r8d, edi
mov rdx, rsi
mov rcx, r14
call fcn.14002c4d4
mov rbx, rax
mov rcx, qword [0x1400b7294]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x68]
mov rax, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret

Function at 0x14002c928
Capabilities:
Get file size
Read file on windows

Disassembly:
xor r8d, r8d
jmp 0x14002c928
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov rax, rdx
xor ebx, ebx
mov r14, rcx
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rax
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14002c9eb
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [0x1400b7294]
xor edx, edx
mov r8d, eax
mov edi, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x14002c9e2
lea r9, [rsp + 0x78]
mov r8d, edi
mov rdx, rax
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14002c9d0
cmp dword [rsp + 0x78], edi
jne 0x14002c9d0
mov r8d, edi
mov rdx, rsi
mov rcx, r14
call fcn.14002c4d4
mov rbx, rax
mov rcx, qword [0x1400b7294]
mov r8, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x68]
mov rax, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
Function at 0x1400334b0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov esi, 0x40
mov ecx, esi
call fcn.140035c80
mov rdx, rbx
mov rcx, rax
mov rdi, rax
call fcn.140067bb0
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rdi + rdx*2], 0
jne 0x1400334e0
sub esi, edx
mov ecx, esi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.140035dc0

Function at 0x140033c00
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x28
xor r15d, r15d
mov r13d, r9d
mov r12d, edx
mov ebp, r15d
cmp edx, 1
jl 0x140033d64
mov qword [rsp + 0x50], rbx
test rcx, rcx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x20], r14
lea r14, [0x1400783a0]
mov rbx, r14
mov edi, r15d
cmovne rbx, rcx
test r8, r8
cmovne r14, r8
mov rsi, rbx
movzx ecx, word [r14]
test cx, cx
je 0x140033d30
cmp word [r14 + 2], di
je 0x140033d30
or rax, 0xffffffffffffffff
nop
inc rax
cmp word [r14 + rax*2], di
jne 0x140033c70
movsxd r15, eax
nop dword [rax]
mov r8, r15
mov rdx, r14
mov rcx, rbx
call sub.msvcrt.dll_wcsncmp
test eax, eax
je 0x140033c9d
cmp word [rbx], bp
je 0x140033c9d
add rbx, 2
jmp 0x140033c80
inc edi
cmp edi, r12d
je 0x140033cb2
cmp word [rbx], bp
je 0x140033cbb
lea rbx, [rbx + r15*2]
mov rsi, rbx
jmp 0x140033c80
mov rbp, rbx
sub rbp, rsi
sar rbp, 1
xor r15d, r15d
mov rcx, rbx
call fcn.140036050
mov r14, qword [rsp + 0x20]
mov edi, eax
test eax, eax
je 0x140033cea
mov ecx, r13d
call fcn.140036170
movsxd r8, ebp
mov rdx, rsi
mov rcx, rax
add r8, r8
call sub.msvcrt.dll_memmove
mov edx, r13d
mov ecx, ebp
call fcn.140035c80
test edi, edi
mov rdi, qword [rsp + 0x60]
mov rbx, rax
jne 0x140033d0e
movsxd r8, ebp
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_wcsncpy
mov rsi, qword [rsp + 0x58]
movsxd rcx, ebp
mov word [rbx + rcx*2], r15w
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret
movzx eax, word [rbx]
cmp ax, cx
je 0x140033d3d
test ax, ax
jne 0x140033d50
inc edi
cmp edi, edx
je 0x140033d56
test ax, ax
je 0x140033cbe
lea rsi, [rbx + 2]
add rbx, 2
jmp 0x140033d30
mov rbp, rbx
sub rbp, rsi
sar rbp, 1
jmp 0x140033cbe
mov ecx, r9d
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
jmp fcn.140035e00
Function at 0x1400348ec
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
mov ecx, dword [0x1400ba340]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x14003496d
mov r8, qword [0x1400ba338]
mov rcx, qword [0x1400b7294]
lea edx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x1400ba340]
mov rdx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rbx, qword [0x1400ba330]
jmp 0x140034959
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x140034956
mov rcx, qword [rbx + 0x10]
add rcx, rdi
call rdx
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140034944
lea rcx, [0x140034850]
mov rdx, rdi
call fcn.140068448
mov rbx, qword [rsp + 0x30]
lea rax, [rdi + rsi]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
mov rbp, r8
mov rdi, rdx
and ecx, 7
je 0x1400349ae
mov eax, 8
sub eax, ecx
add ebx, eax
mov rcx, qword [0x1400ba338]
test rcx, rcx
jne 0x1400349f1
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, qword [0x1400b7294]
movsxd r8, ebx
mov edx, 8
mov dword [0x1400ba340], eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [0x1400ba340]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x1400ba338]
mov rsi, rcx
movsxd rax, ebx
add rcx, rax
mov qword [0x1400ba338], rcx
mov ecx, dword [0x1400ba340]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r9, qword [0x1400ba338]
mov rcx, qword [0x1400b7294]
mov r8, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [0x1400ba340]
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test rdi, rdi
jne 0x140034a45
test rbp, rbp
je 0x140034a6c
lea rcx, [0x1400ba330]
mov edx, 0x28
call fcn.140035618
mov qword [rax], rsi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rbp
test rdi, rdi
je 0x140034a6c
lea rcx, [rbx + rsi]
call rdi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rax, rsi
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400356b0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r8d, r8d
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [0x1400ba990], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400b4748], eax
call fcn.1400364b0
add rsp, 0x28
ret

Function at 0x140035720
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x48
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov ecx, dword [0x1400b4748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x30]
add rsp, 0x48
ret
Function at 0x140035770
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov ecx, dword [0x1400b4748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x28], rax
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x10]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x40]
cmp qword [rax], 0
jne 0x1400357d6
movsxd rax, dword [rsp + 0x20]
add rax, 0xa
mov r8, rax
xor edx, edx
mov rcx, qword [0x1400ba990]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
jmp 0x140035801
movsxd rax, dword [rsp + 0x20]
add rax, 0xa
mov r9, rax
mov rax, qword [rsp + 0x40]
mov r8, qword [rax]
xor edx, edx
mov rcx, qword [0x1400ba990]
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
movsxd rax, dword [rsp + 0x20]
xor edx, edx
mov ecx, 2
div rcx
movsxd rcx, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x28]
add rcx, qword [rdx]
mov r8d, eax
mov rdx, rcx
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
call fcn.1400360f0
movsxd rax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret

Function at 0x140035850
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x1400b4748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
add rax, 2
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
add rsp, 0x38
ret

Function at 0x140035880
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x38
mov ecx, dword [0x1400b4748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
movsxd rax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
add rsp, 0x38
ret

Function at 0x140035a90
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x1400b4748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
add rsp, 0x38
ret

Function at 0x140035ac0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x1400b4748]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
add rsp, 0x38
ret