joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41dc70
Capabilities:
Hijack thread execution

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x4f8
mov rsi, rcx
call sym.__pth_gpointer_locked
mov rbx, rax
test rax, rax
je 0x41dd4c
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x41dd4c
lea r12, [rsp + 0x20]
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x41dd4c
lea r13, [rbx + 0x38]
mov rcx, r13
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
test rax, rax
je 0x41dde0
mov rdx, qword [rax + 0x1d8]
movzx eax, byte [rbx + 0x40]
cmp rsi, rdx
je 0x41dd60
mov edx, dword [rbx + 0x44]
and edx, 3
cmp edx, 3
je 0x41dd40
test al, 3
jne 0x41ddc0
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x004e9420]
test rax, rax
je 0x41de90
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41dd22
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, r13
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x4f8
pop rbx
pop rsi
pop r12
pop r13
ret
test al, 0xc
jne 0x41ddc0
test al, 0xf
je 0x41ddf0
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop r12
pop r13
ret
test al, 3
jne 0x41ddc0
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
mov rax, qword [0x004e9420]
test rax, rax
je 0x41deb0
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41dd90
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
and edx, 3
cmp edx, 3
jne 0x41dd22
and eax, 0xfffffffe
mov rcx, r13
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 dword [rax]
mov rcx, r13
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
jne 0x41dd4c
xor eax, eax
jmp 0x41dd2c
xor edx, edx
jmp 0x41dcda
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 0x41dd22
mov rcx, qword [rbx + 0x28]
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
lea rax, [sym._pthread_invoke_cancel]
mov rcx, qword [rbx + 0x28]
mov rdx, r12
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
mov rax, qword [0x004e9420]
test rax, rax
je 0x41ded0
lock add dword [rax], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41de72
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, r13
call sym.pthread_mutex_unlock
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x41dd22
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e9420], rax
jmp 0x41dd0f
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e9420], rax
jmp 0x41dd7d
xor r8d, r8d
mov edx, 4
lea rcx, str._pthread_cancelling_shmem
call sym.__shmem_winpthreads_grab
mov qword [0x004e9420], rax
jmp 0x41de5f
Function at 0x41def0
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov r12, rcx
mov rcx, qword [0x004e93d8]
mov ebx, edx
test rcx, rcx
je 0x41dfa8
call sym.pthread_mutex_lock
mov rcx, r12
call sym.__pthread_get_pointer
mov rcx, qword [0x004e93d8]
test rax, rax
je 0x41df80
cmp qword [rax + 0x1d8], r12
jne 0x41df80
test byte [rax + 0x40], 0xc
jne 0x41df80
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x41df80
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x41df80
test rcx, rcx
je 0x41e000
call sym.pthread_mutex_unlock
test ebx, ebx
je 0x41dfa0
lea edx, [rbx - 2]
cmp edx, 0x15
ja 0x41dff8
mov rcx, r12
add rsp, 0x28
pop rbx
pop r12
jmp sym.pthread_cancel
test rcx, rcx
je 0x41dfd0
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x28
pop rbx
pop r12
ret
xor eax, eax
jmp 0x41df8f
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x004e93d8], rax
mov rcx, rax
jmp 0x41df0c
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x004e93d8], rax
mov rcx, rax
jmp 0x41df85
mov eax, 0x16
jmp 0x41df8f
lea rcx, str.mtx_pthr_locked_shmem
lea r8, [sym.__shmem_winpthreads_init_mtx_pthr_locked_shmem]
mov edx, 8
call sym.__shmem_winpthreads_grab
mov qword [0x004e93d8], rax
mov rcx, rax
jmp 0x41df55
Function at 0x41e2a0
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rdi, rcx
mov rsi, rdx
mov rbx, r8
mov rbp, r9
call sym.pop_pthread_mem
mov r12, rax
test rax, rax
je 0x41e4db
test rdi, rdi
je 0x41e2da
mov rax, qword [rax + 0x1d8]
mov qword [rdi], rax
mov r13, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [r12 + 8], rbp
mov dword [r12 + 0x44], 1
mov rbp, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [r12 + 0xbc], 0
mov r14, r13
mov qword [r12 + 0x28], 0xffffffffffffffff
mov qword [r12 + 0x10], rbx
xor ebx, ebx
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call rbp
mov qword [r12 + 0x30], rax
test rax, rax
jne 0x41e350
test ebx, ebx
je 0x41e348
mov ecx, 0x14
call r14
cmp ebx, 4
je 0x41e350
add ebx, 1
jmp 0x41e315
xor ecx, ecx
call r13
jmp 0x41e33f
mov qword [r12 + 0x38], 0xffffffffffffffff
lea r14, [r12 + 0x68]
mov rcx, r14
call sym.replace_spin_keys.constprop.0
cmp qword [r12 + 0x30], 0
mov dword [r12], 0xbab1f00d
mov dword [r12 + 0xc0], 0
mov dword [r12 + 0xb8], 0
je 0x41e4bc
xor edx, edx
test rsi, rsi
je 0x41e3b6
mov eax, dword [rsi]
mov edx, dword [rsi + 0x10]
mov dword [r12 + 0x44], eax
test al, 8
jne 0x41e4f0
mov eax, dword [rsi + 0x18]
mov dword [r12 + 0xc0], eax
lea r8, [sym.pthread_create_wrapper]
mov r9, r12
xor ecx, ecx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov r13, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x41e488
mov eax, dword [r12 + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jge 0x41e460
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [r12 + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [r12 + 0x44], 4
jne 0x41e440
mov qword [r12 + 0x28], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov qword [r12 + 0x28], 0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41e426
mov edx, 0xfffffffe
cmp eax, 0xffffffff
jl 0x41e3fc
mov edx, 0xf
cmp eax, 0xe
jg 0x41e3fc
cmp eax, 2
mov edx, 2
cmovle edx, eax
jmp 0x41e3fc
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x41e498
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [r12 + 0x38]
call sym.pthread_mutex_destroy
mov rcx, r14
call sym.replace_spin_keys.constprop.0
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x28], 0
test rdi, rdi
je 0x41e4c8
mov qword [rdi], 0
cmp qword [r12 + 0x1d0], 0
jne 0x41e4db
mov rcx, r12
call sym.push_pthread_mem.part.0
mov eax, 0xb
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov dword [rsp + 0x3c], edx
call sym.__pthread_self_lite
mov edx, dword [rsp + 0x3c]
mov eax, dword [rax + 0xc0]
mov dword [r12 + 0xc0], eax
jmp 0x41e3b6

Function at 0x41eb20
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 4
lea rcx, str.dummy_concurrency_level_shmem
jmp sym.__shmem_winpthreads_grab
Function at 0x41f210
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 rsi, r8
mov r12, rcx
movsxd rbx, edx
call sym.strlen
mov r8, rax
lea eax, [rax + 0xf]
mov dword [rbp - 0x54], eax
lea eax, [r8 + 0x51]
lea edi, [r8 + 0x10]
cdqe
lea r15d, [r8 + 0x50]
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.0040dae0
movabs rcx, 0x656d68732d636367
sub rsp, rax
movsxd r13, r8d
mov rdx, r12
mov eax, 0x326d
mov r8, r13
mov qword [rsp + 0x20], rcx
lea r14, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
mov byte [rsp + 0x2e], 0x2d
call sym.memcpy
lea rax, [r14 + r13 + 0x10]
movsxd r12, dword [rbp - 0x54]
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 + r12 + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + r12 + 0x20], 0x2d
mov edx, 0xffffffff
mov r13, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41f30e
int3
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
je 0x41f360
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, r15d
call sym.get_ptr_from_atom_1
mov r14, rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, rbx
call sym.malloc
mov r12, rax
mov eax, 0x40
bt r12, rax
jae 0x41f383
mov edx, r15d
sub edx, eax
movsxd rdx, edx
mov byte [r14 + rdx], 0x41
sub eax, 1
jne 0x41f370
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
jne 0x41f397
int3
mov rdx, r14
movzx ecx, ax
mov r9d, edi
mov r8d, r15d
call sym.get_ptr_from_atom_1
mov r14, rax
cmp r12, rax
je 0x41f3bd
mov rcx, r12
call sym.free
jmp 0x41f330
xor edx, edx
mov r8, rbx
mov rcx, rax
call sym.memset
test rsi, rsi
je 0x41f330
mov rcx, r14
call rsi
jmp 0x41f330

Function at 0x41f7e0
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_rwl_global_shmem]
mov edx, 8
lea rcx, str.rwl_global_shmem
jmp sym.__shmem_winpthreads_grab

Function at 0x41f8b0
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_winpthreads_init_cond_locked_shmem_rwlock]
mov edx, 8
lea rcx, str.cond_locked_shmem_rwlock
jmp sym.__shmem_winpthreads_grab

Function at 0x420680
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_init_init]
mov edx, 8
lea rcx, str.init
jmp dbg.__shmem_grab

Function at 0x4206a0
Capabilities:
Check mutex on windows

Disassembly:
xor r8d, r8d
mov edx, 0x10
lea rcx, str.eh_globals
jmp dbg.__shmem_grab
Function at 0x420d30
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_init___terminate_handler_sh]
mov edx, 8
lea rcx, str.__terminate_handler_sh
jmp dbg.__shmem_grab

Function at 0x420d50
Capabilities:
Check mutex on windows

Disassembly:
lea r8, [sym.__shmem_init___unexpected_handler_sh]
mov edx, 8
lea rcx, str.__unexpected_handler_sh
jmp dbg.__shmem_grab

Function at 0x422710
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x42273c
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x4233a0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x30
cmp byte [0x004bae50], 0
jne 0x4234aa
mov byte [0x004bae50], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x423480
mov r12, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [r12], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add r12, rax
mov rcx, r12
call sym.__cxa_demangle
mov ecx, 2
mov rbx, qword [dbg.__acrt_iob_func]
mov r13, rax
call rbx
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x423471
call rbx
mov rcx, r12
mov rdx, rax
call sym.fputs
mov ecx, 2
call rbx
mov r8d, 2
mov edx, 1
lea rcx, [0x004bc8e1]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x42346c
mov rcx, r13
call sym.free
call sym.__cxa_rethrow
call rbx
mov rcx, r13
mov rdx, rax
call sym.fputs
jmp 0x42343b
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
call sym.abort
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
sub rdx, 1
mov rcx, rax
jne 0x42353f
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov r12, rax
call rbx
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rbx
mov rdx, rax
mov rcx, r12
call sym.fputs
mov ecx, 2
call rbx
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x4234a5
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x4234a5

