joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003894
Capabilities:
Accept command line arguments
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [0x1400012e8]
mov rcx, rax
call qword [0x140007010]
xor r13d, r13d
mov rdi, rax
test rax, rax
je 0x1400038f9
lea r14d, [r13 + 0x20]
add rdi, 0x2a
mov edx, r14d
mov rcx, rdi
call qword [0x140007008]
test rax, rax
jne 0x140003918
lea rdx, [0x140001318]
call fcn.140002834
xor al, al
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
sub rax, rdi
sar rax, 1
cmp rax, 2
jae 0x14000393b
lea rdx, [0x140001330]
call fcn.140002834
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
jmp 0x1400038f4
lea rsi, [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rsi + 2]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
jne 0x140003965
lea rdx, [0x140001348]
jmp 0x1400038f4
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call qword [0x140007040]
xor edx, edx
mov r8, r15
lea ecx, [rdx + 4]
mov word [rsi + r15], r13w
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov r12, rax
test rax, rax
jne 0x1400039b3
lea rdx, [0x140001360]
call fcn.140002834
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0xa
mov edx, eax
call fcn.140002790
jmp 0x1400038f9
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
test rax, rax
jne 0x1400039dc
lea rdx, [0x140001378]
jmp 0x140003996
mov r8, r14
mov rdx, rax
mov rcx, rbp
call qword [0x140007040]
call fcn.140003b5c
mov rsi, rax
test rax, rax
je 0x1400038f9
mov eax, dword [rdi + 0x20]
lea rdx, [rbp + 0x18]
mov rcx, rsi
mov dword [rsp + 0x68], eax
call fcn.140003af0
test al, al
je 0x1400038f9
lea rdx, [rsp + 0x68]
mov rcx, rsi
call fcn.140003af0
test al, al
je 0x1400038f9
movsxd rcx, dword [rbp + 0x18]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r14, rax
test rax, rax
jne 0x140003a59
lea rdx, [0x140001390]
jmp 0x140003996
mov eax, dword [rdi + 0x24]
lea rbx, [rdi + 0x28]
lea rbp, [rbx + rax*4]
jmp 0x140003a7f
mov edx, dword [rbx]
mov rcx, rsi
add rdx, r14
call fcn.140003af0
test al, al
je 0x1400038f9
add rbx, 4
cmp rbx, rbp
jne 0x140003a66
movsxd rbx, dword [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x140003aa2
lea rdx, [0x1400013a8]
jmp 0x140003996
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x1400038fb
Function at 0x140003c00
Capabilities:
Set environment variable

Disassembly:
sub rsp, 0x448
xor eax, eax
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x434], eax
mov word [rsp + 0x20], ax
call fcn.140002710
lea rdx, [rsp + 0x20]
lea rcx, [0x140001290]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add rsp, 0x448
ret
Function at 0x14004102c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x14008c110]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x1400410a1
cmp byte [rcx + 0x71], 0
je 0x1400410a1
or edx, 0xffffffff
call fcn.140040110
cmp eax, 0xffffffff
je 0x1400410f6
mov rcx, qword [rbx + 0x68]
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], r8
lea rdx, [rbx + 0x74]
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
mov rax, qword [rcx]
mov rax, qword [rax + 0x40]
call qword [case.0x140062ace.0]
test eax, eax
je 0x1400410bc
sub eax, 1
je 0x1400410c0
cmp eax, 2
jne 0x1400410f6
mov byte [rbx + 0x71], 0
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14004d060
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x1400410ed
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call fcn.14005672c
cmp rdi, rax
jne 0x1400410f6
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400410a3
xor al, al
jmp 0x1400410a3

Function at 0x140042e0c
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov ebx, ecx
test r8d, r8d
jne 0x140042c67
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140042c67
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140042c67
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140042c67
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140042c67
cmp dword [rcx + 0x84], 0xe
jbe 0x140042c67
cmp dword [rcx + 0xf8], 0
je 0x140042c67
mov ecx, ebx
call fcn.140042d14
lea rax, [rbp + 0x18]
mov byte [rbp + 0x28], 0
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x2c]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x20]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x28]
mov eax, 2
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
call fcn.140042ae4
cmp dword [rbp + 0x20], 0
je 0x140042cb4
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140042cc4
int3
xor r8d, r8d
xor edx, edx
jmp 0x140042c00

Function at 0x14004d6e8
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x14008d110], eax
call fcn.14004d3dc
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x14008d110], 0
jne case.default.0x14004d73e
mov ecx, 1
call fcn.14004d3dc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
test al, 0xce
xor eax, 0x32b9f6d9
mov ebx, 0x8238168a
and dl, byte [rdi + 0x3c]
mov edi, 0x383472
invalid
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004bf0d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004bf0e0]
mov dword [rax], 1
mov rax, qword [0x004bf0f0]
mov dword [rax], 1
mov rax, qword [0x004bf0c0]
mov dword [rax], 1
mov rax, qword [0x004bef60]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004bf0b0]
mov dword [0x004e600c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x004bf070]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004be3b0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067

Function at 0x4015f2
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 3
mov edx, 0x10000000
lea rcx, str..PhysicalDrive0
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileW]
call rax
mov qword [rbp - 8], rax
lea rdx, [rbp - 0xc]
mov rax, qword [rbp - 8]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0x200
lea rdx, section..rdata
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
nop
add rsp, 0x50
pop rbp
ret
Function at 0x40d880
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 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 rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]

Function at 0x40d8f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x004e6634]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x40da98
mov rax, qword [0x004e6638]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40d93c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x40d9c7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x40d920
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x40dad2
mov rax, qword [0x004e6638]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004e6638]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40dae1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x40d9c0
sub eax, 4
and eax, 0xfffffffb
jne 0x40da50
add dword [0x004e6634], 1
cmp ebx, 8
jae 0x40d9f8
test bl, 4
jne 0x40daa0
test ebx, ebx
je 0x40d9e9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x40dac0
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 0x40d9e9
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 0x40da2a
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 [0x004e6638]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40d9c0
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 edi, edi
jmp 0x40d947
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x40d9e9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x40d9e9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x004e6638]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x40e2c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004e6920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004e6900]
test rbx, rbx
je 0x40e314
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 0x40e30b
test r12, r12
je 0x40e30b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40e2f0
lea rcx, [0x004e6920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x40e540
Capabilities:
Parse pe header

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

Function at 0x40e560
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 0x40e5a5
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x40e59c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40e5a7
add rax, 0x28
cmp rax, r9
jne 0x40e588
xor eax, eax
ret

Function at 0x40e650
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004bef60]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40e6c9
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40e6c9
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 0x40e6c6
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 0x40e6bd
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40e6c9
add r8, 0x28
cmp r8, r9
jne 0x40e6a8
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x40e7b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004bef60]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40e81f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40e81f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x40e81d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x40e814
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40e828
add rax, 0x28
cmp rax, r9
jne 0x40e800
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x40e840
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004bef60]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x40e8b8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40e8b8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x40e8b8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40e8b8
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x40e8ac
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x40e8c0
add rdx, 0x28
cmp rdx, r10
jne 0x40e898
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x40e8d0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x40e8de
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40e8b5
test r8d, r8d
jg 0x40e8c8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x40f060
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 qword [rbp], r8
mov r15, rcx
movsxd rbx, edx
call sym.strlen
mov rsi, rax
lea r13d, [rax + 0xf]
lea edi, [rax + 0x10]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040e900
sub rsp, rax
movsxd r12, esi
mov rdx, r15
movsxd r13, r13d
mov r8, r12
lea r14, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
movabs rax, 0x656d68732d636367
mov qword [rsp + 0x20], rax
mov eax, 0x326d
lea r15d, [rsi + 0x50]
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
mov byte [rsp + 0x2e], 0x2d
call sym.memcpy
lea rax, [r14 + r12 + 0x10]
mov r8, r14
movabs rdx, 0x6161616161616161
movabs rcx, 0x6161616161616161
mov qword [rax], rdx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rdx
xor edx, edx
mov qword [rax + 0x38], rcx
movsxd rax, r15d
xor ecx, ecx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + r13 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + r13 + 0x20], 0x2d
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f15a
int3
mov rcx, r14
add esi, 0x51
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x40f1a8
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call dbg.get_ptr_from_atom
mov r14, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
lea rsp, [rbp - 0x58]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rbx
call sym.malloc
mov r13, rax
mov eax, 0x40
nop dword [rax + rax]
bt r13, rax
jae 0x40f1d3
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x40f1c0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x40f1e7
int3
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, esi
call dbg.get_ptr_from_atom
mov r14, rax
cmp r13, rax
je 0x40f20d
mov rcx, r13
call sym.free
jmp 0x40f17f
xor edx, edx
mov r8, rbx
mov rcx, rax
call sym.memset
cmp qword [rbp], 0
je 0x40f17f
mov rcx, r14
call qword [rbp]
jmp 0x40f17f

Function at 0x419f70
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_cond_locked_shmem_cond]
mov edx, 8
lea rcx, str.cond_locked_shmem_cond
jmp sym.__shmem_winpthreads_grab
Function at 0x41c730
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004e7408]
test rbx, rbx
je 0x41c768
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004e7408]
test rax, rax
je 0x41c790
cmp dword [rax], 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x20
pop rbx
ret
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e7408], rax
mov rbx, rax
jmp 0x41c741
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e7408], rax
jmp 0x41c755

Function at 0x41cc40
Capabilities:
Print debug messages

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rbx, rcx
test rcx, rcx
je 0x41cc65
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41cc72
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 0x41ccf8
mov eax, 0x28
jmp 0x41ccca
add rax, 1
cmp rax, 0x6b
je 0x41ccea
cmp byte [r12 + rax], 0
mov edx, eax
jne 0x41ccc0
cmp eax, 0x6a
je 0x41ccea
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 sym.abort
mov edx, 0x27
jmp 0x41ccd8
Function at 0x41cd00
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x004e7410]
test rcx, rcx
je 0x41ce58
cmp dword [rcx], 1
je 0x41cd23
call sym._pthread_once_raw.part.0.constprop.0
mov rax, qword [0x004e7408]
test rax, rax
je 0x41ce80
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x41cd50
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x41cd43
test rax, rax
je 0x41cd43
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 sym.replace_spin_keys.constprop.0
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 sym.__pthread_self_lite.cold
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 [0x004e7408]
test rax, rax
je 0x41cea8
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je sym.__pthread_self_lite.cold
mov r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call sym.__shmem_winpthreads_grab
mov qword [0x004e7410], rax
mov rcx, rax
jmp 0x41cd19
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e7408], rax
jmp 0x41cd33
lea r8, [sym.__shmem_winpthreads_init__pthread_tls_shmem]
mov edx, 4
lea rcx, str._pthread_tls_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e7408], rax
jmp 0x41ce2e

Function at 0x41cee0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 8
lea rcx, str._pthread_key_dest_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x41cf00
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x41cf20
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_concur_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x41cf40
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_tls_once_shmem
jmp sym.__shmem_winpthreads_grab