joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000b540
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 [0x14001c760]
mov rax, qword [rsi]
test rax, rax
je 0x14000b730
cmp qword [rax + 0x28], 0
jne 0x14000b718
lea rcx, [0x14001f3c8]
cmp dword [rcx], 1
mov qword [rax + 0x28], rcx
je 0x14000b725
call fcn.14000ab50
mov rax, qword [rsi]
test rax, rax
je 0x14000b5c0
cmp qword [rax + 0x30], 0
jne 0x14000b5e0
lea rdx, [0x140019468]
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 0x14000b5f4
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.14000f860
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x14000b590
test rax, rax
jne 0x14000b5e0
call fcn.14000f860
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 0x14000b5ae
call fcn.14000a690
cmp qword [0x140022050], 0
mov rbx, rax
je 0x14000b5ae
test rax, rax
je 0x14000b5ae
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.140011700
cmp eax, 1
je 0x14000b79d
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 0x140018216
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 0x14000b778
cmp qword [rax + 0x30], 0
je 0x14000b760
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140018216
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 0x14000b57c
mov rax, qword [rsi]
jmp 0x14000b589
call fcn.14000f860
cmp qword [rax + 0x28], 0
mov rax, qword [rsi]
je 0x14000b568
test rax, rax
jne 0x14000b718
call fcn.14000f860
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x14000b57c
jmp 0x14000b581
lea rdx, [0x140019468]
mov qword [rax + 0x30], rdx
mov rax, rdx
jmp 0x14000b6ee
call fcn.14000f860
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x14000b760
test rax, rax
jne 0x14000b6ea
call fcn.14000f860
jmp 0x14000b6ea
call fcn.14000aa20
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [0x14001c760]
mov rdx, qword [rax]
lea rax, [0x14001f3d8]
mov qword [rdx + 0x10], rax
ret
Function at 0x14000f6e0
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 0x14000f700
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 0x14000f748
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x14000f6f4
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 0x14000f735
Function at 0x14000f860
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x14001f4c0]
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 0x14000f883
lea rax, [0x14001f4c8]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x1a]
jmp 0x14000f8cb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x14000f8c8
lea rax, [0x14001f500]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x19]
jmp 0x14000f8fb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x14000f8f8
xor ecx, ecx
mov byte [0x14001f519], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x14001f522], rdx
lea r8, [0x14001f4c0]
lea rbx, [0x14001f51a]
mov qword [0x14001f532], rdx
mov qword [0x14001f542], rdx
mov qword [0x14001f552], rdx
xor edx, edx
mov qword [0x14001f51a], rax
mov qword [0x14001f52a], rax
mov qword [0x14001f53a], rax
mov qword [0x14001f54a], rax
mov byte [0x14001f55a], 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 0x14000fad6
lea rcx, [0x14001f500]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x14000fa21
lea rsi, [0x14001f400]
lea r8, [0x14001f55a]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x14000f9cd
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x14000f9c0
lea rcx, [0x14001f500]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x14000fac3
lea rcx, [0x14000f770]
mov qword [0x14001f400], 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 [0x14001f400]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x5b
lea rdx, [0x14001f500]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x14001f55a]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x14000faf6
nop dword [rax]
cmp byte [rax], 0x41
jne 0x14000fa73
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x14000fa60
mov rax, rdx
mov qword [0x14001f400], rax
lea rsi, [0x14001f400]
jmp 0x14000fa99
cmp rdx, rsi
je 0x14000f9ff
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x14000fa90
cmp rdx, rsi
je 0x14000f9ff
mov qword [rdx + 8], rsi
lea rcx, [0x14000f770]
call sub.msvcrt.dll__onexit
jmp 0x14000f9ff
lea rcx, str.failed_to_add_string_to_atom_table_n
call fcn.14000f6e0
xor eax, eax
jmp 0x14000fa18
lea rcx, str.failed_to_to_lock_creation_mutex_n
call fcn.14000f6e0
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.14000f6e0
xor eax, eax
jmp 0x14000fa7f
Function at 0x1415842ca
Capabilities:
Parse pe header

Disassembly:
neg qword [rsp + rbp - 0xa4]
mov rsi, qword [rsp + rbp - 0x9c]
add dword [rsp + rbp*2 - 0x15d], 0x6fa83c26
movsxd r11, r11d
adc r10, r11
call fcn.1415ca1d8
mov r8d, dword [rdi]
mov r9d, 0x8e309f3a
mov r11d, 0xe72b8e97
shr r11d, 0xa4
mov edx, dword [rdi + r11*2 - 0x1ce571ce]
movzx ecx, r11w
or cl, 0xa2
mov cl, byte [rdi + r11*2 - 0x1ce571ca]
jae 0x141601d0c

Function at 0x1415cea75
Capabilities:
Parse pe header

Disassembly:
or si, 0x2cbc
shr rdx, 0x76
movsxd r8, r8d
adc r11, r8
mov si, word [r10 + rax - 0x11ec55]
call fcn.141653e83

Function at 0x1415f6426
Capabilities:
Execute anti-debugging instructions

Disassembly:
not dword [rsp + 9]
lea rsp, [rsp + 0x10]
jmp 0x14164e95a

Function at 0x1416028b8
Capabilities:
Parse pe header

Disassembly:
mov edi, dword [rdx + r9 - 0x559d1528]
lea r9, [r9 + rdx - 0x559d1524]
jmp 0x1416381fd
mov ecx, esi
movsxd rdx, edx
call fcn.14161b43b
pop rbx
movsxd rax, eax
mov edi, ebp
neg ecx
ror r8d, cl
adc r11, rax
sal di, 0x4d
js 0x141604b40
mov qword [rsp + rcx*2], rdx
movsxd rax, eax
not r11
jle 0x141612199
mov rax, r10
sub r10, 4
mov edx, 0x559d1528
mov dword [r10 + rdx - 0x559d1528], eax
jmp 0x1415d0b37
xor dx, dx
xor edi, ebx
call fcn.14163face
push 0x7704e889
mov edi, dword [rsp + 1]
mov edx, dword [r9 + rdi*8 - 0x3b82740]
dec qword [rsp + rdi - 0x7704e8]
jl 0x141629c4e
lea r9, [r9 + rdi - 0x7704e4]
inc word [rsp + rdi - 0x7704e5]
or qword [rsp + rdi - 0x7704e8], rdi
xor edx, ebx
shl dil, 0x45
bswap edx
not edx
sal dword [rsp + rdi - 0x7703ff], 0xec
not rdi
push rdi
dec edx
jmp 0x141652d45
neg dword [rsp + rdi*8 + 0x3b82011]
ror edx, 1
and qword [rsp + rdi + 0x770401], rdi
mov qword [rsp + rdi + 0x770409], rbx
movsx esi, word [rsp + rdi + 0x770403]
add dword [rsp + rdi + 0x770403], esi
xor dword [rsp + rdi*8 + 0x3b82010], edx
and byte [rsp + rdi*8 + 0x3b8200c], dil
mov rbx, qword [rsp + rdi + 0x770409]
jl 0x1415db719
mov edx, 0x2d3071ac
mov r8d, edx
mov eax, dword [r9 + r8*2 - 0x5a60e358]
lea r9, [r9 + rdx*2 - 0x5a60e354]
lea rcx, [rdx*8 - 0xb52aeea]
xor eax, ebx
bswap r8d
sub eax, 0x6b9c980d
ror eax, 1
movsx esi, r8b
movsx ebp, si
and edx, 0x3681f981
lea eax, [rax + rdx*4 - 0x7952cfe4]
ror eax, 2
push rbx
lea rbx, [rsi + 0x162ca8ab]
sar bl, 0x26
xor dword [rsp + rdx - 0x24007180], eax
jmp 0x1415f1647

Function at 0x14165a53f
Capabilities:
Encode data using xor

Disassembly:
neg r8d
mov qword [rsp + rbx*4 - 0x39a40], rdx
mov qword [rsp + rbx - 0xe680], r11
xor dword [rsp + rbx - 0xe680], r8d
pop r10
call fcn.1415b85f8
jb 0x141645134
Function at 0x61c4be70
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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.61c5bb10
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.61c5bb10
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x61c4bee0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x61e725e4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x61c4c088
mov rax, qword [0x61e725e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x61c4bf2c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x61c4bfb7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x61c4bf10
mov rcx, r12
call fcn.61c4cbe0
mov rbp, rax
test rax, rax
je 0x61c4c0c2
mov rax, qword [0x61e725e8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call fcn.61c4cd10
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x61e725e8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x61c4c0d1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x61c4bfb0
sub eax, 4
and eax, 0xfffffffb
jne 0x61c4c040
add dword [0x61e725e4], 1
cmp ebx, 8
jae 0x61c4bfe8
test bl, 4
jne 0x61c4c090
test ebx, ebx
je 0x61c4bfd9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x61c4c0b0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x61c4bfd9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x61c4c01a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rdi, qword [0x61e725e8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x61c4bfb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.61c4be70
nop dword [rax]
xor edi, edi
jmp 0x61c4bf37
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x61c4bfd9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x61c4bfd9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.61c4be70
mov rax, qword [0x61e725e8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call fcn.61c4be70
nop
nop dword [rax]
Function at 0x61c4c850
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x61e728c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x61e728a0]
test rbx, rbx
je 0x61c4c8a4
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x61c4c89b
test r12, r12
je 0x61c4c89b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x61c4c880
lea rcx, [0x61e728c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x61c4cbe0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x61e14a00]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x61c4cc59
mov rcx, r10
call fcn.61c4cab0
test eax, eax
je 0x61c4cc59
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x61c4cc56
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x61c4cc4d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x61c4cc59
add r8, 0x28
cmp r8, r9
jne 0x61c4cc38
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x61c4d1e0
Capabilities:
Allocate thread local storage

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x61c4d210
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp fcn.61c61280
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x61c4d250
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x61c4d290
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x61c4d2a8
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x61c4dce0
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, qword [rcx + 8]
mov rdi, qword [rcx]
mov rbx, rcx
cmp rsi, 8
ja 0x61c4dc90
lea rcx, [rdi + 8]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x61c4dcd2
mov rdx, qword [rbx + 0x18]
mov qword [rax], rax
lea r9, [rax + 8]
mov r8, rdi
test rdx, rdx
je 0x61c4dcba
mov rcx, r9
call sub.msvcrt.dll_memcpy
mov r9, rax
mov rax, r9
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rsi + rdi + 7]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x61c4dcd2
lea r9, [rax + rsi + 7]
neg rsi
mov r8, rdi
and r9, rsi
mov qword [r9 - 8], rax
mov rdx, qword [rbx + 0x18]
test rdx, rdx
jne 0x61c4dc78
mov rcx, r9
xor edx, edx
call sub.msvcrt.dll_memset
mov r9, rax
mov rax, r9
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
sub rsp, 0x28
xor ecx, ecx
xor r9d, r9d
mov r8d, 0xffff
mov dword [0x61e72910], 0xffffffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x61e72918], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x61c4dd30
lea rdx, [0x61c4dbf0]
mov dword [0x61e72908], eax
call fcn.61c61280
test eax, eax
jne 0x61c4dd38
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x61c4dd27
call sub.msvcrt.dll_abort
nop
nop
Function at 0x61c4dd40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r13, qword [0x61e14880]
mov r11d, dword [r13]
mov r12, rcx
test r11d, r11d
jne 0x61c4dd80
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x61c4dde8
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rbx, qword [rcx + 0x10]
test rbx, rbx
je 0x61c4de00
mov r13d, dword [0x61e72908]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rsi
mov r14d, eax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r14d
mov r13, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r13, r13
je 0x61c4de78
mov r14, qword [r13]
cmp r14, rbx
jb 0x61c4dec0
lea r13, [r13 + rbx*8]
mov rax, qword [r13]
test rax, rax
jne 0x61c4dd69
mov rcx, r12
call fcn.61c4dc40
mov qword [r13], rax
jmp 0x61c4dd69
call fcn.61c4dc40
mov qword [r12 + 0x10], rax
jmp 0x61c4dd69
mov r10d, dword [r13]
test r10d, r10d
je 0x61c4df22
mov r9d, dword [0x61df9170]
test r9d, r9d
je 0x61c4df50
lock add dword [0x61e72910], 1
jne 0x61c4df84
mov rbx, qword [r12 + 0x10]
test rbx, rbx
je 0x61c4df30
mov eax, dword [r13]
test eax, eax
je 0x61c4dd89
mov eax, 0xffffffff
lock xadd dword [0x61e72910], eax
sub eax, 1
js 0x61c4dd89
mov rcx, qword [0x61e72918]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x61c4dd89
lea rcx, [rbx + 0x21]
mov edx, 8
lea rdi, [rbx + 0x20]
call sub.msvcrt.dll_calloc
mov r13, rax
test rax, rax
je 0x61c4dfab
mov qword [rax], rdi
mov ecx, dword [0x61e72908]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x61c4ddc7
call rsi
jmp 0x61c4ddc7
lea rdi, [r14 + r14]
lea rax, [rbx + 0x20]
mov rcx, r13
cmp rbx, rdi
cmova rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov r13, rax
test rax, rax
je 0x61c4dfab
mov qword [rax], rdi
sub rdi, r14
lea rcx, [rax + r14*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x61c4de99
call 0x61c4dce0
mov dword [0x61df9170], 1
mov edx, dword [r13]
test edx, edx
jne 0x61c4de1d
mov rbx, qword [r12 + 0x10]
test rbx, rbx
jne 0x61c4dd89
mov rax, qword [0x61e72900]
lea rbx, [rax + 1]
mov qword [0x61e72900], rbx
mov qword [r12 + 0x10], rbx
jmp 0x61c4de39
lock add dword [0x61df9174], 1
je 0x61c4df07
mov r8d, dword [0x61df9170]
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
lea rbx, [0x61df9170]
test r8d, r8d
jne 0x61c4df16
nop dword [rax]
xor ecx, ecx
call rsi
mov ecx, dword [rbx]
test ecx, ecx
je 0x61c4df78
jmp 0x61c4df16
mov rcx, qword [0x61e72918]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x61c4de2b
lock sub dword [0x61e72910], 1
jmp 0x61c4de2b
call sub.msvcrt.dll_abort
nop
nop word cs:[rax + rax]
nop dword [rax]
cmp qword [rcx], rdx
jae 0x61c4dfd0
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x61c4dfda
mov qword [rcx + 8], r8
test r9, r9
je 0x61c4dfe4
cmp qword [rcx], rdx
je 0x61c4dfe8
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x61c5da10
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x61df9268], eax
cmp eax, 0xffffffff
je 0x61df8780
add rsp, 0x28
ret
call sub.msvcrt.dll_abort
nop

Function at 0x61c5e070
Capabilities:
Print debug messages

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, rcx
test rcx, rcx
je 0x61c5e095
call fcn.61c5d8d0
cmp eax, 1
je 0x61c5e0a2
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop r12
ret
lea r12, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
mov rdi, r12
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
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 0x61c5e128
mov eax, 0x28
jmp 0x61c5e0fa
add rax, 1
cmp rax, 0x6b
je 0x61c5e11a
cmp byte [r12 + rax], 0
mov edx, eax
jne 0x61c5e0f0
cmp eax, 0x6a
je 0x61c5e11a
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov edx, 0x27
jmp 0x61c5e108

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

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x61e73380], 1
je 0x61c5e147
call fcn.61c5dfe0
mov ecx, dword [0x61df9268]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x61c5e170
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call fcn.61c5df10
cmp qword [0x61e78040], 0
mov rbx, rax
je 0x61c5e15b
test rax, rax
je 0x61c5e15b
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
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.61c5e070
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rdi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rdi
mov dword [rsp + 0x30], 2
mov r8, rsi
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 0x61df8786
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x61df9268]
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 0x61df8786
mov r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call sub.msvcrt.dll_abort
nop
mov rax, qword [pe_dos_header]
ud2