joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14012e670
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
mov esi, ecx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rax, [0x14012e710]
mov qword [rsp + 0x20], rax
lea rcx, [0x14023ce48]
lea rdx, [0x14012e510]
lea r8, [rsp + 0x20]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x14012e704
cmp dword [0x14023ce50], 0
je 0x14012e6c1
xor esi, esi
jmp 0x14012e6ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, dword [0x14023ce54]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rdi, rdi
je 0x14012e6bd
movsxd rax, esi
mov rsi, qword [rdi + rax*8]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14019eb90
mov rax, rsi
add rsp, 0x30
pop rbx
pop rdi
pop rsi
ret
call fcn.1401b79c0
int3

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

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rdi, r8
mov rsi, rdx
mov ebx, ecx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x30], rax
lea rax, [0x14012e710]
mov qword [rsp + 0x28], rax
lea rcx, [0x14023ce48]
lea rdx, [0x14012e510]
lea r8, [rsp + 0x28]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x14012e857
cmp dword [0x14023ce50], 0
je 0x14012e7ac
mov rcx, rsi
mov rax, rdi
call qword [0x140251008]
xor esi, esi
jmp 0x14012e800
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, dword [0x14023ce54]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r14, rax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14, r14
je 0x14012e81c
lea r15, [0x14023ce58]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
movsxd rbx, ebx
lea rax, [0x14023ce60]
mov qword [rax + rbx*8], rdi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov qword [r14 + rbx*8], rsi
mov esi, 1
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14019eb90
mov eax, esi
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
mov ecx, 1
mov edx, 0x28
call fcn.140099f50
test rax, rax
je 0x14012e79c
mov r14, rax
mov ecx, dword [0x14023ce54]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14012e7d0
mov rcx, r14
call fcn.140099ec0
jmp 0x14012e79c
call fcn.1401b79c0
int3

Function at 0x14012edc0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test rdx, rdx
je 0x14012ee02
mov rsi, rdx
mov rdi, rcx
mov r14d, 0xffffffff
nop word [rax + rax]
cmp rsi, r14
mov ebx, 0xffffffff
cmovb rbx, rsi
mov rcx, rdi
mov edx, ebx
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x14012ee0c
add rdi, rbx
sub rsi, rbx
jne 0x14012ede0
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.1401b79c0
int3
Function at 0x14012eed0
Capabilities:
Enumerate processes

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdi, rcx
lea rsi, [rcx + 0x18]
mov r8d, 0x238
mov rcx, rsi
xor edx, edx
call fcn.1401a0cc0
mov dword [rdi + 0x18], 0x238
cmp byte [rdi + 0x10], 0
je 0x14012ef08
mov rcx, qword [rdi + 8]
mov rdx, rsi
call sub.KERNEL32.dll_Process32NextW
jmp 0x14012ef18
mov byte [rdi + 0x10], 1
mov rcx, qword [rdi + 8]
mov rdx, rsi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
setne al
add rsp, 0x28
pop rdi
pop rsi
ret

Function at 0x1401353f8
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov edi, 0xffffffff
cmp r8, rdi
cmovae r8, rdi
lea r9, [rsp + 0x2c]
mov dword [r9], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140135444
mov esi, dword [rsp + 0x2c]
cmp rsi, rdi
jne 0x14013544b
int3
mov rsi, 0xffffffffffffffff
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14019eb90
mov rax, rsi
add rsp, 0x38
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 8]
jmp 0x1401353f8

Function at 0x140135462
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov ebx, 0xffffffff
cmp r8, rbx
cmovb rbx, r8
mov qword [rsp + 0x30], rax
lea r14, [rsp + 0x2c]
mov r15, qword [sym.imp.KERNEL32.dll_ReadFile]
mov r12, qword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [rsp + 0x2c], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov rdx, rsi
mov r8d, ebx
mov r9, r14
call r15
test eax, eax
je 0x140135505
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x1401354e0
mov rcx, rdi
call r12
cmp eax, 3
je 0x1401354a3
mov eax, dword [rsp + 0x2c]
jmp 0x1401354e5
cmp eax, 0xffffffff
je 0x140135519
mov esi, eax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14019eb90
mov rax, rsi
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
cmp eax, 0x6d
setne sil
neg rsi
jmp 0x1401354e7
int3

