joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140005d20
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x1401f9a00]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x140005d58
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140005dc0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x140005dd0
mov esi, dword [0x1401fc1d8]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x140005e40
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x140005e88
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x140005d47
mov rcx, rbx
call fcn.140005c20
mov qword [rsi + r12*8 + 8], rax
jmp 0x140005d47
call fcn.140005c20
mov qword [rbx + 0x10], rax
jmp 0x140005d47
mov r10d, dword [rsi]
test r10d, r10d
je 0x140005eea
mov r9d, dword [0x1401f81b0]
test r9d, r9d
je 0x140005f18
lock add dword [0x1401fc1e0], 1
jne 0x140005f4c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x140005ef7
mov eax, dword [rsi]
test eax, eax
je 0x140005d61
lock sub dword [0x1401fc1e0], 1
js 0x140005d61
mov rcx, qword [0x1401fc1e8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x140005d61
lea rcx, [r12 + 0x21]
mov edx, 8
call sub.msvcrt.dll_calloc
lea rdi, [r12 + 0x20]
test rax, rax
mov rsi, rax
je 0x140005f73
mov qword [rax], rdi
mov ecx, dword [0x1401fc1d8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x140005d9b
call r13
jmp 0x140005d9b
lea rdi, [rbp + rbp]
mov rcx, rsi
lea rax, [r12 + 0x20]
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
test rax, rax
mov rsi, rax
je 0x140005f73
mov qword [rax], rdi
lea rcx, [rax + rbp*8 + 8]
sub rdi, rbp
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x140005e63
call fcn.140005cc0
mov dword [0x1401f81b0], 1
mov edx, dword [rsi]
test edx, edx
jne 0x140005dec
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x140005d61
mov rax, qword [0x1401fc1d0]
lea r12, [rax + 1]
mov qword [0x1401fc1d0], r12
mov qword [rbx + 0x10], r12
jmp 0x140005e07
lock add dword [0x1401f81b4], 1
je 0x140005ed1
mov r8d, dword [0x1401f81b0]
lea rdi, [0x1401f81b0]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
test r8d, r8d
jne 0x140005ee0
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140005f40
jmp 0x140005ee0
mov rcx, qword [0x1401fc1e8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140005dfa
lock sub dword [0x1401fc1e0], 1
jmp 0x140005dfa
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x140005f90
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x140005f9a
mov qword [rcx + 8], r8
test r9, r9
je 0x140005fa4
cmp qword [rcx], rdx
je 0x140005fa8
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x140009770
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file
Terminate process

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x70
movaps xmmword [rsp + 0x60], xmm6
lea rsi, [0x14001f3fc]
lea rdi, [0x140030120]
mov rcx, qword [0x1400270a8]
movq xmm6, rdi
movq xmm0, rsi
punpcklqdq xmm6, xmm0
test rcx, rcx
je 0x1400097c7
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400097e8
mov rcx, qword [0x1400270a8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x140030108], 0
jne 0x140009800
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x70
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, qword [0x1400270a8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x1400097ba
mov edx, 0x414
lea r12, [rsp + 0x20]
mov qword [rsp + 0x20], 0
mov rbp, qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov dword [rsp + 0x28], 3
mov rcx, r12
mov ebx, 0x14
mov word [rsp + 0x40], dx
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], rsi
movaps xmmword [rsp + 0x30], xmm6
call rbp
mov r13, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r14, qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400098b4
test al, 0x10
je 0x1400097d0
mov ecx, 0x64
call r14
mov eax, 0x414
mov qword [rsp + 0x50], rsi
mov rcx, r12
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x28], 3
mov word [rsp + 0x40], ax
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x48], 0
movaps xmmword [rsp + 0x30], xmm6
call rbp
sub ebx, 1
je 0x1400097d0
mov rcx, rdi
call r13
cmp eax, 0xffffffff
jne 0x140009860
jmp 0x1400097d0
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004a9570]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004a9580]
mov dword [rax], 1
mov rax, qword [0x004a9590]
mov dword [rax], 1
mov rax, qword [0x004a9560]
mov dword [rax], 1
mov rax, qword [0x004a9420]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004a9550]
mov dword [0x004cd008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004a9510]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004a88c0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x40b210
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004cd624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40b398
mov rax, qword [0x004cd628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40b25c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40b2e5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40b240
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40b3cd
mov rax, qword [0x004cd628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004cd628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40b3b0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40b2de
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40b340
add dword [0x004cd624], 1
cmp edi, 8
jae 0x40b313
test dil, 4
jne 0x40b384
test edi, edi
je 0x40b308
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40b39f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x40b308
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40b32c
jmp 0x40b308
add rsi, qword [0x004cd628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40b2de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40b308
xor esi, esi
jmp 0x40b267
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40b308
mov rax, qword [0x004cd628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x40bb20
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004cd900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004cd8e0]
test rbx, rbx
je 0x40bb74
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40bb6b
test rsi, rsi
je 0x40bb6b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40bb50
lea rcx, [0x004cd900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40bdb0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x40bdc0
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x40bdd0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40be11
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x40be08
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40be13
add rax, 0x28
cmp rax, r9
jne 0x40bdf4
xor eax, eax
ret

Function at 0x40beb0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004a9420]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40bf1d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40bf1d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40bf1d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40bf14
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40bf1f
add rax, 0x28
cmp rax, r9
jne 0x40bf00
xor eax, eax
add rsp, 0x28
ret

Function at 0x40c020
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004a9420]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40c040
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c038
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40c09d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40c094
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40c0a4
add rax, 0x28
cmp rax, r9
jne 0x40c080
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40c0c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004a9420]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40c12e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c12e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40c12e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40c12e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x40c125
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40c135
add rcx, 0x28
cmp rcx, rax
jne 0x40c110
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40c148
jmp 0x40c12e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40c156
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40c12e
test r9d, r9d
jg 0x40c140
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x418820
Capabilities:
Allocate thread local storage

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

Function at 0x418d40
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x418d63
call sym.pthread_spin_destroy
cmp eax, 1
je 0x418d6e
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x418de5
mov eax, 0x28
jmp 0x418dca
add rax, 1
cmp rax, 0x6b
je 0x418dd7
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x418dc0
cmp eax, 0x6a
jne 0x418dea
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x418dd7

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x004ce3e0], 1
je 0x418ea6
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x004a1148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x418ed0
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rsi, rax
je 0x418eba
test rax, rax
je 0x418eba
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 [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call sym.replace_spin_keys.constprop.10
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x418fc0
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a1148]
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 0x418fc0
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.abort
nop
nop word cs:[rax + rax]
Function at 0x419130
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test edx, edx
jne 0x419151
test r8, r8
je 0x4191f0
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x419220
cmp edx, 3
jne 0x419144
mov ecx, dword [0x004a1148]
cmp ecx, 0xffffffff
je 0x419144
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x419144
test byte [rax + 0x40], 0x30
je 0x419240
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x419335
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x4191bf
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x4191af
call rsi
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
jne 0x4192cc
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x4192cc
mov rcx, qword [0x004ce3a0]
test rcx, rcx
je 0x419144
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x004ce3a0], 0
jmp 0x419144
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x004ce3a0], rax
jmp 0x419144
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x4192e0
test rcx, rcx
je 0x41925d
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
jne 0x419310
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x419320
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x4192a6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
mov qword [rbx + 0x28], 0
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
je 0x4191df
xor edx, edx
mov ecx, dword [0x004a1148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x419144
test rcx, rcx
je 0x4192eb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
mov qword [rbx + 0x30], 0
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
jmp 0x419144
call sym._pthread_cleanup_dest.part.8
jmp 0x41927f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x419144
call sym._pthread_cleanup_dest.part.8
jmp 0x419192
Function at 0x419340
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x28
mov qword [rbp + 0x28], rcx
lea rcx, [0x004a1138]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
cmp dword [0x004ce3e0], 1
je 0x419379
call sym._pthread_once_raw.part.5.constprop.11
mov rdx, qword [rbp + 0x28]
mov ecx, dword [0x004a1148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rsi, qword [rbp + 0x28]
mov rcx, rbx
mov dword [rsi + 0x70], eax
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rdx, rbp
lea rcx, [rax + 0xd0]
call sym._setjmp
test eax, eax
je 0x41944d
lea rcx, [0x004a1138]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x30]
mov rsi, qword [rax + 8]
test rcx, rcx
je 0x4193ec
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x4194a7
mov rcx, rbx
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
mov rax, qword [rbp + 0x28]
mov qword [rax + 0x38], 0xffffffffffffffff
mov dword [rax + 0xbc], 1
mov rbx, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x004a1138]
mov rcx, rdi
call sym.pthread_mutex_unlock
test eax, eax
jne 0x4194f1
xor ecx, ecx
call rbx
jmp 0x419437
lea rcx, [0x004a1138]
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x4194f9
mov rdi, qword [rbp + 0x28]
mov rcx, qword [rdi + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x004a1138]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
je 0x4193c5
call sym._pthread_cleanup_dest.part.8
jmp 0x4193c5
mov rax, qword [rbp + 0x28]
mov rcx, rbx
mov dword [rax], 0xdeadbeef
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
cmp qword [rbp + 0x28], 0
je 0x4194de
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x1d0], 0
jne 0x4194de
mov rcx, rax
call sym.push_pthread_mem.part.2
xor edx, edx
mov ecx, dword [0x004a1148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x419429
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
mov ebx, pe_nt_image_headers64
jmp 0x419477
Function at 0x41a080
Capabilities:
Hijack thread execution

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4f8
mov rsi, rcx
call sym.__pth_gpointer_locked
test rax, rax
mov rbx, rax
je 0x41a14a
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x41a14a
lea rbp, [rsp + 0x20]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x41a14a
lea rdi, [rbx + 0x38]
mov rcx, rdi
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
xor edx, edx
test rax, rax
je 0x41a0e6
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
movzx eax, byte [rbx + 0x40]
je 0x41a134
mov edx, dword [rbx + 0x44]
and edx, 3
cmp edx, 3
je 0x41a160
test al, 3
jne 0x41a13c
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock add dword [0x004ce3e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41a11e
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
test al, 3
je 0x41a1f5
mov rcx, rdi
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
je 0x41a126
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
test al, 0xc
jne 0x41a13c
test al, 0xf
jne 0x41a14a
mov rcx, qword [rbx + 0x28]
mov dword [rsp + 0x50], 0x100001
call qword [sym.imp.KERNEL32.dll_SuspendThread]
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x41a11e
mov rcx, qword [rbx + 0x28]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, rbp
mov qword [rsp + 0x118], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
movzx eax, byte [rbx + 0x40]
and dword [rbx + 0x44], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [rbx + 0x40], al
lock add dword [0x004ce3e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41a1de
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x41a11e
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock add dword [0x004ce3e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41a215
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
and edx, 3
cmp edx, 3
jne 0x41a11e
and eax, 0xfffffffe
mov rcx, rdi
mov dword [rbx + 0x44], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xfffffff3
or eax, 4
mov byte [rbx + 0x40], al
call sym.pthread_mutex_unlock
call sym._pthread_invoke_cancel
nop
nop word [rax + rax]
Function at 0x41a250
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov esi, edx
lea rcx, [0x004a1138]
call sym.pthread_mutex_lock
mov rcx, rbx
call sym.__pthread_get_pointer
test rax, rax
je 0x41a2c1
cmp qword [rax + 0x1d8], rbx
jne 0x41a2c1
test byte [rax + 0x40], 0xc
jne 0x41a2c1
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x41a2c1
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x41a2c1
lea rcx, [0x004a1138]
call sym.pthread_mutex_unlock
test esi, esi
je 0x41a2e0
sub esi, 2
cmp esi, 0x15
ja 0x41a2e4
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
jmp sym.pthread_cancel
lea rcx, [0x004a1138]
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x28
pop rbx
pop rsi
ret
xor eax, eax
jmp 0x41a2d2
mov eax, 0x16
jmp 0x41a2d2