joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41c530
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 0x41c551
test r8, r8
je 0x41c5f0
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x41c620
cmp edx, 3
jne 0x41c544
mov ecx, dword [0x0052b168]
cmp ecx, 0xffffffff
je 0x41c544
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41c544
test byte [rax + 0x40], 0x30
je 0x41c640
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x41c735
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x41c5bf
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41c5af
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 0x41c6cc
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x41c6cc
mov rcx, qword [0x0056a6a0]
test rcx, rcx
je 0x41c544
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x0056a6a0], 0
jmp 0x41c544
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x0056a6a0], rax
jmp 0x41c544
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x41c6e0
test rcx, rcx
je 0x41c65d
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 0x41c710
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x41c720
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x41c6a6
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 0x41c5df
xor edx, edx
mov ecx, dword [0x0052b168]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41c544
test rcx, rcx
je 0x41c6eb
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 0x41c544
call sym._pthread_cleanup_dest.part.8
jmp 0x41c67f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x41c544
call sym._pthread_cleanup_dest.part.8
jmp 0x41c592
Function at 0x41c740
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, [0x0052b158]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
cmp dword [0x0056a6e0], 1
je 0x41c779
call sym._pthread_once_raw.part.5.constprop.11
mov rdx, qword [rbp + 0x28]
mov ecx, dword [0x0052b168]
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 0x41c84d
lea rcx, [0x0052b158]
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 0x41c7ec
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x41c8a7
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, [0x0052b158]
mov rcx, rdi
call sym.pthread_mutex_unlock
test eax, eax
jne 0x41c8f1
xor ecx, ecx
call rbx
jmp 0x41c837
lea rcx, [0x0052b158]
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x41c8f9
mov rdi, qword [rbp + 0x28]
mov rcx, qword [rdi + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x0052b158]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
je 0x41c7c5
call sym._pthread_cleanup_dest.part.8
jmp 0x41c7c5
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 0x41c8de
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x1d0], 0
jne 0x41c8de
mov rcx, rax
call sym.push_pthread_mem.part.2
xor edx, edx
mov ecx, dword [0x0052b168]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41c829
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
mov ebx, pe_nt_image_headers64
jmp 0x41c877
Function at 0x41d480
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 0x41d54a
mov rcx, qword [rax + 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x41d54a
lea rbp, [rsp + 0x20]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x41d54a
lea rdi, [rbx + 0x38]
mov rcx, rdi
call sym.pthread_mutex_lock
call sym.__pthread_self_lite
xor edx, edx
test rax, rax
je 0x41d4e6
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
movzx eax, byte [rbx + 0x40]
je 0x41d534
mov edx, dword [rbx + 0x44]
and edx, 3
cmp edx, 3
je 0x41d560
test al, 3
jne 0x41d53c
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock add dword [0x0056a6e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41d51e
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 0x41d5f5
mov rcx, rdi
call sym.pthread_mutex_unlock
test byte [rbx + 0x40], 0xc
je 0x41d526
mov eax, 3
add rsp, 0x4f8
pop rbx
pop rsi
pop rdi
pop rbp
ret
test al, 0xc
jne 0x41d53c
test al, 0xf
jne 0x41d54a
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 0x41d51e
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 [0x0056a6e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41d5de
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 0x41d51e
and eax, 0xfffffffc
or eax, 1
mov byte [rbx + 0x40], al
lock add dword [0x0056a6e8], 1
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41d615
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [rbx + 0x44]
mov edx, eax
and edx, 3
cmp edx, 3
jne 0x41d51e
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 0x41d650
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov esi, edx
lea rcx, [0x0052b158]
call sym.pthread_mutex_lock
mov rcx, rbx
call sym.__pthread_get_pointer
test rax, rax
je 0x41d6c1
cmp qword [rax + 0x1d8], rbx
jne 0x41d6c1
test byte [rax + 0x40], 0xc
jne 0x41d6c1
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x41d6c1
mov rax, qword [rax + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x41d6c1
lea rcx, [0x0052b158]
call sym.pthread_mutex_unlock
test esi, esi
je 0x41d6e0
sub esi, 2
cmp esi, 0x15
ja 0x41d6e4
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
jmp sym.pthread_cancel
lea rcx, [0x0052b158]
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x28
pop rbx
pop rsi
ret
xor eax, eax
jmp 0x41d6d2
mov eax, 0x16
jmp 0x41d6d2
Function at 0x41d960
Capabilities:
Create thread
Resume thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rbp, rcx
mov r13, rdx
mov rsi, r8
mov rdi, r9
call sym.pop_pthread_mem
test rax, rax
mov rbx, rax
je 0x41dae8
test rbp, rbp
je 0x41d99b
mov rax, qword [rax + 0x1d8]
mov qword [rbp], rax
mov r12, qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rbx + 8], rdi
mov rdi, qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x10], rsi
xor esi, esi
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0x44], 1
mov qword [rbx + 0x28], 0xffffffffffffffff
mov r14, r12
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
call rdi
test rax, rax
mov qword [rbx + 0x30], rax
jne 0x41da10
test rsi, rsi
je 0x41da00
mov ecx, 0x14
call r14
cmp esi, 4
je 0x41da10
add rsi, 1
jmp 0x41d9cf
xor ecx, ecx
call r12
jmp 0x41d9f9
lea rsi, [rbx + 0x68]
mov qword [rbx + 0x38], 0xffffffffffffffff
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x30], 0
mov dword [rbx], 0xbab1f00d
mov dword [rbx + 0xc0], 0
mov dword [rbx + 0xb8], 0
je 0x41dacd
xor edx, edx
test r13, r13
je 0x41da6d
mov eax, dword [r13]
mov edx, dword [r13 + 0x10]
test al, 8
mov dword [rbx + 0x44], eax
jne 0x41dba0
mov eax, dword [r13 + 0x18]
mov dword [rbx + 0xc0], eax
xor ecx, ecx
mov dword [rsp + 0x20], 4
mov r9, rbx
mov qword [rsp + 0x28], 0
lea r8, [sym.pthread_create_wrapper]
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov rdi, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x41db00
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41daac
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
test rbp, rbp
je 0x41dada
mov qword [rbp], 0
cmp qword [rbx + 0x1d0], 0
je 0x41db90
mov eax, 0xb
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov eax, dword [rbx + 0xc0]
mov edx, 0xfffffff1
cmp eax, 0xfffffff2
jl 0x41db30
add edx, 0xd
cmp eax, 0xffffffff
jl 0x41db30
cmp eax, 0xe
mov edx, 0xf
jle 0x41dbc0
nop word cs:[rax + rax]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test byte [rbx + 0x44], 4
jne 0x41db70
mov qword [rbx + 0x28], rdi
mov rcx, rdi
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 rcx, rdi
mov qword [rbx + 0x28], 0
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41db56
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x41dae8
mov dword [rsp + 0x3c], edx
call sym.__pthread_self_lite
mov edx, dword [rsp + 0x3c]
mov eax, dword [rax + 0xc0]
mov dword [rbx + 0xc0], eax
jmp 0x41da6d
cmp eax, 2
mov edx, 2
cmovle edx, eax
jmp 0x41db30
Function at 0x422dc0
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 0x422dec
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x423b60
Capabilities:
Write file on windows