Function at 0x140135b9c
Capabilities:
Clear file content

Disassembly:
push rsi
push rdi
sub rsp, 0x178
mov rdi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x170], rax
xor esi, esi
xor edx, edx
xor r8d, r8d
call fcn.140135aa6
test rax, rax
jne 0x140135c33
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov sil, 1
test eax, eax
jne 0x140135c33
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x140135c31
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadutil_file_file_io_win.cc
lea rsi, [rsp + 0x30]
mov rcx, rsi
mov r8d, 0xfb
mov r9d, 2
call fcn.1400ae3b0
lea rcx, [rsp + 0x40]
lea rdx, [0x140208162]
mov r8d, ntohl
call fcn.14002e9c2
mov rcx, rsi
call fcn.1400ae4a0
xor esi, esi
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.14019eb90
mov eax, esi
add rsp, 0x178
pop rdi
pop rsi
ret
Function at 0x140136040
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov edi, 0xffffffff
cmp r8, rdi
cmovae r8, rdi
lea r9, [rsp + 0x2c]
mov dword [r9], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140135444
mov esi, dword [rsp + 0x2c]
cmp rsi, rdi
jne 0x14013544b
int3
mov rsi, 0xffffffffffffffff
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.14019eb90
mov rax, rsi
add rsp, 0x38
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 8]
jmp 0x1401353f8

