joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400026f0
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140002760
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14019b0a4]
mov rbx, rcx
test esi, esi
jle 0x140002890
mov rax, qword [0x14019b0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400027ab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002835
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002790
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x1400028b2
mov rax, qword [0x14019b0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14019b0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002897
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14000282e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140002840
add dword [0x14019b0a4], 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 [0x14019b0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000282e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x1400027b8
mov rax, qword [0x14019b0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002e40
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14019b100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14019b0e0]
test rbx, rbx
je 0x140002e9c
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 rsi, rsi
je 0x140002e93
test eax, eax
jne 0x140002e93
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002e78
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 0x1400030b0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400030c8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400030d0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400030e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000312d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140003124
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000312f
add rax, 0x28
cmp rax, r9
jne 0x140003110
xor eax, eax
ret

Function at 0x140003130
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400031c0
mov rdx, qword [0x1401537d0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400031ae
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400031ae
cmp word [rax + 0x18], 0x20b
jne 0x1400031ae
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400031c0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140003199
add rbx, 0x28
cmp rbx, rdi
je 0x1400031c0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140003190
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

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

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

Function at 0x140003250
Capabilities:
Parse pe header

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

Disassembly:
mov r8, qword [0x1401537d0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400032b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400032b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400032b0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140003300
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400032f7
test rcx, rcx
je 0x1400032b0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x1400032e8
xor eax, eax
ret

Function at 0x140003310
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x1401537d0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003370
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003378
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003370
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140003370
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x1400033c4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400033d0
add rdx, 0x28
cmp rdx, r9
jne 0x1400033b0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x1401537d0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140003402
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140003410
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003402
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140003402
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140003402
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140003465
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140003478
add rdx, 0x28
cmp r10, rdx
jne 0x140003450
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140003487
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140003497
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000346e
test ecx, ecx
jg 0x140003480
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140004210
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x230
mov rbx, rcx
call sym._errno
mov dword [rax], 0
test rbx, rbx
je 0x140004370
cmp word [rbx], 0
je 0x140004360
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140004380
test al, 0x10
je 0x140004360
lea rsi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rsi
lea rdi, [0x140152440]
lea rbp, [0x140152444]
call sym.unk_6549
mov rcx, rsi
call sym.wcslen
mov rcx, rdi
mov rbx, rax
call sym.wcslen
mov rcx, rbp
add rbx, rax
call sym.wcslen
lea rcx, [rbx + rax + 0x229]
add rcx, rcx
call sym.malloc
mov rbx, rax
test rax, rax
je 0x14000438f
lea r12, [rax + 0x44c]
mov rdx, rsi
mov rcx, r12
call sym.wcscpy
cmp word [rbx + 0x44c], 0
jne 0x140004328
mov rdx, rbp
mov rcx, r12
call sym.wcscat
lea rdx, [rbx + 0x238]
mov ecx, 0x41
xor eax, eax
mov qword [rbx + 0x440], 0xffffffffffffffff
mov rdi, rdx
mov dword [rbx + 0x448], 0
mov qword [rbx + 0x230], 0
rep stosq qword [rdi], rax
mov rax, rbx
add rsp, 0x230
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, r12
call sym.wcslen
cmp word [rbx + rax*2 + 0x44a], 0x2f
je 0x1400042d2
mov rcx, r12
call sym.wcslen
cmp word [rbx + rax*2 + 0x44a], 0x5c
je 0x1400042d2
mov rdx, rdi
mov rcx, r12
call sym.wcscat
jmp 0x1400042d2
call sym._errno
xor ebx, ebx
mov dword [rax], 0x14
jmp 0x140004311
call sym._errno
xor ebx, ebx
mov dword [rax], 0xe
jmp 0x140004311
call sym._errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x140004311
call sym._errno
xor ebx, ebx
mov dword [rax], 0xc
jmp 0x140004311
Function at 0x140004940
Capabilities:
Enumerate disk volumes
Get disk information
Get disk size
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov ebp, ecx
mov rsi, rdx
cmp ecx, 0xffffffff
je 0x140004b70
test rdx, rdx
js 0x140004b70
call sym.unk_6560
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140004ba0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x140004ba0
mov ecx, ebp
call sym._telli64
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x140004b70
lea rdx, [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140004ba0
cmp qword [rsp + 0x68], rsi
jb 0x140004a30
xor r9d, r9d
mov qword [rsp + 0x70], rsi
lea r8, [rsp + 0x74]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1400049e9
cmp dword [rsp + 0x70], 0xffffffff
jne 0x140004b84
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x140004b70
mov rdx, qword [rsp + 0x48]
xor r8d, r8d
mov ecx, ebp
call sym.unk_6489
cmp rax, 0xffffffffffffffff
je 0x140004b70
xor eax, eax
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x140004b70
mov edx, 2
mov ecx, 0x33
call sym.calloc
mov edx, 2
mov ecx, 0x106
mov rbx, rax
call sym.calloc
mov r12, rax
test rbx, rbx
je 0x140004ba0
test rax, rax
je 0x140004ba0
mov edx, 0x32
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
mov r14, qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov r15, qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
mov r13, rax
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x40], rax
jmp 0x140004ac7
mov r8d, 0x32
mov rdx, rbx
mov rcx, r13
call r15
test eax, eax
je 0x140004b58
mov dword [rsp + 0x38], 0
mov rdx, r12
mov rcx, rbx
mov r9, qword [rsp + 0x40]
mov qword [rsp + 0x30], 0
mov r8d, 0x105
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call r14
mov eax, dword [rsp + 0x5c]
cmp dword [rsp + 0x8c], eax
jne 0x140004ab0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov rcx, r12
call sym.free
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov rcx, rbx
mov r12d, eax
call sym.free
test r12d, r12d
je 0x140004b91
mov rax, rsi
sub rax, qword [rsp + 0x68]
cmp qword [rsp + 0x60], rax
jae 0x1400049c1
jmp 0x140004b91
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov rcx, rbx
xor ebx, ebx
call sym.free
jmp 0x140004b14
mov ecx, 0x16
call dbg._set_errno
mov eax, 0xffffffff
jmp 0x140004a15
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x83
jne 0x140004b70
mov ecx, 0x1b
call dbg._set_errno
jmp 0x140004b7a
mov ecx, 9
call dbg._set_errno
jmp 0x140004b7a
Function at 0x14000cf70
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
lea rcx, str.msvcrt.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rsi, qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.rand_s
mov rcx, rax
call rsi
test rax, rax
je 0x14000cfb8
mov rcx, rbx
mov qword [dbg.init_rand_s], rax
add rsp, 0x28
pop rbx
pop rsi
jmp rax
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.SystemFunction036
mov rcx, rax
call rsi
mov qword [0x14019bc80], rax
lea rax, [dbg.mingw_rand_s]
jmp 0x14000cf9e

Function at 0x14000f830
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140148168], eax
cmp eax, 0xffffffff
je sym.unk_6386
add rsp, 0x28
ret

Function at 0x14000f850
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 + 0x48], rdx
mov qword [rsp + 0x78], 0
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 0x14000f952
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14000f92a
add rax, 1
cmp rax, 0x6b
je 0x14000f947
cmp byte [rcx + rax], 0
jne 0x14000f920
lea edx, [rax + 1]
cmp eax, 0x6a
je 0x14000f947
cdqe
mov byte [rsp + rax + 0x20], 0xa
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x28
mov eax, 0x27
lea rcx, [rsp + 0x20]
jmp 0x14000f938
Function at 0x14000feb0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x14019bd20], 1
je 0x14000ff56
lea rdi, [0x140148150]
lea rsi, [0x14019bd20]
mov rcx, rdi
call sym.unk_6381
mov rbx, qword [0x14019bcd0]
test rbx, rbx
jne 0x14000ff00
jmp 0x1400100f3
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x1400100c0
mov rbx, rax
cmp qword [rbx], rsi
jne 0x14000fef0
add dword [rbx + 0x10], 1
lea rsi, [rbx + 8]
mov rcx, rdi
call sym.unk_6383
mov rcx, rsi
call sym.unk_6363
mov edi, dword [0x14019bd20]
test edi, edi
jne 0x14000ff80
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x140148168], eax
cmp eax, 0xffffffff
je sym.unk_6394
mov dword [0x14019bd20], 1
mov rcx, rsi
call sym.unk_6365
mov rcx, rbx
call sym.unk_6388
mov ecx, dword [0x140148168]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x14000ffb0
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp edi, 1
je 0x14000ff46
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r9d, edi
lea r8, [0x14019bd20]
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sym.fprintf
jmp 0x14000ff46
call sym.unk_6392
cmp qword [sym.unk_6398], 0
mov rsi, rax
je 0x14000ff6a
test rax, rax
je 0x14000ff6a
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rsi + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0x38], 0xffffffffffffffff
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x30], rax
call sym.unk_6380
cmp eax, 1
je 0x140010118
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsi + 0x68], 0xffffffffffffffff
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, rbx
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rsi + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je sym.unk_6394
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x140148168]
mov rdx, rsi
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je sym.unk_6394
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edx, 0x20
mov ecx, 1
call sym.calloc
mov qword [rax], rsi
mov dword [rax + 0x10], 1
mov qword [rbx + 0x18], rax
mov rbx, rax
lea rsi, [rbx + 8]
xor edx, edx
mov rcx, rsi
call sym.unk_6367
jmp 0x14000ff0d
mov edx, 0x20
mov ecx, 1
call sym.calloc
mov qword [rax], rsi
mov rbx, rax
mov dword [rax + 0x10], 1
mov qword [0x14019bcd0], rax
jmp 0x1400100e0
call sym.unk_6387
nop
nop
Function at 0x1400105a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
test edx, edx
jne 0x1400105c0
test r8, r8
je 0x140010670
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
ret
cmp edx, 1
je 0x1400106a0
cmp edx, 3
jne 0x1400105b3
mov ecx, dword [0x140148168]
cmp ecx, 0xffffffff
je 0x1400105b3
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
je 0x1400105b3
test byte [rax + 0x40], 0x30
je 0x1400106c8
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
je 0x140010602
call sym.unk_6395
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140010627
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001061f
call rsi
pxor xmm0, xmm0
movups xmmword [rbx + 0x28], xmm0
lea rcx, [rbx + 0x38]
call sym.unk_6368
lea rcx, [rbx + 0x68]
call sym.unk_6380
cmp eax, 1
je 0x14001079c
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x14001078f
mov ecx, dword [0x140148168]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1400105b3
mov rcx, qword [0x14019bce0]
test rcx, rcx
je 0x1400105b3
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x14019bce0], 0
jmp 0x1400105b3
lea rdx, [sym.unk_6384]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x14019bce0], rax
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
ret
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x140010740
test rcx, rcx
je 0x1400106e1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x1d8]
mov qword [rbx + 0x30], 0
mov dword [rbx + 0xbc], 1
test rcx, rcx
je 0x140010704
call sym.unk_6395
test byte [rbx + 0x44], 4
je 0x140010780
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x140010627
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.unk_6368
lea rcx, [rbx + 0x68]
jmp 0x140010634
test rcx, rcx
je 0x140010780
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x30], 0
lea rcx, [rbx + 0x38]
call sym.unk_6368
lea rcx, [rbx + 0x68]
call sym.unk_6380
cmp eax, 1
je 0x14001079c
mov qword [rbx + 0x68], 0xffffffffffffffff
jmp 0x1400105b3
lea rcx, [rbx + 0x38]
call sym.unk_6368
lea rcx, [rbx + 0x68]
jmp 0x140010760
mov rcx, rbx
call sym.unk_6390
jmp 0x140010658
call sym.unk_6387
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x1400117a0
Capabilities:
Hijack thread execution

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4f8
mov rbx, rcx
test rcx, rcx
je 0x140011800
lea rdi, [0x140148158]
mov rcx, rdi
call sym.unk_6363
mov rax, qword [0x14019bcf8]
test rax, rax
je 0x1400117f0
mov r9, qword [0x14019bd00]
lea r8, [rax - 1]
xor ecx, ecx
cmp rax, 1
jne 0x140011826
cmp rbx, qword [r9 + 8]
je 0x1400119f5
nop dword [rax + rax]
mov rcx, rdi
call sym.unk_6365
nop dword [rax + rax]
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp rcx, rax
je 0x1400117f0
lea r8, [rax - 1]
cmp r8, rcx
jb 0x1400117f0
lea rax, [rcx + r8]
shr rax, 1
mov rdx, rax
shl rdx, 4
add rdx, r9
cmp rbx, qword [rdx + 8]
je 0x140011848
jb 0x140011818
lea rcx, [rax + 1]
jmp 0x140011821
mov rsi, qword [rdx]
mov rcx, rdi
call sym.unk_6365
test rsi, rsi
je 0x140011800
mov rcx, qword [rsi + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140011800
lea rdi, [rsp + 0x20]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x140011800
lea rbp, [rsi + 0x38]
mov rcx, rbp
call sym.unk_6363
call sym.unk_6393
test rax, rax
je 0x140011897
cmp rbx, qword [rax + 0x1d8]
je 0x1400118e0
mov edx, dword [rsi + 0x44]
movzx eax, byte [rsi + 0x40]
not edx
and edx, 3
je 0x140011958
test al, 3
jne 0x140011938
and eax, 0xfffffffc
or eax, 1
mov byte [rsi + 0x40], al
lock add dword [0x14019bd28], 1
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x1400118d1
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.unk_6365
xor eax, eax
jmp 0x140011805
movzx eax, byte [rsi + 0x40]
test al, 3
jne 0x140011938
and eax, 0xfffffffc
or eax, 1
mov byte [rsi + 0x40], al
lock add dword [0x14019bd28], 1
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140011908
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rsi + 0x44]
mov edx, eax
not edx
and edx, 3
jne 0x1400118d1
and eax, 0xfffffffe
mov rcx, rbp
mov dword [rsi + 0x44], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xfffffff3
or eax, 4
mov byte [rsi + 0x40], al
call sym.unk_6365
call sym.unk_6423
nop dword [rax]
mov rcx, rbp
call sym.unk_6365
test byte [rsi + 0x40], 0xc
jne 0x140011800
xor eax, eax
jmp 0x140011805
test al, 0xc
jne 0x140011938
test al, 0xf
jne 0x140011800
mov rcx, qword [rsi + 0x28]
mov dword [rsp + 0x50], 0x100001
call qword [sym.imp.KERNEL32.dll_SuspendThread]
xor edx, edx
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1400118d1
mov rcx, qword [rsi + 0x28]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym.unk_6423]
mov rcx, qword [rsi + 0x28]
mov rdx, rdi
mov qword [rsp + 0x118], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
movzx eax, byte [rsi + 0x40]
and dword [rsi + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rsi + 0x40], al
lock add dword [0x14019bd28], 1
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x1400119de
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbp
call sym.unk_6365
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x1400118d1
mov rsi, qword [r9]
jmp 0x14001184b