joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140043690
Capabilities:
Create thread

Disassembly:
jmp 0x140043690
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov edi, r9d
mov r14, r8
mov r15, rdx
mov rbx, rcx
xor ebp, ebp
test rcx, rcx
setne bpl
mov r13d, dword [rsp + 0xd0]
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x60], rax
shl ebp, 0x10
mov ecx, 0x18
call fcn.14008f6c4
mov rsi, rax
movabs r12, 0xfffffffc00000000
mov rax, r15
and rax, r12
cmp rax, qword [0x14012f1c8]
jne 0x1400436fd
mov rcx, r15
call fcn.1400714e0
mov qword [rsi], r15
test r14, r14
setne byte [rsi + 8]
mov dword [rsi + 0xc], edi
mov dword [rsi + 0x10], r13d
mov dword [rsp + 0x20], ebp
mov qword [rsp + 0x28], 0
lea r8, [0x140043b20]
xor ecx, ecx
mov rdx, rbx
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdi, rax
test rax, rax
je 0x1400437f5
test r14, r14
je 0x14004376a
mov qword [r14], rdi
test rdi, rdi
setne bl
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140090cc0
mov eax, ebx
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140043744
mov eax, dword [0x140142620]
mov ecx, dword [0x14013bda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140043844
lea rbx, [rsp + 0x38]
mov rcx, rbx
mov edx, ebp
call fcn.140031c00
movzx r8d, byte [rbx + 0x17]
test r8b, r8b
js 0x1400437b9
and r8d, 0x7f
jmp 0x1400437c3
mov r8, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
lea r14, [rsp + 0x50]
mov rcx, r14
mov rdx, rbx
call fcn.140059020
mov rcx, qword [0x140142618]
mov rdx, r14
call fcn.140043cf0
cmp byte [rsp + 0x4f], 0
jns 0x14004381a
mov rcx, qword [rsp + 0x38]
call fcn.14008f700
jmp 0x14004381a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
je 0x140043812
mov ebp, eax
cmp eax, 0x5af
je 0x140043812
cmp ebp, 0xe
jne 0x140043775
mov rcx, rbx
call fcn.1400e2f30
test rsi, rsi
je 0x140043744
mov rcx, qword [rsi]
and r12, rcx
cmp r12, qword [0x14012f1c8]
jne 0x140043837
call fcn.140071620
mov rcx, rsi
call fcn.14008f700
jmp 0x140043744
lea rcx, [0x140142620]
call fcn.14008f820
cmp dword [0x140142620], 0xffffffff
jne 0x14004379a
lea rcx, str.create_thread_last_error
mov edx, 0x20
call fcn.140043cd0
mov qword [0x140142618], rax
lea rcx, [0x140142620]
call fcn.14008f8b8
jmp 0x14004379a
Function at 0x1400446f0
Capabilities:
Check if file exists
Create directory

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x1a0
mov rsi, rcx
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x198], rax
cmp byte [rcx + 0x17], 0
jns 0x140044718
mov rcx, qword [rsi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140044753
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140044773
mov rcx, qword [rsp + 0x198]
xor rcx, rsp
call fcn.140090cc0
mov rcx, rsi
add rsp, 0x1a0
pop rbx
pop rdi
pop rsi
jmp fcn.140044850
mov sil, 1
mov rcx, qword [rsp + 0x198]
xor rcx, rsp
call fcn.140090cc0
mov eax, esi
add rsp, 0x1a0
pop rbx
pop rdi
pop rsi
ret
mov ecx, 2
call fcn.14006d880
test al, al
jne 0x140044785
xor esi, esi
jmp 0x140044756
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadclientcrash_report_database_win.cc
lea rcx, [rsp + 0x58]
mov r8d, 0x265
mov r9d, 2
call fcn.1400dec20
lea rcx, [rsp + 0x68]
lea rdx, str.CreateDirectory
mov r8d, 0x10
call fcn.1400c3d60
mov rdi, rax
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
js 0x1400447d5
and r8d, 0x7f
jmp 0x1400447dc
mov r8, qword [rsi + 8]
mov rsi, qword [rsi]
lea rbx, [rsp + 0x30]
mov rcx, rbx
mov rdx, rsi
call fcn.140059020
lea rsi, [rsp + 0x40]
mov rcx, rsi
mov rdx, rbx
call fcn.140068dd0
movzx r8d, byte [rsi + 0x17]
test r8b, r8b
js 0x14004480c
and r8d, 0x7f
jmp 0x140044816
mov r8, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rcx, rdi
mov rdx, rsi
call fcn.1400c3d60
cmp byte [rsp + 0x57], 0
jns 0x140044832
mov rcx, qword [rsp + 0x40]
call fcn.14008f700
lea rcx, [rsp + 0x58]
call fcn.1400deca0
jmp 0x140044781

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

Disassembly:
push rsi
push rdi
sub rsp, 0x178
mov rsi, rcx
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x170], rax
cmp byte [rcx + 0x17], 0
jns 0x140044877
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400448b5
mov dil, 1
test al, 0x10
je 0x1400448a5
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.140090cc0
mov eax, edi
add rsp, 0x178
pop rdi
pop rsi
ret
mov ecx, 2
call fcn.14006d880
test al, al
je 0x1400448c3
jmp 0x14004491c
mov ecx, 2
call fcn.14006d880
test al, al
jne 0x1400448c7
xor edi, edi
jmp 0x140044889
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
lea rdx, str....._third_partycrashpadcrashpadclientcrash_report_database_win.cc
lea rdi, [rsp + 0x30]
mov rcx, rdi
mov r8d, 0x251
mov r9d, 2
call fcn.1400dec20
lea rcx, [rsp + 0x40]
lea rdx, str.GetFileAttributes
mov r8d, 0x12
call fcn.1400c3d60
mov rcx, rax
mov rdx, rsi
call fcn.1400df950
mov rcx, rdi
call fcn.1400deca0
jmp 0x1400448c3
lea rdx, str....._third_partycrashpadcrashpadclientcrash_report_database_win.cc
lea rdi, [rsp + 0x30]
mov rcx, rdi
mov r8d, 0x255
mov r9d, 2
call fcn.140032aa0
lea rcx, [rsp + 0x40]
lea rdx, str.GetFileAttributes
mov r8d, 0x12
call fcn.1400c3d60
mov rcx, rax
mov rdx, rsi
call fcn.1400df950
lea rdx, str.:_not_a_directory
mov r8d, 0x11
mov rcx, rax
call fcn.1400c3d60
mov rcx, rdi
call fcn.1400330f0
jmp 0x1400448c3
Function at 0x140047160
Capabilities:
Set thread local storage value

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x50], rax
test rcx, rcx
je 0x1400473a0
movabs rax, 0xe69e32f3ad9ea63
cmp qword [0x14012fc70], rax
jne 0x1400473a3
mov rsi, rcx
mov r14d, dword [rcx + 8]
add r14, 0x518
mov byte [rsp + 0x3f], 0xaa
cmp byte [rcx + 2], 0
sete al
bsr rdx, r14
xor rdx, 0xffffffffffffffc0
lea rcx, [0x14011b4a0]
mov cl, byte [rdx + rcx + 0x41]
mov r8, r14
shr r8, cl
and r8d, 7
lea rcx, [0x14011b4f0]
mov rcx, qword [rcx + rdx*8 + 0x208]
and rcx, r14
lea rdx, [r8 + rdx*8]
add rdx, 0x208
cmp rcx, 1
sbb rdx, 0xffffffffffffffff
lea rcx, [0x14011ac80]
movzx ecx, word [rcx + rdx*2 + 0x400]
cmp cx, 0x6e
setb dl
and dl, al
movzx eax, dl
or eax, ecx
movzx eax, ax
lea r12, [rax + rax*4]
mov eax, r12d
lea r15, [rsi + rax*8]
add r15, 0x48
lea rdi, [rsi + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140047338
mov rax, qword [r15]
mov rbx, qword [rax]
test rbx, rbx
je 0x140047345
mov byte [rsp + 0x3f], 0
mov r8, qword [rbx]
test r8, r8
je 0x140047331
lea rdx, [rsi + 0x48]
mov r9d, r12d
mov rcx, r8
bswap rcx
mov r14d, dword [rdx + r9*8 + 0x18]
mov rdx, rcx
xor rdx, rbx
cmp rdx, 0x1fffff
ja 0x1400473ad
mov edx, ecx
and edx, 0x1fc000
je 0x1400473ad
prefetcht0 byte [rcx]
mov qword [rax], rcx
mov ecx, dword [rax + 0x18]
lea edx, [rcx + 2]
and edx, 0x3ffe
and ecx, 0xffffc001
or ecx, edx
mov dword [rax + 0x18], ecx
mov rax, qword [rax + 0x10]
mov eax, dword [rax + 0x18]
add rax, qword [rsi + 0x1498]
mov qword [rsi + 0x1498], rax
mov rcx, qword [rsi + 0x14a0]
cmp rcx, rax
cmova rax, rcx
mov qword [rsi + 0x14a0], rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rcx, rbx
mov rdx, rsi
call fcn.140078900
mov ecx, dword [0x14014266c]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x14013bda0]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 0x158], rbx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140090cc0
mov rax, rbx
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
xor ecx, ecx
jmp 0x140047292
mov rcx, rdi
call fcn.1400796d0
jmp 0x14004723c
lea rax, [rsp + 0x3f]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x4000
mov rcx, r15
mov rdx, rsi
mov r8d, 2
mov r9, r14
call fcn.140088910
test rax, rax
je 0x1400473a6
mov rbx, rax
and rax, 0xffffffffffe00000
mov ecx, ebx
shr ecx, 9
and ecx, 0xfe0
add rax, rcx
add rax, 0x1000
movzx ecx, byte [rax + 0x1e]
and ecx, 0x3f
shl ecx, 5
sub rax, rcx
jmp 0x1400472ac
int3
int3
xor ebx, ebx
jmp 0x1400472d6
movaps xmm0, xmmword [0x14010c370]
lea rsi, [rsp + 0x40]
movaps xmmword [rsi], xmm0
lea rdx, str.first
mov rcx, rsi
call fcn.1400e95c0
mov rcx, rsi
call fcn.140018990
mov rcx, r14
call fcn.1400f1170
int3
Function at 0x14004a590
Capabilities:
Create pipe

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x188
mov rsi, rcx
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x180], rax
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x50], rax
movaps xmm0, xmmword [0x14010c370]
movaps xmmword [rsp + 0x40], xmm0
test dl, dl
je 0x14004a67c
lea rdi, [rsp + 0x70]
xor ebx, ebx
mov r8d, 0x110
mov rcx, rdi
xor edx, edx
call fcn.140092e10
mov dword [rdi - 0xc], 0x11c
mov r14, qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
xor ecx, ecx
mov edx, 2
mov r8b, 3
call r14
mov rcx, rax
mov edx, 1
mov r8b, 3
call r14
mov rcx, rax
mov edx, 0x20
mov r8b, 3
call r14
mov qword [rdi - 8], 6
mov word [rdi + 0x108], 0
lea rcx, [rsp + 0x64]
mov edx, 0x23
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
mov edi, 0x80003
test eax, eax
je 0x14004a683
xorps xmm0, xmm0
lea rbx, [rsp + 0x40]
movaps xmmword [rbx], xmm0
mov qword [rbx + 0x10], 0
mov dword [rbx], 0x18
xor ecx, ecx
call fcn.14004a6e0
mov qword [rbx + 8], rax
mov dword [rbx + 0x10], 1
jmp 0x14004a683
mov edi, 3
xor ebx, ebx
cmp byte [rsi + 0x17], 0
jns 0x14004a68c
mov rsi, qword [rsi]
mov qword [rsp + 0x38], rbx
mov eax, 0x200
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x30], 0
mov rcx, rsi
mov edx, edi
mov r8d, 6
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rsi, rax
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.140090cc0
mov rax, rsi
add rsp, 0x188
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x14004c8a0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp r8, 0x30
ja 0x14004c9f1
mov r14, r8
mov r15, rdx
mov rsi, rcx
movaps xmm0, xmmword [0x14010c370]
lea rdi, [rsp + 0x40]
movaps xmmword [rdi], xmm0
movaps xmmword [rdi - 0x10], xmm0
movaps xmmword [rdi - 0x20], xmm0
lea r12, [rsp + 0x30]
lea rbx, [rcx + 0x108]
mov eax, dword [rcx + 0x114]
bswap eax
inc eax
bswap eax
mov dword [rcx + 0x114], eax
mov rax, qword [rcx + 0xf8]
lea rdx, [rsp + 0x20]
mov rcx, rbx
mov r8, rsi
call qword [0x14015a008]
mov eax, dword [rsi + 0x114]
bswap eax
inc eax
bswap eax
mov dword [rsi + 0x114], eax
mov rax, qword [rsi + 0xf8]
mov rcx, rbx
mov rdx, r12
mov r8, rsi
call qword [0x14015a008]
mov eax, dword [rsi + 0x114]
bswap eax
inc eax
bswap eax
mov dword [rsi + 0x114], eax
mov rax, qword [rsi + 0xf8]
mov rcx, rbx
mov rdx, rdi
mov r8, rsi
call qword [0x14015a008]
test r14, r14
je 0x14004c983
xor eax, eax
mov cl, byte [r15 + rax]
xor byte [rsp + rax + 0x20], cl
inc rax
cmp r14, rax
jne 0x14004c973
lea r14, [rsi + 0xf8]
mov ecx, 1
call fcn.140080f80
lea rcx, [rsp + 0x20]
mov edx, 0x100
mov r8, rsi
bt eax, 0x19
jae 0x14004c9f5
call fcn.140003260
lea rax, [0x140001d60]
test r14, r14
je 0x14004c9c2
lea rcx, section..text
mov qword [r14], rcx
mov qword [rsi + 0x100], rax
movups xmm0, xmmword [rdi]
movups xmmword [rbx], xmm0
mov esi, 1
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140090cc0
mov eax, esi
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
xor esi, esi
jmp 0x14004c9d4
bt eax, 9
jae 0x14004ca15
call fcn.140004350
lea rax, [0x140004820]
test r14, r14
je 0x14004c9c2
lea rcx, [0x140004520]
jmp 0x14004c9bf
call fcn.1400eb410
lea rax, [0x1400ebc10]
test r14, r14
je 0x14004c9c2
lea rcx, [0x1400eb2f0]
jmp 0x14004c9bf

Function at 0x140050010
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rax, qword [0x14012d038]
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 0x140050070
mov esi, dword [rsp + 0x2c]
cmp rsi, rdi
je 0x140050079
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140090cc0
mov rax, rsi
add rsp, 0x38
pop rdi
pop rsi
ret
mov rsi, 0xffffffffffffffff
jmp 0x140050059
int3
mov rcx, qword [rcx + 8]
jmp 0x140050010
Function at 0x140050080
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 [0x14012d038]
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 0x140050126
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x140050112
cmp eax, 0xffffffff
je 0x140050123
mov esi, eax
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140090cc0
mov rax, rsi
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rcx, rdi
call r12
cmp eax, 3
je 0x1400500c1
mov eax, dword [rsp + 0x2c]
jmp 0x1400500f2
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
cmp eax, 0x6d
setne sil
neg rsi
jmp 0x1400500f4

Function at 0x140050610
Capabilities:
Clear file content

Disassembly:
push rsi
push rdi
sub rsp, 0x178
mov rdi, rcx
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x170], rax
xor esi, esi
xor edx, edx
xor r8d, r8d
call fcn.140050510
test rax, rax
jne 0x14005064f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov sil, 1
test eax, eax
je 0x14005066b
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.140090cc0
mov eax, esi
add rsp, 0x178
pop rdi
pop rsi
ret
mov ecx, 2
call fcn.14006d880
test al, al
jne 0x14005067d
xor esi, esi
jmp 0x14005064f
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, 0xfc
mov r9d, 2
call fcn.1400dec20
lea rcx, [rsp + 0x40]
lea rdx, [0x14011c802]
mov r8d, 0xc
call fcn.1400c3d60
mov rcx, rsi
call fcn.1400deca0
jmp 0x140050679

Function at 0x140050b50
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rax, qword [0x14012d038]
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 0x140050070
mov esi, dword [rsp + 0x2c]
cmp rsi, rdi
je 0x140050079
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140090cc0
mov rax, rsi
add rsp, 0x38
pop rdi
pop rsi
ret
mov rsi, 0xffffffffffffffff
jmp 0x140050059
int3
mov rcx, qword [rcx + 8]
jmp 0x140050010

Function at 0x140050e30
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
sub rsp, 0x28
cmp qword [0x14014aae0], 0
jne 0x140050e6d
mov rsi, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140050e60
mov dword [rdi], eax
mov dword [0x14014aae8], eax
mov qword [0x14014aae0], rsi
cmp eax, 0xffffffff
setne al
add rsp, 0x28
pop rdi
pop rsi
ret
int3
Function at 0x140051a30
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 [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x30], rax
lea rax, [0x140051a00]
lea r8, [rsp + 0x28]
mov qword [r8], rax
lea rcx, [0x14014aaf8]
lea rdx, [0x1400518a0]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x140051b28
cmp dword [0x14014ab00], 0
jne 0x140051b35
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov ecx, dword [0x14014ab04]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r14, rax
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14, r14
jne 0x140051adc
mov ecx, 1
mov edx, 0x28
call fcn.140072190
test rax, rax
je 0x140051b35
mov r14, rax
mov ecx, dword [0x14014ab04]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140051b2d
lea r15, [0x14014ab08]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
movsxd rbx, ebx
lea rax, [0x14014ab10]
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.140090cc0
mov eax, esi
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
call fcn.1400a50c0
mov rcx, r14
call fcn.1400720f0
mov rcx, rsi
mov rax, rdi
call qword [0x14015a008]
xor esi, esi
jmp 0x140051b0c

Function at 0x140057fd0
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 [0x14013bd08]
cmp ecx, 0xffffffff
je 0x140057ff2
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test al, 3
jne 0x140057ff7
call fcn.140058120
mov eax, dword [0x14014fe20]
mov ecx, dword [0x14013bda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400580b0
mov rbx, qword [0x14014fe18]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1400580f9
mov rcx, qword [0x14014e600]
inc rcx
xor edx, edx
lea rax, [0x14014e610]
lea r8d, [rcx + rdx]
movzx r8d, r8b
lea r9, [r8 + r8*2]
mov r10d, r9d
cmp dword [rax + r10*8], 0
jne 0x140058106
lea rcx, [rax + r10*8]
mov dword [rcx], 1
mov ecx, r9d
mov qword [rax + rcx*8 + 8], rdi
mov edx, dword [0x14014fe10]
inc edx
mov dword [0x14014fe10], edx
mov dword [rax + rcx*8 + 0x14], edx
mov qword [0x14014e600], r8
mov qword [rsi], r8
mov eax, dword [rax + rcx*8 + 0x10]
mov dword [rsi + 8], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp qword [rsi], 0x100
jae 0x1400580f6
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
lea rcx, [0x14014fe20]
call fcn.14008f820
cmp dword [0x14014fe20], 0xffffffff
jne 0x14005801c
mov ecx, 8
call fcn.14008f6c4
mov rbx, rax
mov rcx, rax
call fcn.1400631f0
mov qword [0x14014fe18], rbx
lea rcx, [0x14014fe20]
call fcn.14008f8b8
jmp 0x14005801c
int3
mov rcx, rbx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
jmp 0x140058034
inc rdx
cmp rdx, 0x100
jne 0x140058047
jmp 0x140058096
Function at 0x140058120
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
mov eax, 0x1038
call fcn.140090c60
sub rsp, rax
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x1030], rax
mov dword [rsp + 0x2c], 0xaaaaaaaa
mov ecx, dword [0x14013bd08]
mov dword [rsp + 0x2c], ecx
cmp ecx, 0xffffffff
je 0x1400581d4
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test al, 3
jne 0x140058212
lea rsi, [rsp + 0x30]
mov r8d, 0x1000
mov rcx, rsi
xor edx, edx
call fcn.140092e10
mov ecx, dword [rsp + 0x2c]
lea rdx, [rsp + 0x33]
call sub.KERNEL32.dll_TlsSetValue
mov ecx, 0x1000
call fcn.14008f73c
mov rdi, rax
mov r8d, 0x1000
mov rcx, rax
mov rdx, rsi
call fcn.140092760
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.140090cc0
mov rax, rdi
add rsp, 0x1038
pop rdi
pop rsi
ret
lea rcx, [rsp + 0x2c]
call fcn.140058580
test al, al
je 0x140058215
mov ecx, dword [rsp + 0x2c]
cmp ecx, 0xffffffff
je 0x140058218
mov eax, 0xffffffff
lock cmpxchg dword [0x14013bd08], ecx
je 0x140058158
call sub.KERNEL32.dll_TlsFree
mov ecx, dword [0x14013bd08]
mov dword [rsp + 0x2c], ecx
jmp 0x140058158
int3
int3
lea rcx, [rsp + 0x2c]
call fcn.140058580
test al, al
je 0x14005823d
cmp dword [rsp + 0x2c], 0xffffffff
je 0x14005823d
mov ecx, 0xffffffff
call sub.KERNEL32.dll_TlsFree
mov ecx, dword [rsp + 0x2c]
jmp 0x1400581eb
int3

Function at 0x140058250
Capabilities:
Get thread local storage value

Disassembly:
push rsi
sub rsp, 0x50
mov rsi, rcx
mov rax, qword [0x14012d038]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ecx, dword [0x14013bd08]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
and ecx, 3
cmp ecx, 2
je 0x140058299
and rax, 0xfffffffffffffffc
je 0x1400582cc
mov rcx, qword [rsi]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 8]
jne 0x1400582cc
mov rsi, qword [rax + rcx]
jmp 0x1400582ce
lea rdx, [0x14011bd11]
lea r8, str....._base_threading_thread_local_storage.cc
lea rsi, [rsp + 0x28]
mov rcx, rsi
mov r9d, 0x1f6
call fcn.14006dbb0
movabs rdx, 0x141dd76000
mov rcx, rsi
call fcn.1400e7b60
xor esi, esi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140090cc0
mov rax, rsi
add rsp, 0x50
pop rsi
ret

Function at 0x1400582f0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdi, rdx
mov rsi, rcx
mov ecx, dword [0x14013bd08]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14005832e
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 0x140058327
call fcn.140058120
jmp 0x14005830e
Function at 0x140058370
Capabilities:
Reference processor manufacturer constants

Disassembly:
push rsi
push rdi
mov r8, rcx
xor edi, edi
xor eax, eax
xor ecx, ecx
xchg rbx, r9
cpuid
xchg rbx, r9
test eax, eax
jle 0x140058491
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 0x1400584cd
mov eax, 7
xor ecx, ecx
xchg rbx, rdi
cpuid
xchg rbx, rdi
mov r10d, ecx
and edi, 0x20
shr edi, 5
shr r10b, 4
and r10b, 1
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 0x1400584d5
xor ecx, ecx
xgetbv
not eax
test al, 6
sete al
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
and al, dil
mov byte [r8 + 0x16], al
mov byte [r8 + 0x18], r10b
xor ecx, ecx
mov eax, 0x80000000
xchg rbx, r9
cpuid
xchg rbx, r9
cmp eax, 0x80000006
jle 0x1400584c7
xor ecx, ecx
mov eax, 0x80000007
xchg rbx, r9
cpuid
xchg rbx, r9
shr edx, 8
and dl, 1
mov byte [r8 + 0x19], dl
test dl, dl
je 0x1400584d9
pop rdi
pop rsi
ret
mov dl, byte [r8 + 0x19]
jmp 0x1400584c0
xor r10d, r10d
jmp 0x1400583cf
xor eax, eax
jmp 0x140058464
cmp byte [r8 + 0x1a], 0
je 0x1400584c4
xor ecx, ecx
mov eax, 0x40000000
xchg rbx, r9
cpuid
xchg rbx, r9
cmp r9d, 0x7263694d
jne 0x1400584c4
cmp ecx, 0x666f736f
jne 0x1400584c4
cmp edx, 0x76482074
jne 0x1400584c4
mov byte [r8 + 0x19], 1
jmp 0x1400584c4

Function at 0x140058580
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140058595
mov dword [rsi], eax
cmp eax, 0xffffffff
setne al
add rsp, 0x20
pop rsi
ret