Function at 0x140136c27
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x1a0
mov ebx, edx
mov rsi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x198], rax
cmp byte [rcx + 0x17], 0
jns 0x140136c51
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140136c77
mov edi, eax
bt eax, 0xa
jae 0x140136c6c
test bl, bl
je 0x140136d2e
and edi, 0x10
shr edi, 4
jmp 0x140136d30
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x140136d2e
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadutil_file_filesystem_win.cc
lea rcx, [rsp + 0x58]
mov r8d, 0x82
mov r9d, 2
call fcn.1400ae3b0
lea rcx, [rsp + 0x68]
lea rdx, str.GetFileAttributes
mov r8d, 0x12
call fcn.14002e9c2
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x40]
mov rcx, rsi
call fcn.14009e850
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x140136d08
mov r8, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rcx, rdi
mov rdx, rsi
call fcn.14002e9c2
cmp byte [rsp + 0x57], 0
jns 0x140136d24
mov rcx, qword [rsp + 0x40]
call fcn.14019d34c
lea rcx, [rsp + 0x58]
call fcn.1400ae4a0
xor edi, edi
mov rcx, qword [rsp + 0x198]
xor rcx, rsp
call fcn.14019eb90
mov eax, edi
add rsp, 0x1a0
pop rbx
pop rdi
pop rsi
ret
Function at 0x140136d4d
Capabilities:
Create directory

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x1b0
mov ebx, r8d
mov rsi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x1a8], rax
cmp byte [rcx + 0x17], 0
jns 0x140136d78
mov rcx, qword [rsi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dil, 1
test eax, eax
jne 0x140136f46
test bl, bl
je 0x140136e7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140136e7e
mov dil, 1
mov rcx, rsi
mov dl, 1
call fcn.140136c27
test al, al
jne 0x140136f46
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x140136f44
lea rdx, str....._third_partycrashpadcrashpadutil_file_filesystem_win.cc
lea rcx, [rsp + 0x40]
mov r8d, 0x5d
mov r9d, 2
call fcn.1400ad510
lea rdi, [rsp + 0x50]
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x180]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x190]
mov rcx, rsi
call fcn.14009e850
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x140136e38
mov r8, qword [rsp + 0x198]
mov rsi, qword [rsp + 0x190]
mov rcx, rdi
mov rdx, rsi
call fcn.14002e9c2
lea rdx, str._not_a_directory
mov r8d, 0x10
mov rcx, rax
call fcn.14002e9c2
cmp byte [rsp + 0x1a7], 0
jns 0x140136e6f
mov rcx, qword [rsp + 0x190]
call fcn.14019d34c
lea rcx, [rsp + 0x40]
call fcn.1400ad9f0
jmp 0x140136f44
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x140136f44
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadutil_file_filesystem_win.cc
lea rcx, [rsp + 0x40]
mov r8d, 0x62
mov r9d, 2
call fcn.1400ae3b0
lea rcx, [rsp + 0x50]
lea rdx, str.CreateDirectory
mov r8d, 0x10
call fcn.14002e9c2
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x190]
mov rcx, rsi
call fcn.14009e850
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x140136f18
mov r8, qword [rsp + 0x198]
mov rsi, qword [rsp + 0x190]
mov rcx, rdi
mov rdx, rsi
call fcn.14002e9c2
cmp byte [rsp + 0x1a7], 0
jns 0x140136f3a
mov rcx, qword [rsp + 0x190]
call fcn.14019d34c
lea rcx, [rsp + 0x40]
call fcn.1400ae4a0
xor edi, edi
mov rcx, qword [rsp + 0x1a8]
xor rcx, rsp
call fcn.14019eb90
mov eax, edi
add rsp, 0x1b0
pop rbx
pop rdi
pop rsi
ret
Function at 0x140136f63
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rsi
push rdi
sub rsp, 0x198
mov rsi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x190], rax
cmp byte [rcx + 0x17], 0
jns 0x140136f8a
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140136fa3
test eax, 0x410
sete sil
jmp 0x14013705c
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x14013705a
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadutil_file_filesystem_win.cc
lea rcx, [rsp + 0x50]
mov r8d, 0x75
mov r9d, 2
call fcn.1400ae3b0
lea rcx, [rsp + 0x60]
lea rdx, str.GetFileAttributes
mov r8d, 0x12
call fcn.14002e9c2
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x28]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x38]
mov rcx, rsi
call fcn.14009e850
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x140137034
mov r8, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rcx, rdi
mov rdx, rsi
call fcn.14002e9c2
cmp byte [rsp + 0x4f], 0
jns 0x140137050
mov rcx, qword [rsp + 0x38]
call fcn.14019d34c
lea rcx, [rsp + 0x50]
call fcn.1400ae4a0
xor esi, esi
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.14019eb90
mov eax, esi
add rsp, 0x198
pop rdi
pop rsi
ret

Function at 0x140137078
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push rsi
push rdi
sub rsp, 0x198
mov rsi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x190], rax
cmp byte [rcx + 0x17], 0
jns 0x14013709f
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1401370d7
and eax, 0x410
cmp eax, 0x410
jne 0x1401370d7
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.14019eb90
mov rcx, rsi
add rsp, 0x198
pop rdi
pop rsi
jmp fcn.1401371c9
cmp byte [rsi + 0x17], 0
mov rcx, rsi
jns 0x1401370e3
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dil, 1
test eax, eax
jne 0x1401371ad
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x1401371ab
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadutil_file_filesystem_win.cc
lea rcx, [rsp + 0x50]
mov r8d, 0x95
mov r9d, 2
call fcn.1400ae3b0
lea rcx, [rsp + 0x60]
lea rdx, str.DeleteFile
mov r8d, ntohl
call fcn.14002e9c2
mov rdi, rax
movzx eax, byte [rsi + 0x17]
test al, al
mov rcx, qword [rsi]
cmovns rcx, rsi
lea rdx, [rsp + 0x28]
mov qword [rdx], rcx
cmovs rax, qword [rsi + 8]
mov qword [rdx + 8], rax
lea rsi, [rsp + 0x38]
mov rcx, rsi
call fcn.14009e850
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
jns 0x140137185
mov r8, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rcx, rdi
mov rdx, rsi
call fcn.14002e9c2
cmp byte [rsp + 0x4f], 0
jns 0x1401371a1
mov rcx, qword [rsp + 0x38]
call fcn.14019d34c
lea rcx, [rsp + 0x50]
call fcn.1400ae4a0
xor edi, edi
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.14019eb90
mov eax, edi
add rsp, 0x198
pop rdi
pop rsi
ret
Function at 0x1401371c9
Capabilities:
Delete directory

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x1a0
mov rdi, rcx
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x198], rax
cmp byte [rcx + 0x17], 0
jns 0x1401371f1
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
test eax, eax
jne 0x1401372b8
mov ecx, 2
call fcn.1400ad460
test al, al
je 0x1401372b8
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadutil_file_filesystem_win.cc
lea rcx, [rsp + 0x58]
mov r8d, 0x30
mov r9d, 2
call fcn.1400ae3b0
lea rcx, [rsp + 0x68]
lea rdx, str.RemoveDirectory
mov r8d, 0x10
call fcn.14002e9c2
mov rbx, rax
movzx eax, byte [rdi + 0x17]
test al, al
mov rcx, qword [rdi]
cmovns rcx, rdi
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
cmovs rax, qword [rdi + 8]
mov qword [rdx + 8], rax
lea rdi, [rsp + 0x40]
mov rcx, rdi
call fcn.14009e850
movzx r8d, byte [rdi + 0x17]
test r8b, r8b
jns 0x140137292
mov r8, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
mov rcx, rbx
mov rdx, rdi
call fcn.14002e9c2
cmp byte [rsp + 0x57], 0
jns 0x1401372ae
mov rcx, qword [rsp + 0x40]
call fcn.14019d34c
lea rcx, [rsp + 0x58]
call fcn.1400ae4a0
test esi, esi
setne bl
mov rcx, qword [rsp + 0x198]
xor rcx, rsp
call fcn.14019eb90
mov eax, ebx
add rsp, 0x1a0
pop rbx
pop rdi
pop rsi
ret
Function at 0x140146860
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rsi, rdx
mov rdi, rcx
mov eax, dword [0x14023d3a0]
mov ecx, dword [0x14022f5ac]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1401468c2
cmp rdi, rsi
je 0x1401468b8
mov eax, 0xffffffff
lea rcx, [0x14023cfa0]
mov dl, byte [rdi]
xor dl, al
movzx edx, dl
shr eax, 8
xor eax, dword [rcx + rdx*4]
inc rdi
cmp rdi, rsi
jne 0x14014689f
not eax
jmp 0x1401468ba
xor eax, eax
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
lea rcx, [0x14023d3a0]
call fcn.14019d470
cmp dword [0x14023d3a0], 0xffffffff
jne 0x14014688e
lea rbx, [0x14023cfa0]
mov r8d, 0x400
mov rcx, rbx
mov dl, 0xaa
call fcn.1401a0cc0
xor eax, eax
mov ecx, 8
mov edx, eax
mov r8d, edx
shr r8d, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor edx, r8d
dec ecx
jne 0x1401468f7
mov dword [rbx + rax*4], edx
inc rax
cmp rax, 0x100
jne 0x1401468f0
lea rcx, [0x14023d3a0]
call fcn.14019d508
jmp 0x14014688e

Function at 0x14014ff20
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rdi, rdx
mov rsi, rcx
mov ecx, dword [0x14022f4a8]
cmp ecx, 0xffffffff
je 0x14014ff42
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test al, 3
jne 0x14014ff47
call fcn.140150060
mov eax, dword [0x14023ebc0]
mov ecx, dword [0x14022f5ac]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14015000f
mov rbx, qword [0x14023ebb8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x14014ff88
mov rcx, rbx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rcx, qword [0x14023d3a8]
inc rcx
xor edx, edx
lea rax, [0x14023d3b0]
nop dword [rax + rax]
lea r8d, [rcx + rdx]
movzx r8d, r8b
lea r9, [r8 + r8*2]
cmp dword [rax + r9*8], 0
je 0x14014ffc1
inc rdx
cmp rdx, 0x100
jne 0x14014ffa0
jmp 0x14014fff5
lea rcx, [rax + r9*8]
mov dword [rcx], 1
mov qword [rax + r9*8 + 8], rdi
mov ecx, dword [0x14023ebb0]
inc ecx
mov dword [0x14023ebb0], ecx
mov dword [rax + r9*8 + 0x14], ecx
mov qword [0x14023d3a8], r8
mov qword [rsi], r8
mov eax, dword [rax + r9*8 + 0x10]
mov dword [rsi + 8], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsi], 0x100
jae 0x140150055
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
lea rcx, [0x14023ebc0]
call fcn.14019d470
cmp dword [0x14023ebc0], 0xffffffff
jne 0x14014ff6c
mov ecx, 8
call fcn.14019d310
mov rbx, rax
mov rcx, rax
call fcn.14004a840
mov qword [0x14023ebb8], rbx
lea rcx, [0x14023ebc0]
call fcn.14019d508
jmp 0x14014ff6c
int3
Function at 0x140150060
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
mov eax, 0x1038
call fcn.14019eb30
sub rsp, rax
mov rax, qword [0x14021f030]
xor rax, rsp
mov qword [rsp + 0x1030], rax
mov dword [rsp + 0x2c], 0xaaaaaaaa
mov ecx, dword [0x14022f4a8]
mov dword [rsp + 0x2c], ecx
cmp ecx, 0xffffffff
jne 0x1401500fc
lea rcx, [rsp + 0x2c]
call fcn.1401742e0
test al, al
je 0x140150177
mov ecx, dword [rsp + 0x2c]
cmp ecx, 0xffffffff
jne 0x1401500de
lea rcx, [rsp + 0x2c]
call fcn.1401742e0
test al, al
je 0x14015017a
cmp dword [rsp + 0x2c], 0xffffffff
je 0x14015017a
mov ecx, 0xffffffff
call sub.KERNEL32.dll_TlsFree
mov ecx, dword [rsp + 0x2c]
mov eax, 0xffffffff
lock cmpxchg dword [0x14022f4a8], ecx
je 0x1401500fc
call sub.KERNEL32.dll_TlsFree
mov ecx, dword [0x14022f4a8]
mov dword [rsp + 0x2c], ecx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test al, 3
jne 0x140150174
lea rsi, [rsp + 0x30]
mov r8d, 0x1000
mov rcx, rsi
xor edx, edx
call fcn.1401a0cc0
mov ecx, dword [rsp + 0x2c]
lea rdx, [rsp + 0x33]
call sub.KERNEL32.dll_TlsSetValue
mov ecx, 0x1000
call fcn.14019d38c
mov rdi, rax
mov r8d, 0x1000
mov rcx, rax
mov rdx, rsi
call fcn.1401a0610
mov ecx, dword [rsp + 0x2c]
mov rdx, rdi
or rdx, 3
call sub.KERNEL32.dll_TlsSetValue
mov rcx, qword [rsp + 0x1030]
xor rcx, rsp
call fcn.14019eb90
mov rax, rdi
add rsp, 0x1038
pop rdi
pop rsi
ret
int3
int3
int3

Function at 0x140150180
Capabilities:
Get thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
mov ecx, dword [0x14022f4a8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1401501b0
mov rcx, qword [rsi]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 8]
jne 0x1401501b0
mov rax, qword [rax + rcx]
jmp 0x1401501b2
xor eax, eax
add rsp, 0x20
pop rsi
ret

Function at 0x1401501c0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdi, rdx
mov rsi, rcx
mov ecx, dword [0x14022f4a8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1401501fe
mov rcx, qword [rsi]
shl rcx, 4
mov qword [rax + rcx], rdi
mov ecx, dword [rsi + 8]
mov rdx, qword [rsi]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
add rsp, 0x28
pop rdi
pop rsi
ret
test rdi, rdi
je 0x1401501f7
call fcn.140150060
jmp 0x1401501de
Function at 0x140153390
Capabilities:
Reference processor manufacturer constants

Disassembly:
push rsi
push rdi
mov r8, rcx
xor edi, edi
xor ecx, ecx
xor eax, eax
xchg rbx, r9
cpuid
xchg rbx, r9
test eax, eax
jle 0x1401534b7
mov r10d, eax
xor ecx, ecx
mov eax, 1
xchg rbx, r9
cpuid
xchg rbx, r9
mov r9d, ecx
mov r11d, edx
mov esi, eax
cmp r10d, 7
jb 0x1401533ea
mov eax, 7
xor ecx, ecx
xchg rbx, rdi
cpuid
xchg rbx, rdi
mov r10d, ecx
and edi, 0x20
shr r10b, 4
and r10b, 1
jmp 0x1401533ed
xor r10d, r10d
mov dword [r8], esi
mov eax, esi
and eax, 0xf
mov dword [r8 + 8], eax
shr esi, 0xc
and esi, 3
mov dword [r8 + 4], esi
mov eax, r11d
shr eax, 0x17
and al, 1
mov byte [r8 + 0xc], al
mov eax, r11d
shr eax, 0x19
and al, 1
mov byte [r8 + 0xd], al
shr r11d, 0x1a
and r11b, 1
mov byte [r8 + 0xe], r11b
mov eax, r9d
and al, 1
mov byte [r8 + 0xf], al
mov eax, r9d
shr eax, 9
and al, 1
mov byte [r8 + 0x10], al
mov eax, r9d
shr eax, 0x13
and al, 1
mov byte [r8 + 0x11], al
mov eax, r9d
shr eax, 0x14
and al, 1
mov byte [r8 + 0x12], al
mov eax, r9d
shr eax, 0x17
and al, 1
mov byte [r8 + 0x13], al
mov eax, r9d
shr eax, 0x1f
mov byte [r8 + 0x1a], al
mov eax, r9d
not eax
test eax, 0x1c000000
jne 0x140153484
xor ecx, ecx
xgetbv
not eax
test al, 6
sete al
jmp 0x140153486
xor eax, eax
mov byte [r8 + 0x14], al
mov ecx, r9d
shr ecx, 0x19
and cl, 1
mov byte [r8 + 0x17], cl
shr r9d, 0xc
and r9b, 1
mov byte [r8 + 0x15], r9b
test al, al
setne al
test edi, edi
setne cl
and cl, al
mov byte [r8 + 0x16], cl
mov byte [r8 + 0x18], r10b
xor ecx, ecx
mov eax, 0x80000000
xchg rbx, r9
cpuid
xchg rbx, r9
cmp eax, 0x80000006
jle 0x1401534ec
mov eax, 0x80000007
xor ecx, ecx
xchg rbx, r9
cpuid
xchg rbx, r9
shr edx, 8
and dl, 1
mov byte [r8 + 0x19], dl
test dl, dl
jne 0x140153529
jmp 0x1401534f5
movzx edx, byte [r8 + 0x19]
test dl, dl
jne 0x140153529
cmp byte [r8 + 0x1a], 0
je 0x140153529
mov eax, 0x40000000
xor ecx, ecx
xchg rbx, r9
cpuid
xchg rbx, r9
cmp r9d, 0x7263694d
jne 0x140153529
cmp ecx, 0x666f736f
jne 0x140153529
cmp edx, 0x76482074
jne 0x140153529
mov byte [r8 + 0x19], 1
pop rdi
pop rsi
ret