joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140080730
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.140087a00
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x1400807a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1401f3864]
test esi, esi
mov rbx, rcx
jle 0x1400808d0
mov rax, qword [0x1401f3868]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400807eb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140080875
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400807d0
mov rcx, rbx
call fcn.140081210
test rax, rax
mov rdi, rax
je 0x1400808f2
mov rax, qword [0x1401f3868]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140081350
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1401f3868]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400808d7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14008086e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140080880
add dword [0x1401f3864], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x1401f3868]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14008086e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140080730
nop dword [rax]
xor esi, esi
jmp 0x1400807f8
mov rax, qword [0x1401f3868]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.140080730
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.140080730
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140080e60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1401f38c0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1401f38a0]
test rbx, rbx
je 0x140080ebc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140080eb3
test rsi, rsi
je 0x140080eb3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140080e98
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400810d0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140081108
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140081110
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400810e0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140081108
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140081110
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400810f0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140081108
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140081110
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140081210
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1401e0410]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140081230
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140081238
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140081230
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14008128d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x140081284
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140081230
add rax, 0x28
cmp rax, r9
jne 0x140081270
xor eax, eax
ret

Function at 0x140081290
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401e0410]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400812af
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400812b8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400812af
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140081350
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1401e0410]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14008136f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140081378
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140082570
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x138
mov rbx, rcx
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
test rbx, rbx
mov dword [rax], 0
je 0x1400826b0
cmp byte [rbx], 0
je 0x140082678
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1400826c0
test al, 0x10
je 0x140082678
lea rdi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rdi
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__fullpath
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea rcx, [rax + 0x24b]
mov rsi, rax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
test rax, rax
mov rbx, rax
je 0x1400826cf
lea rbp, [rsi + 1]
mov rdx, rdi
lea rcx, [rax + 0x244]
mov r8, rbp
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp byte [rbx + 0x244], 0
mov rcx, rax
je 0x140082620
movzx eax, byte [rbx + rsi + 0x243]
cmp al, 0x5c
je 0x140082620
cmp al, 0x2f
jne 0x140082698
lea rdx, [rbx + 0x130]
mov eax, 0x2a
mov word [rcx + rsi], ax
mov rdi, rdx
xor eax, eax
mov ecx, 0x20
mov qword [rbx + 0x238], 0xffffffffffffffff
mov dword [rbx + 0x240], 0
mov qword [rbx + 0x128], 0
rep stosq qword [rdi], rax
mov rax, rbx
mov dword [rdi], 0
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
xor ebx, ebx
mov dword [rax], 0x14
mov rax, rbx
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edx, 0x5c
mov word [rcx + rsi], dx
mov rsi, rbp
jmp 0x140082620
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x140082685
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x140082685
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x140082685
Function at 0x1400affa0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x1400b5580]
jmp 0x140082070
Function at 0x14000277c
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [0x14003c768]
test rax, rax
je 0x14000278f
call rax
mov ecx, 2
call qword [fcn.140016de0]
mov r8d, 0xe
mov edx, 1
lea rcx, str.out_of_memory_n
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call sub.msvcrt.dll_fflush
mov ecx, 1
call sub.msvcrt.dll_exit
nop

Function at 0x140004b1e
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [0x140032dc0]
cmp rax, 0xdab
jle 0x140004b6c
mov ecx, 2
call qword [fcn.140016de0]
mov r8d, 0x4b
mov edx, 1
lea rcx, str._GC__cannot_register_thread_local_variable__too_many_thread_local_variables
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call sub.msvcrt.dll_fflush
mov ecx, 1
call sub.msvcrt.dll_exit
lea rdx, [0x14002c060]
mov qword [rdx + rax*8], rcx
inc rax
mov qword [0x140032dc0], rax
add rsp, 0x20
pop rbx
ret

Function at 0x140007113
Capabilities:
Allocate or change rwx memory
Copy file
Delete file
Execute shellcode via indirect call

Disassembly:
push rsi
push rbx
sub rsp, 0x48
mov r9d, 0x40
mov r8d, 0x1000
mov rbx, rdx
mov rsi, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8, rbx
mov rdx, rsi
lea rbx, str.C:WindowsTemp_backup.log
mov rcx, rax
call sub.msvcrt.dll_memmove
xor edx, edx
mov rcx, rbx
mov r9, rax
mov eax, 0x8000001
mov qword [rsp + 0x38], rdx
shl rax, 5
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x20], rax
xor eax, eax
mov qword [rsp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea r8, [rsp + 0x20]
mov rdx, rbx
lea rcx, str.C:WindowsDirectX.log
call qword [sym.imp.KERNEL32.dll_CopyFile2]
nop

Function at 0x140010680
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140016de0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140016de0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x1400106f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14003d0b4]
mov rbx, rcx
test esi, esi
jle 0x140010820
mov rax, qword [0x14003d0b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001073b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400107c5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140010720
mov rcx, rbx
call fcn.140011140
mov rdi, rax
test rax, rax
je 0x140010842
mov rax, qword [0x14003d0b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140011280
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14003d0b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140010827
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400107be
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400107d0
add dword [0x14003d0b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14003d0b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400107be
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140010680
nop dword [rax]
xor esi, esi
jmp 0x140010748
mov rax, qword [0x14003d0b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140010680
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140010680
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140010db0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14003d120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14003d100]
test rbx, rbx
je 0x140010e0c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140010e03
test rsi, rsi
je 0x140010e03
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010de8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140011140
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400250a0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140011160
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140011168
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140011160
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400111bd
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400111b4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140011160
add rax, 0x28
cmp rax, r9
jne 0x1400111a0
xor eax, eax
ret

Function at 0x1400111c0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400250a0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400111df
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400111e8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400111df
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140011280
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400250a0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14001129f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400112a8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140011d70
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov ecx, 2
mov r8d, 0x2d
lea rdx, str._buffer_overflow_detected_:_terminated_n
call sub.msvcrt.dll__write
mov ecx, 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
test eax, eax
je 0x140011da0
mov ecx, 8
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x140017ee0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0xa8
mov rax, qword [0x140025160]
mov rdx, qword [rax]
mov qword [rsp + 0x98], rdx
xor edx, edx
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x78], 0
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 + 0x48], rdx
mov qword [rsp + 0x40], rax
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 + 0x7b], 0
mov qword [rsp + 0x83], 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 0x140017ffa
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x140017fd2
add rax, 1
cmp rax, 0x6b
je 0x140017fef
cmp byte [rcx + rax], 0
jne 0x140017fc8
movsxd rdx, eax
cmp eax, 0x6a
je 0x140017fef
add eax, 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 0x140017fe3
Function at 0x140018390
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x14003dc20], 1
je 0x140018408
lea rdi, [0x14003dc20]
mov rcx, rdi
call fcn.140017c60
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.1400175e0
mov esi, dword [0x14003dc20]
test esi, esi
jne 0x140018418
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1400204b8], eax
cmp eax, 0xffffffff
je 0x14001f466
mov dword [0x14003dc20], 1
mov rcx, rbp
call fcn.1400178d0
test rbx, rbx
je 0x140018408
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.140018010
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x1400183e8
mov ecx, 2
call qword [fcn.140016de0]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x1400183e8
call sub.msvcrt.dll_abort
nop

Function at 0x140018440
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.140018120
cmp qword [0x140040048], 0
mov rbx, rax
je 0x140018558
test rax, rax
je 0x140018558
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.14001b8c0
cmp eax, 1
je 0x140018566
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 rsi, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rsi
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 fcn.14001f46c
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1400204b8]
mov rdx, rbx
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
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14001856c
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.140017ee0
nop
jmp fcn.14001f46c

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

Disassembly:
sub rsp, 0x28
call fcn.140018390
mov ecx, dword [0x1400204b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400185a0
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.140018440
Function at 0x140018d60
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, qword [0x140025160]
mov rax, qword [rbp]
mov qword [rsp + 0x38], rax
mov eax, dword [rcx]
mov rbx, rcx
mov rsi, rdx
test rdx, rdx
je 0x140018ea8
cmp eax, 1
je 0x140018dcd
call fcn.140017c60
lea r12, [rax + 8]
mov rdi, rax
mov rcx, r12
call fcn.1400175e0
mov r13d, dword [rbx]
test r13d, r13d
je 0x140018df0
cmp r13d, 1
jne 0x140018e80
mov rcx, r12
call fcn.1400178d0
test rdi, rdi
je 0x140018dcd
mov rcx, rdi
call fcn.140018010
xor eax, eax
mov rdx, qword [rsp + 0x38]
sub rdx, qword [rbp]
jne 0x140018efb
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea rax, [0x1400180f0]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140018390
mov ecx, dword [0x1400204b8]
mov r13, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call r13
test rax, rax
je 0x140018ee8
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call fcn.140018390
mov ecx, dword [0x1400204b8]
call r13
test rax, rax
je 0x140018ed0
lea rdx, [rsp + 0x20]
mov qword [rax + 0x18], rdx
lock or qword [rsp], 0
call rsi
call fcn.140018390
mov ecx, dword [0x1400204b8]
call r13
test rax, rax
je 0x140018eb8
mov rdx, qword [rsp + 0x30]
mov qword [rax + 0x18], rdx
mov dword [rbx], 1
jmp 0x140018db8
mov ecx, 2
call qword [fcn.140016de0]
mov r9d, r13d
mov r8, rbx
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140018db8
mov eax, 0x16
jmp 0x140018dcf
call fcn.140018440
test rax, rax
jne 0x140018e69
jmp 0x14001f49e
call fcn.140018440
test rax, rax
jne 0x140018e45
jmp 0x14001f48f
call fcn.140018440
test rax, rax
jne 0x140018e1f
jmp 0x14001f485
call fcn.14001cf80
nop
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [pe_dos_header]
ud2
lea rax, [rsp + 0x20]
mov qword [0], rax
ud2
mov rax, qword [rsp + 0x30]
mov qword [0], rax
ud2

Function at 0x140019180
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov esi, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.140018390
mov ecx, dword [0x1400204b8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400191f8
lea rbp, [rbx + 0x68]
xor r12d, r12d
mov rcx, rbp
call fcn.14001b8d0
cmp esi, dword [rbx + 0x48]
jae 0x1400191d3
mov rax, qword [rbx + 0x58]
cmp byte [rax + rsi], 0
je 0x1400191d3
mov rax, qword [rbx + 0x50]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call fcn.14001b910
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140018440
mov rbx, rax
jmp 0x1400191ad