Disassembly:
push rbp
sub rsp, 0xb0
lea rax, [sym.__gxx_personality_sj0]
mov qword [rsp + 0x60], rax
lea rax, [0x0055be30]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x30]
lea rax, [0x00423d3f]
mov qword [rsp + 0x80], rsp
mov qword [rsp + 0x78], rax
call dbg._Unwind_SjLj_Register
cmp byte [0x0052ded0], 0
jne 0x423d0d
mov byte [0x0052ded0], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x423cd3
mov rdx, qword [rax + 8]
lea r9, [rsp + 0xac]
xor eax, eax
cmp byte [rdx], 0x2a
mov dword [rsp + 0x38], 0xffffffff
mov dword [rsp + 0xac], 0xffffffff
sete al
xor r8d, r8d
add rdx, rax
mov rcx, rdx
mov qword [rsp + 0x98], rdx
xor edx, edx
call sym.__cxa_demangle
mov rdx, qword [sym.__acrt_iob_func]
mov ecx, 2
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
call rdx
mov edx, 1
mov r8d, 0x30
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0xac]
mov ecx, 2
test edx, edx
je 0x423cbd
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov rcx, qword [rsp + 0x98]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov r8d, 2
mov edx, 1
lea rcx, [0x00530611]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0xac]
test eax, eax
jne 0x423cb0
mov rcx, qword [rsp + 0x28]
call sym.free
mov dword [rsp + 0x38], 1
call sym.__cxa_rethrow
mov rdx, qword [rsp + 0x20]
call rdx
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
jmp 0x423c6d
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
mov dword [rsp + 0x38], 0xffffffff
call sym.abort
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x38]
test eax, eax
jne 0x423de6
sub rdx, 1
mov rcx, qword [rsp + 0x28]
jne 0x423e02
call sym.__cxa_begin_catch
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x10]
mov ecx, 2
mov dword [rsp + 0x38], 2
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x20]
call rax
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
mov rax, qword [rsp + 0x20]
call rax
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov rax, qword [rsp + 0x20]
call rax
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x423d00
sub eax, 1
jne 0x423e19
call sym.__cxa_end_catch
mov rcx, qword [rsp + 0x28]
mov dword [rsp + 0x38], 0xffffffff
call dbg._Unwind_SjLj_Resume
call sym.__cxa_begin_catch
mov dword [rsp + 0x38], 0xffffffff
call sym.__cxa_end_catch
jmp 0x423d00
ud2
Function at 0x423d3f
Capabilities:
Write file on windows

Disassembly:
push rbp
sub rsp, 0xb0
lea rax, [sym.__gxx_personality_sj0]
mov qword [rsp + 0x60], rax
lea rax, [0x0055be30]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x30]
lea rax, [0x00423d3f]
mov qword [rsp + 0x80], rsp
mov qword [rsp + 0x78], rax
call dbg._Unwind_SjLj_Register
cmp byte [0x0052ded0], 0
jne 0x423d0d
mov byte [0x0052ded0], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x423cd3
mov rdx, qword [rax + 8]
lea r9, [rsp + 0xac]
xor eax, eax
cmp byte [rdx], 0x2a
mov dword [rsp + 0x38], 0xffffffff
mov dword [rsp + 0xac], 0xffffffff
sete al
xor r8d, r8d
add rdx, rax
mov rcx, rdx
mov qword [rsp + 0x98], rdx
xor edx, edx
call sym.__cxa_demangle
mov rdx, qword [sym.__acrt_iob_func]
mov ecx, 2
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
call rdx
mov edx, 1
mov r8d, 0x30
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0xac]
mov ecx, 2
test edx, edx
je 0x423cbd
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov rcx, qword [rsp + 0x98]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
mov rax, qword [rsp + 0x20]
call rax
mov r8d, 2
mov edx, 1
lea rcx, [0x00530611]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0xac]
test eax, eax
jne 0x423cb0
mov rcx, qword [rsp + 0x28]
call sym.free
mov dword [rsp + 0x38], 1
call sym.__cxa_rethrow
mov rdx, qword [rsp + 0x20]
call rdx
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
jmp 0x423c6d
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
mov dword [rsp + 0x38], 0xffffffff
call sym.abort
mov ecx, 2
mov dword [rsp + 0x38], 0xffffffff
call qword [sym.__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
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x38]
test eax, eax
jne 0x423de6
sub rdx, 1
mov rcx, qword [rsp + 0x28]
jne 0x423e02
call sym.__cxa_begin_catch
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x10]
mov ecx, 2
mov dword [rsp + 0x38], 2
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x20]
call rax
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
mov rax, qword [rsp + 0x20]
call rax
mov rcx, qword [rsp + 0x28]
mov rdx, rax
call sym.fputs
mov ecx, 2
mov rax, qword [rsp + 0x20]
call rax
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
jmp 0x423d00
sub eax, 1
jne 0x423e19
call sym.__cxa_end_catch
mov rcx, qword [rsp + 0x28]
mov dword [rsp + 0x38], 0xffffffff
call dbg._Unwind_SjLj_Resume
call sym.__cxa_begin_catch
mov dword [rsp + 0x38], 0xffffffff
call sym.__cxa_end_catch
jmp 0x423d00
ud2
Function at 0x496660
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rbp, rcx
mov rdi, rdx
mov esi, r8d
jmp 0x496688
call r12
cmp dword [rax], 4
jne 0x4966a6
mov rcx, rbp
call method.std::__basic_file_char_.fd__
mov r8d, esi
mov rdx, rdi
mov ecx, eax
call sym.read
movsxd rbx, eax
cmp rbx, 0xffffffffffffffff
je 0x496680
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x4b4a00
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rsi, rdx
mov rbx, rcx
lea rdx, str.mt19937
mov rcx, rsi
call method.std::string.compare_char_const__const
mov ecx, 0x1571
test eax, eax
jne 0x4b4a65
mov dword [rbx], ecx
mov edx, 1
jmp 0x4b4a34
mov ecx, dword [rbx + rdx*4 - 4]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul eax, eax, 0x6c078965
add eax, edx
mov dword [rbx + rdx*4], eax
add rdx, 1
cmp rdx, 0x270
jne 0x4b4a30
mov qword [rbx + 0x9c0], 0x270
add rsp, 0x38
pop rbx
pop rsi
ret
mov rsi, qword [rsi]
lea rdx, [rsp + 0x28]
xor r8d, r8d
mov rcx, rsi
call sym.strtoul
cmp byte [rsi], 0
mov ecx, eax
je 0x4b4a89
mov rax, qword [rsp + 0x28]
cmp byte [rax], 0
je 0x4b4a24
lea rcx, str.random_device::random_device_const_std::string_
call method.std.__throw_runtime_error_char_const_
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x52a5b0
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
nop
nop
nop
nop
nop
nop
Function at 0x140002a4c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002a96
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002a96
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002a96
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002a96
cmp dword [rcx + 0x84], 0xe
jbe 0x140002a96
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002a98
xor al, al
add rsp, 0x28
ret

Function at 0x14000869c
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x1400084fb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400084fb
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400084fb
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400084fb
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400084fb
cmp dword [rcx + 0x84], 0xe
jbe 0x1400084fb
cmp dword [rcx + 0xf8], 0
je 0x1400084fb
mov ecx, ebx
call fcn.1400085b8
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140008388
nop
cmp dword [rbp + 0x20], 0
je 0x140008549
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140008554
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000848c
Function at 0x14000bc44
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14000bccb
mov rsi, rbx
cmp word [rax], bp
je 0x14000bc8a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14000bc74
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14000bc70
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140009c20
mov rdi, rax
test rax, rax
je 0x14000bcb8
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140007d10
mov rbp, rdi
xor ecx, ecx
call fcn.140009be4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140011570
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140011598
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140011598
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret