joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002f20
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140014b10]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002f40
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002f48
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002f40
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140002f95
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002f8c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002f40
add rax, 0x28
cmp rax, r9
jne 0x140002f78
xor eax, eax
ret

Function at 0x140002fa0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140014b10]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140002fc0
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002fc8
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x140002fc0
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x140003050
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140014b10]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140003070
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x140003078
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x140004840
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x140014b90]
mov rax, qword [rsi]
test rax, rax
je 0x1400048d0
cmp qword [rax + 0x30], 0
jne 0x1400048f0
lea rbx, [0x140013078]
mov qword [rax + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [rsi]
test rax, rax
je 0x1400048a0
cmp qword [rax + 0x30], 0
jne 0x1400048c0
lea rdx, [0x140013078]
mov qword [rax + 0x30], rdx
mov rax, rdx
cmp dword [rax], 0xffffffff
je 0x1400127f0
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.140009740
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140004882
test rax, rax
jne 0x1400048c0
call fcn.140009740
nop dword [rax]
mov rax, qword [rax + 0x30]
jmp 0x140004890
call fcn.140009740
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140004860
test rax, rax
jne 0x1400048f0
call fcn.140009740
nop dword [rax]
mov rbx, qword [rax + 0x30]
jmp 0x14000486b
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
mov rax, qword [pe_dos_header]
ud2
Function at 0x140004900
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov word [rsp + 0x88], ax
mov byte [rsp + 0x8a], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x140004a12
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x1400049ea
add rax, 1
cmp rax, 0x6b
je 0x140004a07
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x1400049e0
cmp edx, 0x6a
je 0x140004a07
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x1400049fb
Function at 0x140005420
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rsi, qword [0x140014b90]
mov rax, qword [rsi]
test rax, rax
je 0x140005610
cmp qword [rax + 0x28], 0
jne 0x1400055f8
lea rcx, [0x1400181d8]
cmp dword [rcx], 1
mov qword [rax + 0x28], rcx
je 0x140005605
call fcn.140004a30
mov rax, qword [rsi]
test rax, rax
je 0x1400054a0
cmp qword [rax + 0x30], 0
jne 0x1400054c0
lea rdx, [0x140013078]
mov qword [rax + 0x30], rdx
mov rax, rdx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x1400054d4
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140009740
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140005470
test rax, rax
jne 0x1400054c0
call fcn.140009740
nop dword [rax]
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
jne 0x14000548e
call fcn.140004570
cmp qword [0x14001b050], 0
mov rbx, rax
je 0x14000548e
test rax, rax
je 0x14000548e
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.14000b5e0
cmp eax, 1
je 0x14000567d
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1400127f6
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [rsi]
test rax, rax
je 0x140005658
cmp qword [rax + 0x30], 0
je 0x140005640
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400127f6
mov r12, rbx
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x14000545c
mov rax, qword [rsi]
jmp 0x140005469
call fcn.140009740
cmp qword [rax + 0x28], 0
mov rax, qword [rsi]
je 0x140005448
test rax, rax
jne 0x1400055f8
call fcn.140009740
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x14000545c
jmp 0x140005461
lea rdx, [0x140013078]
mov qword [rax + 0x30], rdx
mov rax, rdx
jmp 0x1400055ce
call fcn.140009740
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140005640
test rax, rax
jne 0x1400055ca
call fcn.140009740
jmp 0x1400055ca
call fcn.140004900
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [0x140014b90]
mov rdx, qword [rax]
lea rax, [0x1400181e8]
mov qword [rdx + 0x10], rax
ret
Function at 0x1400095c0
Capabilities:
Print debug messages

Disassembly:
push r12
push rbx
sub rsp, 0x58
mov r12, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400095e0
add rsp, 0x58
pop rbx
pop r12
ret
lea rdx, [rsp + 0x48]
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rdx
mov ecx, 0x1100
xor edx, edx
mov dword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x140009628
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1400095d4
int3
mov rcx, qword [rsp + 0x48]
mov rbx, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rbx
mov rcx, r12
call rbx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140009615
Function at 0x140009740
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x1400182c0]
mov dword [rsp + 0x2c], eax
lea rcx, [rsp + 0x2c]
lea r9, [rsp + 0x30]
movzx eax, byte [rcx]
add rcx, 1
add rdx, 2
mov r8d, eax
and eax, 0xf
shr r8b, 4
add eax, 0x61
add r8d, 0x41
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
cmp rcx, r9
jne 0x140009763
lea rax, [0x1400182c8]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x1a]
jmp 0x1400097ab
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x1400097a8
lea rax, [0x140018300]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x19]
jmp 0x1400097db
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x1400097d8
xor ecx, ecx
mov byte [0x140018319], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x140018322], rdx
lea r8, [0x1400182c0]
lea rbx, [0x14001831a]
mov qword [0x140018332], rdx
mov qword [0x140018342], rdx
mov qword [0x140018352], rdx
xor edx, edx
mov qword [0x14001831a], rax
mov qword [0x14001832a], rax
mov qword [0x14001833a], rax
mov qword [0x14001834a], rax
mov byte [0x14001835a], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400099b6
lea rcx, [0x140018300]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x140009901
lea rsi, [0x140018200]
lea r8, [0x14001835a]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x1400098ad
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x1400098a0
lea rcx, [0x140018300]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x1400099a3
lea rcx, [0x140009650]
mov qword [0x140018200], rsi
call sub.msvcrt.dll__onexit
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140018200]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x5b
lea rdx, [0x140018300]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x14001835a]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x1400099d6
nop dword [rax]
cmp byte [rax], 0x41
jne 0x140009953
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x140009940
mov rax, rdx
mov qword [0x140018200], rax
lea rsi, [0x140018200]
jmp 0x140009979
cmp rdx, rsi
je 0x1400098df
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x140009970
cmp rdx, rsi
je 0x1400098df
mov qword [rdx + 8], rsi
lea rcx, [0x140009650]
call sub.msvcrt.dll__onexit
jmp 0x1400098df
lea rcx, str.failed_to_add_string_to_atom_table_n
call fcn.1400095c0
xor eax, eax
jmp 0x1400098f8
lea rcx, str.failed_to_to_lock_creation_mutex_n
call fcn.1400095c0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
lea rcx, str.failed_to_get_string_from_atom_n
call fcn.1400095c0
xor eax, eax
jmp 0x14000995f
Function at 0x140001160
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov rsi, qword [0x1400c6048]
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x1400011b9
cmp rdi, rax
je 0x1400011b9
mov r14, qword [sym.imp.KERNEL32.dll_Sleep]
nop word [rax + rax]
mov ecx, 0x3e8
call r14
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x1400011b9
cmp rdi, rax
jne 0x1400011a0
mov rdi, qword [0x1400c6050]
mov eax, dword [rdi]
cmp eax, 1
jne 0x1400011d3
mov ecx, 0x1f
call fcn.1400556f0
jmp 0x1400011fa
cmp dword [rdi], 0
je 0x1400011e1
mov byte [0x1400f2460], 1
jmp 0x1400011fa
mov dword [rdi], 1
mov rcx, qword [0x1400c6068]
mov rdx, qword [0x1400c6070]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov eax, dword [rdi]
cmp eax, 1
jne 0x14000121a
mov rcx, qword [0x1400c6058]
mov rdx, qword [0x1400c6060]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rdi], 2
test bl, bl
je 0x140001223
xor eax, eax
xchg qword [rsi], rax
mov rax, qword [0x1400c6010]
mov rax, qword [rax]
test rax, rax
je 0x140001242
xor ecx, ecx
mov edx, 2
xor r8d, r8d
call qword [0x142261008]
call fcn.140054c20
lea rcx, [0x1400551b0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [0x1400c6040]
mov qword [rcx], rax
lea rcx, [0x140001390]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.140054c10
movsxd rdi, dword [0x1400f244c]
lea rcx, [rdi*8 + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rsi, rax
test rdi, rdi
jle 0x1400012d2
mov ebx, edi
mov r14, qword [0x1400f2450]
xor r15d, r15d
nop word [rax + rax]
mov rcx, qword [r14 + r15*8]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rdi, [rax + 1]
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsi + r15*8], rax
mov rdx, qword [r14 + r15*8]
mov rcx, rax
mov r8, rdi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
inc r15
cmp rbx, r15
jne 0x1400012a0
jmp 0x1400012d4
xor ebx, ebx
mov qword [rsi + rbx*8], 0
mov qword [0x1400f2450], rsi
call fcn.140054a60
mov rax, qword [0x1400f2458]
mov rcx, qword [0x1400c6018]
mov rcx, qword [rcx]
mov qword [rcx], rax
mov ecx, dword [0x1400f244c]
mov rdx, qword [0x1400f2450]
mov r8, qword [0x1400f2458]
call fcn.1400880b0
mov dword [0x1400f2464], eax
cmp dword [0x1400f2444], 0
je 0x140001344
cmp byte [0x1400f2460], 0
jne 0x140001338
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x1400f2464]
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
int3
Function at 0x140001a40
Capabilities:
Get thread local storage value
Print debug messages
Set thread local storage value

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xb8
mov r15, qword [0x1400c61a0]
mov rax, qword [r15]
xor rax, rsp
mov qword [rsp + 0xb0], rax
call fcn.140003330
mov ecx, dword [0x1400f2010]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
jne 0x140001b87
call fcn.1400038c0
mov rsi, rax
xor eax, eax
cmp qword [0x1400daec0], 0
je 0x140001b87
test rsi, rsi
je 0x140001b87
mov dword [rsi + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rsi + 0x70], eax
xor ecx, ecx
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0x30], rax
mov qword [rsi + 0x38], 0xffffffffffffffff
lea rcx, [rsi + 0x68]
call fcn.140055c90
cmp eax, 1
je 0x140001bb5
mov qword [rsi + 0x68], 0xffffffffffffffff
mov dword [rsi + 0xb8], 0
mov rdi, rsi
add rdi, 0x28
mov qword [rsi + 0x28], 0
mov r12, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call r12
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r14, rax
call r12
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
mov rdx, r14
mov r8, rax
mov r9, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x140001bb0
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rsi + 0xc0], eax
mov dword [rsi + 0xbc], 0
mov eax, dword [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov dword [rsi + 0x40], eax
mov ecx, dword [0x1400f2010]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, eax
mov rax, rsi
test ecx, ecx
je 0x140001bb0
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
mov rdx, qword [r15]
cmp rdx, rcx
jne 0x140001bab
add rsp, 0xb8
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
call fcn.140055cf0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
movups xmm0, xmmword [0x1400c618b]
movups xmmword [rsp + 0x9b], xmm0
movaps xmm0, xmmword [0x1400c6180]
movaps xmmword [rsp + 0x90], xmm0
movaps xmm0, xmmword [0x1400c6170]
movaps xmmword [rsp + 0x80], xmm0
movaps xmm0, xmmword [0x1400c6160]
movaps xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [0x1400c6150]
movaps xmmword [rsp + 0x60], xmm0
movaps xmm0, xmmword [0x1400c6140]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [str.Error_cleaning_up_spin_keys_for_thread]
movaps xmmword [rsp + 0x40], xmm0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x67]
mov ecx, eax
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ultoa]
mov eax, 0x27
mov rcx, rax
inc rax
cmp rcx, 0x69
ja 0x140001c43
cmp byte [rsp + rcx + 0x40], 0
jne 0x140001c30
cmp rcx, 0x69
ja 0x140001c50
mov word [rsp + rax + 0x3f], 0xa
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3
Function at 0x1400027b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, rcx
call fcn.140001a40
mov rdi, rax
mov qword [rax + 8], rsi
mov rcx, qword [rax + 0x1d8]
call fcn.1400024d0
test byte [rdi + 0x40], 0x30
jne 0x1400027ec
add rdi, 0xd0
mov rcx, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_longjmp]
mov ecx, dword [0x1400f2010]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140002887
mov rdi, rax
cmp qword [rax + 0x28], 0
jne 0x14000282e
mov dword [rdi], 0xdeadbeef
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x140002820
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x30], 0
mov rsi, qword [rdi + 8]
jmp 0x140002871
mov rsi, qword [rdi + 8]
mov rcx, qword [rdi + 0x30]
mov dword [rdi + 0xbc], 1
test rcx, rcx
je 0x14000284b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x30], 0
test byte [rdi + 0x44], 4
je 0x140002887
mov dword [rdi], 0xdeadbeef
mov rcx, qword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x28], 0
mov rcx, rdi
call fcn.140002890
mov ecx, dword [0x1400f2010]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__endthreadex]
int3

Function at 0x140003330
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
sub rsp, 0x28
cmp dword [0x1400f2494], 1
jne 0x140003346
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x1400f2018]
call fcn.140055ca0
mov rcx, qword [0x1400f24b8]
test rcx, rcx
je 0x140003383
lea rax, [0x1400f2494]
nop word cs:[rax + rax]
mov rsi, rcx
cmp qword [rcx], rax
je 0x1400033cd
mov rcx, qword [rsi + 0x18]
test rcx, rcx
jne 0x140003370
jmp 0x140003385
xor esi, esi
mov ecx, 1
mov edx, 0x20
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
mov rdi, rax
lea rax, [0x1400f2494]
mov qword [rdi], rax
mov dword [rdi + 0x10], 1
lea rax, [rsi + 0x18]
test rsi, rsi
lea rcx, [0x1400f24b8]
cmovne rcx, rax
mov qword [rcx], rdi
lea rcx, [rdi + 8]
xor edx, edx
call fcn.140055a70
mov rsi, rdi
jmp 0x1400033d0
inc dword [rsi + 0x10]
lea rcx, [0x1400f2018]
call fcn.140055ce0
lea rdi, [rsi + 8]
mov rcx, rdi
call fcn.1400557f0
mov eax, dword [0x1400f2494]
cmp eax, 1
je 0x14000343c
test eax, eax
jne 0x140003414
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400f2010], eax
cmp eax, 0xffffffff
je 0x140003452
mov dword [0x1400f2494], 1
jmp 0x14000343c
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, dword [0x1400f2494]
lea r8, [0x1400f2494]
lea rdx, str._once__p_is__d_n
mov rcx, rax
call fcn.140056360
mov rcx, rdi
call fcn.140055960
mov rcx, rsi
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.140002060
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3
Function at 0x140003970
Capabilities:
Print debug messages

Disassembly:
push rsi
push rdi
sub rsp, 0x98
mov rdi, qword [0x1400c61a0]
mov rax, qword [rdi]
xor rax, rsp
mov qword [rsp + 0x90], rax
test rcx, rcx
je 0x1400039a7
mov rsi, rcx
call fcn.140055c90
cmp eax, 1
je 0x1400039c9
mov qword [rsi], 0xffffffffffffffff
mov rax, qword [rsp + 0x90]
xor rax, rsp
mov rcx, qword [rdi]
cmp rcx, rax
jne 0x1400039c4
add rsp, 0x98
pop rdi
pop rsi
ret
call fcn.140055cf0
movups xmm0, xmmword [0x1400c618b]
movups xmmword [rsp + 0x7b], xmm0
movaps xmm0, xmmword [0x1400c6180]
movaps xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [0x1400c6170]
movaps xmmword [rsp + 0x60], xmm0
movaps xmm0, xmmword [0x1400c6160]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x1400c6150]
movaps xmmword [rsp + 0x40], xmm0
movaps xmm0, xmmword [0x1400c6140]
movaps xmmword [rsp + 0x30], xmm0
movaps xmm0, xmmword [str.Error_cleaning_up_spin_keys_for_thread]
movaps xmmword [rsp + 0x20], xmm0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov ecx, eax
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ultoa]
mov eax, 0x27
nop dword [rax + rax]
mov rcx, rax
inc rax
cmp rcx, 0x69
ja 0x140003a53
cmp byte [rsp + rcx + 0x20], 0
jne 0x140003a40
cmp rcx, 0x69
ja 0x140003a60
mov word [rsp + rax + 0x1f], 0xa
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3
Function at 0x140003a80
Capabilities:
Print debug messages

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0xb0
mov r15, qword [0x1400c61a0]
mov rax, qword [r15]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov edi, 3
test rcx, rcx
je 0x140003b3e
mov rsi, rdx
mov rbx, rcx
lea rcx, section..data
call fcn.1400557f0
mov rcx, qword [0x1400f24a0]
test rcx, rcx
je 0x140003b32
cmp rcx, 1
jne 0x140003ae7
mov rax, qword [0x1400f24a8]
cmp qword [rax + 8], rbx
jne 0x140003b32
jmp 0x140003b69
dec rcx
mov rax, qword [0x1400f24a8]
xor edx, edx
jmp 0x140003b0b
inc r8
mov rdx, r8
cmp rdx, rcx
ja 0x140003b32
lea r8, [rdx + rcx]
shr r8, 1
mov r9, r8
shl r9, 4
cmp qword [rax + r9 + 8], rbx
je 0x140003b66
jbe 0x140003b00
cmp r8, rdx
je 0x140003b32
dec r8
mov rcx, r8
cmp rdx, rcx
jbe 0x140003b0b
lea rcx, section..data
call fcn.140055960
mov rax, qword [rsp + 0xa8]
xor rax, rsp
mov rcx, qword [r15]
cmp rcx, rax
jne 0x140003c42
mov eax, edi
add rsp, 0xb0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
add rax, r9
mov r14, qword [rax]
lea rcx, section..data
call fcn.140055960
test r14, r14
je 0x140003b3e
mov rcx, qword [r14 + 0x28]
test rcx, rcx
je 0x140003b3e
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140003b3e
mov edi, 0x16
test byte [r14 + 0x44], 4
jne 0x140003b3e
call fcn.140001a40
test rax, rax
je 0x140003bb4
mov rax, qword [rax + 0x1d8]
jmp 0x140003bb6
xor eax, eax
mov edi, 0x24
cmp rax, rbx
je 0x140003b3e
cmp dword [r14 + 0xbc], 0
mov rcx, qword [r14 + 0x28]
je 0x140003bdc
lea rax, [rcx + 1]
cmp rax, 2
jb 0x140003beb
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [r14 + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r14 + 0x30]
test rcx, rcx
je 0x140003c00
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r14 + 0x30], 0
test rsi, rsi
je 0x140003c14
mov rax, qword [r14 + 8]
mov qword [rsi], rax
lea rcx, [r14 + 0x38]
call fcn.140055b00
lea rcx, [r14 + 0x68]
call fcn.140055c90
cmp eax, 1
je 0x140003c47
mov qword [r14 + 0x68], 0xffffffffffffffff
mov rcx, r14
call fcn.140002890
xor edi, edi
jmp 0x140003b3e
call fcn.140055cf0
movups xmm0, xmmword [0x1400c618b]
movups xmmword [rsp + 0x8b], xmm0
movaps xmm0, xmmword [0x1400c6180]
movaps xmmword [rsp + 0x80], xmm0
movaps xmm0, xmmword [0x1400c6170]
movaps xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [0x1400c6160]
movaps xmmword [rsp + 0x60], xmm0
movaps xmm0, xmmword [0x1400c6150]
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x1400c6140]
movaps xmmword [rsp + 0x40], xmm0
movaps xmm0, xmmword [str.Error_cleaning_up_spin_keys_for_thread]
movaps xmmword [rsp + 0x30], xmm0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x57]
mov ecx, eax
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ultoa]
mov eax, 0x27
mov rcx, rax
inc rax
cmp rcx, 0x69
ja 0x140003cd2
cmp byte [rsp + rcx + 0x30], 0
jne 0x140003cbf
cmp rcx, 0x69
ja 0x140003cdf
mov word [rsp + rax + 0x2f], 0xa
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3