Function at 0x47cea0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
jmp 0x47cec7
call rbp
cmp dword [rax], 4
jne 0x47cee4
mov rcx, rdi
call method.std::__basic_file_char_.fd__
mov r8d, ebx
mov rdx, rsi
mov ecx, eax
call sym.read
movsxd r12, eax
cmp eax, 0xffffffff
je 0x47cec0
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0040a8a0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0040a8b0]
mov dword [rax], 1
mov rax, qword [0x0040a8c0]
mov dword [rax], 1
mov rax, qword [0x0040a840]
cmp word [rax], 0x5a4d
jne 0x40105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x0040a890]
mov dword [0x0040d020], ecx
mov eax, dword [rax]
test eax, eax
je 0x4010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x0040a970]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x0040a950]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x0040a7f0]
cmp dword [rax], 1
je 0x4010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401110
cmp dx, 0x20b
jne 0x40105a
cmp dword [rax + 0x84], 0xe
jbe 0x40105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x40105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x40105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x40105a
Function at 0x401f90
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x402000
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0040d0b4]
test esi, esi
mov rbx, rcx
jle 0x402130
mov rax, qword [0x0040d0b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x40204b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x4020d5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x402030
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x402152
mov rax, qword [0x0040d0b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x0040d0b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x402137
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4020ce
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x4020e0
add dword [0x0040d0b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x0040d0b8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4020ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x402058
mov rax, qword [0x0040d0b8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x4026f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x0040d120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040d100]
test rbx, rbx
je 0x40274c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x402743
test eax, eax
jne 0x402743
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402728
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402960
Capabilities:
Parse pe header

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

Function at 0x402990
Capabilities:
Enumerate pe sections

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

Function at 0x4029e0
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x0040a840]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x402aa0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x402aa8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x402aa0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x402afd
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402af4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402aa0
add rax, 0x28
cmp rax, r9
jne 0x402ae0
xor eax, eax
ret

Function at 0x402b00
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x0040a840]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x402b1f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x402b28
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x402b1f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x402b40
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x0040a840]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x402b60
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x402b68
ret
cmp word [rdx + 0x18], 0x20b
jne 0x402b60
movzx r8d, word [rdx + 6]
movzx eax, word [rdx + 0x14]
test r8w, r8w
lea rax, [rdx + rax + 0x18]
je 0x402bb0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x402ba7
test rcx, rcx
je 0x402b60
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x402b98
xor eax, eax
ret
Function at 0x402bc0
Capabilities:
Parse pe header

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

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

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

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

Disassembly:
mov r11, qword [0x0040a840]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x402cb2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x402cc0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x402cb2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x402cb2
movzx r10d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
test r10w, r10w
lea rdx, [r8 + rdx + 0x18]
je 0x402cb2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
cmp rax, r9
mov r8, r9
jb 0x402d15
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x402d28
add rdx, 0x28
cmp r10, rdx
jne 0x402d00
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x402d37
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x402d47
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402d1e
test ecx, ecx
jg 0x402d30
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret