joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18004d7f0
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x50
mov rbx, rdx
mov r8d, 0x30
lea rdx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
nop
mov eax, 0x5a4d
mov rcx, qword [rsp + 0x28]
cmp word [rcx], ax
je 0x18004d81e
xor al, al
jmp 0x18004d860
movsxd rdx, dword [rcx + 0x3c]
cmp dword [rdx + rcx], 0x4550
je 0x18004d82f
xor al, al
jmp 0x18004d860
mov r8d, dword [rdx + rcx + 0xe8]
lea rax, [r8 + rcx]
cmp rbx, rax
jb 0x18004d856
mov eax, dword [rdx + rcx + 0xec]
add rax, r8
add rax, rcx
cmp rbx, rax
jae 0x18004d856
mov al, 1
jmp 0x18004d860
xor al, al
add rsp, 0x50
pop rbx
ret
add rsp, 0x50
pop rbx
ret
Function at 0x18004dd40
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rsi
sub rsp, 0x28
mov rbp, rdx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1800602d8], eax
je 0x18004dd67
mov eax, 0x10dd
add rsp, 0x28
pop rsi
pop rbp
ret
mov eax, dword [0x1800602dc]
test eax, eax
jne 0x18004dea3
test rbp, rbp
jne 0x18004dd84
lea eax, [rbp + 0x57]
add rsp, 0x28
pop rsi
pop rbp
ret
test rsi, rsi
je 0x18004dda0
cmp qword [rsi], 0
jne 0x18004ddac
mov dword [0x1800602dc], 6
mov qword [0x1800602e0], rsi
mov eax, 6
add rsp, 0x28
pop rsi
pop rbp
ret
mov qword [rsp + 0x40], rbx
mov ecx, 0x30
mov qword [rsp + 0x20], rdi
call fcn.18004ed90
mov rdi, rax
test rax, rax
jne 0x18004ddd0
lea ebx, [rax + 8]
jmp 0x18004de78
mov rcx, qword [rsi]
xor edx, edx
call fcn.18004dc90
xor edx, edx
mov rcx, rbp
mov rbx, rax
call fcn.18004dc90
movzx edx, byte [rbx + 0x3e]
mov rbp, qword [rbx + 0x48]
sub rbp, rdx
test dl, dl
je 0x18004de6a
cmp rdx, 0x1e
ja 0x18004de6a
cmp qword [rbx + 0x50], rax
jne 0x18004de6a
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], 0
mov r8d, 0x40
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x18004de2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x18004de78
mov qword [rdi + 0x20], rbx
mov rbx, qword [rsp + 0x40]
mov dword [rdi + 8], 1
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], rbp
mov eax, dword [rsp + 0x50]
mov dword [rdi + 0x28], eax
mov rax, qword [0x1800602f0]
mov qword [rdi], rax
xor eax, eax
mov qword [0x1800602f0], rdi
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
pop rsi
pop rbp
ret
cmp dword [0x1800602d0], 0
mov ebx, 9
jne 0x18004de83
mov dword [0x1800602dc], ebx
test rdi, rdi
je 0x18004de90
mov edx, 0x30
mov rcx, rdi
call fcn.18004f144
mov rdi, qword [rsp + 0x20]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov qword [0x1800602e0], rsi
add rsp, 0x28
pop rsi
pop rbp
ret

Function at 0x18004deb0
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x28
cmp dword [0x1800602d8], 0
jne 0x18004df57
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
xor eax, eax
lock cmpxchg dword [0x1800602d8], ecx
jne 0x18004df57
mov qword [rsp + 0x38], rbx
mov rbx, qword [0x1800602c0]
mov qword [rsp + 0x20], rdi
xor edi, edi
mov qword [0x1800602f0], rdi
mov qword [0x1800602e8], rdi
mov qword [0x1800602e0], rdi
test rbx, rbx
je 0x18004df40
nop word [rax + rax]
lea r9, [rsp + 0x30]
mov edx, 0x10000
mov r8d, 0x40
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18004df38
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x18004df10
jmp 0x18004df40
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rbx, qword [rsp + 0x38]
mov eax, edi
mov dword [0x1800602dc], edi
mov rdi, qword [rsp + 0x20]
add rsp, 0x28
ret
mov eax, 0x10dd
add rsp, 0x28
ret
Function at 0x18004e570
Capabilities:
Suspend thread

Disassembly:
push rdi
sub rsp, 0x20
mov eax, dword [0x1800602dc]
mov rdi, rcx
test eax, eax
jne 0x18004e613
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp rdi, rax
jne 0x18004e59a
xor eax, eax
add rsp, 0x20
pop rdi
ret
mov ecx, 0x10
mov qword [rsp + 0x30], rbx
call fcn.18004ed90
mov rbx, rax
test rax, rax
jne 0x18004e5b6
lea edi, [rax + 8]
jmp 0x18004e5d9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x18004e5f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, 0x10
mov rcx, rbx
call fcn.18004f144
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov dword [0x1800602dc], edi
mov qword [0x1800602e0], 0
add rsp, 0x20
pop rdi
ret
mov rax, qword [0x1800602e8]
mov qword [rbx], rax
xor eax, eax
mov qword [rbx + 8], rdi
mov qword [0x1800602e8], rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x401a18
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
movsxd rax, dword [rcx + 0x3c]
xor ebp, ebp
lea rbx, [rsp + 0x38]
mov rsi, rcx
mov r12d, edx
mov edi, dword [rcx + rax + 0x88]
add rdi, rcx
mov eax, dword [rdi + 0x20]
mov r13d, dword [rdi + 0x24]
mov r14d, dword [rdi + 0x1c]
add rax, rcx
mov qword [rsp + 0x20], rax
lea rax, [rcx + r13]
add r14, rcx
mov qword [rsp + 0x28], rax
mov eax, dword [rdi + 0x18]
mov r15d, ebp
dec eax
cmp ebp, eax
ja 0x401b1a
mov rax, qword [rsp + 0x20]
test r12d, r12d
mov edx, dword [rax + r15*4]
lea r13, [rsi + rdx]
jne 0x401aae
mov rcx, rbx
call fcn.00401698
mov rdx, r13
mov rcx, rbx
call fcn.00425a00
jmp 0x401ac7
cmp r12d, 1
jne 0x401ad9
mov rcx, rbx
call fcn.004017a6
mov rdx, r13
mov rcx, rbx
call fcn.00425a00
mov r13d, eax
mov rcx, rbx
call fcn.004494e0
test r13d, r13d
jne 0x401ae5
jmp 0x401b1a
cmp r12d, 4
je 0x401aec
cmp r12d, 6
je 0x401b03
inc ebp
jmp 0x401a62
mov rcx, rbx
call fcn.00401892
mov rdx, r13
mov rcx, rbx
call fcn.00425a00
jmp 0x401ac7
mov rcx, rbx
call fcn.00401992
mov rdx, r13
mov rcx, rbx
call fcn.00425a00
jmp 0x401ac7
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + r15*2]
mov eax, dword [r14 + rax*4]
add rax, rsi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x40f0a0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movsxd rbp, dword [0x004860b4]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x40f1ba
mov rax, qword [0x004860b8]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40f0ee
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40f1a0
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40f0d2
mov rcx, rbx
call fcn.0040fee0
test rax, rax
mov r12, rax
je 0x40f1f2
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x004860b8]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call fcn.00410000
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x004860b8]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40f1d5
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40f199
sub eax, 0x40
and eax, 0xffffffbf
je 0x40f199
mov r9, rbp
add r9, qword [0x004860b8]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40f1c1
add dword [0x004860b4], 1
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sub.msvcrt.dll_memcpy
xor ebp, ebp
jmp 0x40f0fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040f030
mov rax, qword [0x004860b8]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call fcn.0040f030
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040f030
nop
nop word cs:[rax + rax]

Function at 0x40fdf0
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 0x40fe31
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 0x40fe28
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40fe33
add rax, 0x28
cmp rax, r9
jne 0x40fe14
xor eax, eax
repz ret

Function at 0x40fee0
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x00473480]
cmp word [rbx], 0x5a4d
je 0x40ff00
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call fcn.0040fdb0
test eax, eax
je 0x40fef4
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.0040fdf0
Function at 0x410150
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00486a00]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004869e0]
test rbx, rbx
je 0x4101a4
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 0x41019b
test rsi, rsi
je 0x41019b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x410180
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x00486a00]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x410900
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov rdi, rcx
movsxd r12, edx
mov r13, r8
call sub.msvcrt.dll_strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.00410ac0
sub rsp, rax
movsxd r14, esi
movabs rax, 0x656d68732d636367
lea r15, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, r14
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
movsxd rbx, ebx
mov byte [rsp + 0x2e], 0x2d
call sub.msvcrt.dll_memcpy
lea rax, [r15 + r14 + 0x10]
lea r14d, [rsi + 0x50]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, r15
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r14d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4109e9
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x410a88
mov rcx, r12
call sub.msvcrt.dll_malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x410a24
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x410a10
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x410a85
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call fcn.00410880
cmp rax, rbx
mov rsi, rax
je 0x410aa0
mov rcx, rbx
call fcn.0041a960
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [rsi + 0x10]
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call fcn.00410880
mov rsi, rax
jmp 0x410a5f
xor edx, edx
mov r8, r12
mov rcx, rbx
call sub.msvcrt.dll_memset
test r13, r13
je 0x410a5f
mov rcx, rbx
call r13
jmp 0x410a5f
Function at 0x41b6d0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x00487548]
test rbx, rbx
je 0x41b700
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x00487548]
test rax, rax
je 0x41b724
cmp dword [rax], 0xffffffff
je 0x41b745
add rsp, 0x20
pop rbx
ret
lea r8, [0x0041ab60]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.004208b0
mov rbx, rax
mov qword [0x00487548], rax
jmp 0x41b6e1
lea r8, [0x0041ab60]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.004208b0
mov qword [0x00487548], rax
jmp 0x41b6f5
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x00487550]
test rcx, rcx
je 0x41bd20
call fcn.0041bb50
mov rax, qword [0x00487548]
test rax, rax
je 0x41bd43
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x41bc23
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.0041b520
test rax, rax
mov rbx, rax
je 0x41bd8b
cmp qword [0x0048a050], 0
je 0x41bd8b
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rbx + 0x68], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x30], rax
mov qword [rbx + 0x38], 0xffffffffffffffff
mov qword [rbx + 0x60], 0xffffffffffffffff
mov dword [rbx + 0xb0], 0
mov qword [rbx + 0x28], 0
call rsi
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rsi
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbx + 0x28]
mov r8, rbp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41bd92
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xb8], eax
movzx eax, byte [rbx + 0x40]
mov dword [rbx + 0xb4], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [0x00487548]
test rax, rax
je 0x41bd67
mov rdx, rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x41bd92
mov rax, rbx
jmp 0x41bc1a
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.004208b0
mov rcx, rax
mov qword [0x00487550], rax
jmp 0x41bbf8
lea r8, [0x0041ab60]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.004208b0
mov qword [0x00487548], rax
jmp 0x41bc0d
lea r8, [0x0041ab60]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.004208b0
mov qword [0x00487548], rax
jmp 0x41bd08
xor eax, eax
jmp 0x41bc1a
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
lea rcx, str._pthread_key_dest_shmem
xor r8d, r8d
mov edx, 8
jmp fcn.004208b0
Function at 0x41bda0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x00487550]
test rcx, rcx
je 0x41bd20
call fcn.0041bb50
mov rax, qword [0x00487548]
test rax, rax
je 0x41bd43
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x41bc23
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.0041b520
test rax, rax
mov rbx, rax
je 0x41bd8b
cmp qword [0x0048a050], 0
je 0x41bd8b
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rbx + 0x68], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x30], rax
mov qword [rbx + 0x38], 0xffffffffffffffff
mov qword [rbx + 0x60], 0xffffffffffffffff
mov dword [rbx + 0xb0], 0
mov qword [rbx + 0x28], 0
call rsi
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rsi
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbx + 0x28]
mov r8, rbp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41bd92
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xb8], eax
movzx eax, byte [rbx + 0x40]
mov dword [rbx + 0xb4], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [0x00487548]
test rax, rax
je 0x41bd67
mov rdx, rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x41bd92
mov rax, rbx
jmp 0x41bc1a
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.004208b0
mov rcx, rax
mov qword [0x00487550], rax
jmp 0x41bbf8
lea r8, [0x0041ab60]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.004208b0
mov qword [0x00487548], rax
jmp 0x41bc0d
lea r8, [0x0041ab60]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.004208b0
mov qword [0x00487548], rax
jmp 0x41bd08
xor eax, eax
jmp 0x41bc1a
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
lea rcx, str._pthread_key_dest_shmem
xor r8d, r8d
mov edx, 8
jmp fcn.004208b0
Function at 0x41eb50
Capabilities:
Check mutex on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov rcx, qword [0x00487598]
mov esi, edx
test rcx, rcx
je 0x41eaf0
call fcn.00420c70
cmp dword [rbx], 0xbab1f00d
jne 0x41eb17
mov eax, dword [rbx + 4]
test eax, eax
jle 0x41eb17
mov eax, dword [rbx + 4]
test eax, eax
jle 0x41eaa3
mov eax, dword [rbx + 4]
sub eax, 1
mov dword [rbx + 4], eax
mov rcx, qword [0x00487598]
test rcx, rcx
je 0x41eac0
call fcn.00420d20
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
ret
lea r8, [0x0041e830]
lea rcx, str.mutex_global_shmem
mov edx, 8
call fcn.004208b0
mov rcx, rax
mov qword [0x00487598], rax
call fcn.00420d20
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
ret
lea rcx, str.mutex_global_shmem
lea r8, [0x0041e830]
mov edx, 8
call fcn.004208b0
mov rcx, rax
mov qword [0x00487598], rax
jmp 0x41ea77
call qword [sym.imp.msvcrt.dll___iob_func]
lea r9, str.C:_crossdev_src_winpthreads_git20141130_src_mutex.c
lea rcx, [rax + 0x60]
lea r8, str._m___valid__LIFE_MUTEX____m___busy___0_
lea rdx, [0x00472b60]
mov dword [rsp + 0x20], 0x39
call sub.msvcrt.dll_fprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
lea r8, [0x0041e830]
lea rcx, str.mutex_global_shmem
mov edx, 8
jmp fcn.004208b0
Function at 0x4208b0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x80]
mov rdi, rcx
movsxd r12, edx
mov r13, r8
call sub.msvcrt.dll_strlen
mov r14, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x51]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.00410ac0
sub rsp, rax
movsxd r15, r14d
movabs rax, 0x656d68732d636367
lea rsi, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, r15
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
movsxd rbx, ebx
mov byte [rsp + 0x2e], 0x2d
call sub.msvcrt.dll_memcpy
lea rax, [rsi + r15 + 0x10]
lea r15d, [r14 + 0x50]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, rsi
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r15d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x420999
int3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x420a32
mov rcx, r12
add r14d, 0x10
call sub.msvcrt.dll_malloc
mov r10d, 0x40
mov rbx, rax
bt rbx, r10
jae 0x4209d4
mov r11d, r15d
sub r11d, r10d
movsxd r11, r11d
mov byte [rsi + r11], 0x41
sub r10d, 1
jne 0x4209c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x420a2f
mov rdx, rsi
movzx ecx, ax
mov r9d, r14d
mov r8d, r15d
call fcn.00420830
cmp rax, rbx
mov rsi, rax
je 0x420a49
mov rcx, rbx
call fcn.0041a960
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x58]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [r14 + 0x10]
mov rdx, rsi
movzx ecx, ax
mov r8d, r15d
call fcn.00420830
mov rsi, rax
jmp 0x420a09
xor edx, edx
mov r8, r12
mov rcx, rbx
call sub.msvcrt.dll_memset
test r13, r13
je 0x420a09
mov rcx, rbx
call r13
jmp 0x420a09

Function at 0x422690
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [0x0045a440]
lea rcx, str.__terminate_handler_sh
mov edx, 8
jmp fcn.00410900

Function at 0x4226b0
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [0x0045a450]
lea rcx, str.__unexpected_handler_sh
mov edx, 8
jmp fcn.00410900
Function at 0x140005470
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x140005498
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x1400054be
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400054c0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140005519
test ecx, ecx
jle 0x1400054f9
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140005519
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140005519
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x140005540
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140005562
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140005578
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140005594
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140005596
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400055d2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14000566e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000560d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14000564e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14000566e
cmp rbx, rax
ja 0x140005620
test rbx, rbx
je 0x14000566e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret