joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140029198
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Move file
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
xor edi, edi
mov rbx, rcx
cmp qword [rcx + 0x18], 8
jb 0x1400291b1
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
test al, 3
je 0x1400291f4
cmp qword [rbx + 0x18], 8
mov rcx, rbx
jb 0x1400291ce
mov rcx, qword [rbx]
and eax, 0xfffffffc
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
nop dword [rax + rax]
test eax, eax
jne 0x1400291f4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x140029297
cmp qword [rbx + 0x18], 8
mov rcx, rbx
jb 0x140029201
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x140029231
test al, 0x10
je 0x140029231
cmp qword [rbx + 0x18], 8
mov rcx, rbx
jb 0x140029223
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
nop dword [rax + rax]
jmp 0x14002924a
cmp qword [rbx + 0x18], 8
mov rcx, rbx
jb 0x14002923e
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop dword [rax + rax]
test eax, eax
jne 0x140029295
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
lea edx, [rax - 2]
cmp edx, 1
jbe 0x140029295
cmp qword [rbx + 0x18], 8
jb 0x14002926e
mov rbx, qword [rbx]
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
nop dword [rax + rax]
test eax, eax
jne 0x140029295
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov eax, edi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14002a4e0
Capabilities:
Delete registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov rsi, rdx
mov rdi, rcx
and qword [rbp + 0x38], 0
lea rdx, [rbp + 0x38]
mov rcx, rsi
call fcn.14002a768
mov ebx, eax
test eax, eax
je 0x14002a582
call fcn.14000d32c
mov rdi, rax
cmp dword [rax], 3
jbe 0x14002a56f
mov rcx, rsi
call fcn.140007750
mov qword [rbp - 0x40], rax
mov dword [rbp + 0x30], ebx
lea rax, str.Could_not_open_the_registry_key
mov qword [rbp - 0x38], rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
lea rdx, [0x140043d03]
mov rcx, rdi
call fcn.1400072f8
test ebx, ebx
jle 0x14002a5fe
movzx ebx, bx
or ebx, 0x80070000
jmp 0x14002a5fe
lea rax, [rbp - 0x18]
mov qword [rbp - 0x40], rax
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14002a597
mov rdx, qword [rdi]
lea rcx, [rbp - 0x18]
call qword [sym.imp.ntdll.dll_RtlCreateUnicodeString]
nop dword [rax + rax]
test al, al
jne 0x14002a60e
call fcn.14000d32c
mov rbx, rax
cmp dword [rax], 3
jbe 0x14002a5f0
mov rcx, rdi
call fcn.140007750
mov qword [rbp + 0x30], rax
lea rax, str.Could_not_create_a_UNICODE_STRING_to_hold_valueName
mov qword [rbp - 0x38], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x38]
mov qword [rsp + 0x20], rax
lea rdx, [0x140043dd1]
mov rcx, rbx
call fcn.14000953c
lea rcx, [rbp - 0x40]
call fcn.14002a25c
mov ebx, 0x80070057
lea rcx, [rbp + 0x38]
call fcn.140010858
mov eax, ebx
jmp 0x14002a726
lea rdx, [rbp - 0x18]
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.ntdll.dll_NtDeleteValueKey]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14002a6b8
cmp eax, 0xc0000034
je 0x14002a6b8
call fcn.14000d32c
mov r14, rax
cmp dword [rax], 3
jbe 0x14002a69d
mov rcx, rsi
call fcn.140007750
mov qword [rbp - 0x38], rax
mov rcx, rdi
call fcn.140007750
mov qword [rbp - 0x30], rax
mov dword [rbp + 0x30], ebx
lea rax, str.Failed_to_delete_registry_value
mov qword [rbp - 0x28], rax
lea rax, [rbp - 0x38]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
lea rdx, [0x140043e02]
mov rcx, r14
call fcn.140002434
lea rcx, [rbp - 0x40]
call fcn.14002a25c
lea rcx, [rbp + 0x38]
call fcn.140010858
bts ebx, 0x1c
jmp 0x14002a607
call fcn.14000d32c
mov rbx, rax
cmp dword [rax], 4
jbe 0x14002a712
mov rcx, rsi
call fcn.140007750
mov qword [rbp + 0x30], rax
mov rcx, rdi
call fcn.140007750
mov qword [rbp - 0x28], rax
lea rax, str.Delete_registry_value
mov qword [rbp - 0x30], rax
lea rax, [rbp + 0x30]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea rdx, [0x140043d97]
mov rcx, rbx
call fcn.14000189c
lea rcx, [rbp - 0x40]
call fcn.14002a25c
lea rcx, [rbp + 0x38]
call fcn.140010858
xor eax, eax
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x14002a83c
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
and qword [rbp - 0x30], 0
mov rdi, rdx
mov rsi, rcx
movzx r14d, r9b
mov rdx, r8
lea rcx, [rbp - 0x30]
mov r15, r8
call fcn.14002a280
mov ebx, eax
test eax, eax
je 0x14002a88c
jle 0x14002a9d9
movzx ebx, ax
jmp 0x14002a960
cmp qword [rdi + 0x18], 8
lea r9d, [r14*2 + 1]
mov eax, dword [rdi + 0x10]
lea ecx, [rax*2 + 2]
mov rax, rdi
jb 0x14002a8ab
mov rax, qword [rdi]
cmp qword [rsi + 0x18], 8
mov rdx, rsi
jb 0x14002a8b8
mov rdx, qword [rsi]
mov dword [rsp + 0x28], ecx
xor r8d, r8d
mov rcx, qword [rbp - 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14002a968
call fcn.14000d32c
mov r14, rax
cmp dword [rax], 3
jbe 0x14002a959
mov rcx, rdi
call fcn.140007750
mov rcx, r15
mov qword [rbp - 0x28], rax
call fcn.140007750
mov rcx, rsi
mov qword [rbp - 0x20], rax
call fcn.140007750
mov qword [rbp - 0x18], rax
lea rdx, [0x140043e43]
lea rax, str.Failed_to_set_registry_key
mov dword [rbp + 0x40], ebx
mov qword [rbp - 0x10], rax
mov rcx, r14
lea rax, [rbp - 0x28]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
call fcn.140002804
test ebx, ebx
jle 0x14002a9d9
movzx ebx, bx
or ebx, 0x80070000
jmp 0x14002a9d9
call fcn.14000d32c
mov rbx, rax
cmp dword [rax], 4
jbe 0x14002a9d7
mov rcx, rdi
call fcn.140007750
mov rcx, r15
mov qword [rbp - 0x10], rax
call fcn.140007750
mov rcx, rsi
mov qword [rbp - 0x18], rax
call fcn.140007750
mov qword [rbp - 0x20], rax
lea rdx, [0x140043e8b]
lea rax, str.Write_registry_value
mov rcx, rbx
mov qword [rbp - 0x28], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x20], rax
call fcn.1400020bc
xor ebx, ebx
lea rcx, [rbp - 0x30]
call fcn.140010858
lea r11, [rsp + 0x80]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x14002ae50
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov byte [rax + 0x20], r9b
mov dword [rax + 0x10], edx
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x70
and qword [rbp - 0x20], 0
mov rdi, rcx
lea rcx, [rbp - 0x20]
mov rdx, r8
mov r14, r8
call fcn.14002a280
mov ebx, eax
test eax, eax
je 0x14002ae98
jle 0x14002afc5
movzx ebx, ax
jmp 0x14002af53
cmp qword [rdi + 0x18], 8
mov rdx, rdi
jb 0x14002aea5
mov rdx, qword [rdi]
mov rcx, qword [rbp - 0x20]
lea rax, [rbp + 0x28]
mov esi, 4
xor r8d, r8d
mov dword [rsp + 0x28], esi
mov r9d, esi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14002af5b
call fcn.14000d32c
mov rsi, rax
cmp dword [rax], 3
jbe 0x14002af4c
mov ecx, dword [rbp + 0x28]
mov dword [rbp + 0x38], ecx
mov rcx, r14
call fcn.140007750
mov rcx, rdi
mov qword [rbp - 0x18], rax
call fcn.140007750
mov qword [rbp - 0x10], rax
lea rdx, [0x140043fe9]
lea rax, str.Failed_to_set_registry_key
mov dword [rbp + 0x40], ebx
mov qword [rbp - 8], rax
mov rcx, rsi
lea rax, [rbp + 0x38]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 8]
mov qword [rsp + 0x20], rax
call fcn.140002b5c
test ebx, ebx
jle 0x14002afc5
movzx ebx, bx
or ebx, 0x80070000
jmp 0x14002afc5
call fcn.14000d32c
mov rbx, rax
cmp dword [rax], esi
jbe 0x14002afc3
mov ecx, dword [rbp + 0x28]
mov dword [rbp + 0x38], ecx
mov rcx, r14
call fcn.140007750
mov rcx, rdi
mov qword [rbp - 8], rax
call fcn.140007750
mov qword [rbp - 0x10], rax
lea rdx, [0x140044031]
lea rax, str.Write_registry_value
mov rcx, rbx
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x38]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 8]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x18]
mov qword [rsp + 0x20], rax
call fcn.14000220c
xor ebx, ebx
lea rcx, [rbp - 0x20]
call fcn.140010858
lea r11, [rsp + 0x70]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x14003b60c
Capabilities:
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0xb0
xor r14d, r14d
mov dword [rsp + 0x20], r14d
lea rcx, [rax - 0x78]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
mov esi, r14d
xor eax, eax
lock cmpxchg qword [0x140048cc8], rbx
je 0x14003b673
cmp rax, rbx
jne 0x14003b666
mov ebx, 1
mov esi, ebx
jmp 0x14003b678
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
jmp 0x14003b64b
mov ebx, 1
mov eax, dword [0x140048cd0]
cmp eax, ebx
jne 0x14003b690
mov edi, 0x1f
mov ecx, edi
call sub.msvcrt.dll__amsg_exit
jmp 0x14003b6fc
mov eax, dword [0x140048cd0]
test eax, eax
jne 0x14003b6f1
mov dword [0x140048cd0], ebx
lea r15, [0x14003e288]
lea rdi, [0x14003e270]
mov qword [rsp + 0x30], rdi
mov eax, r14d
mov dword [rsp + 0x24], eax
cmp rdi, r15
jae 0x14003b6e3
test eax, eax
jne 0x14003b6e7
cmp qword [rdi], r14
je 0x14003b6d8
mov rax, qword [rdi]
mov rcx, qword [0x14003e230]
call rcx
mov dword [rsp + 0x24], eax
add rdi, 8
mov qword [rsp + 0x30], rdi
jmp 0x14003b6ba
test eax, eax
je 0x14003b6f7
mov eax, 0xff
jmp 0x14003b852
mov dword [0x140048284], ebx
mov edi, 0x1f
mov eax, dword [0x140048cd0]
cmp eax, ebx
jne 0x14003b723
lea rdx, [0x14003e268]
lea rcx, [0x14003e238]
call sub.msvcrt.dll__initterm
mov dword [0x140048cd0], 2
test esi, esi
jne 0x14003b731
mov rax, r14
xchg qword [0x140048cc8], rax
cmp qword [0x140048ce8], r14
je 0x14003b764
lea rcx, [0x140048ce8]
call fcn.14003bbf0
test eax, eax
je 0x14003b764
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
mov rax, qword [0x140048ce8]
mov r9, qword [0x14003e230]
call r9
mov rax, qword [sym.imp.msvcrt.dll__wcmdln]
mov rcx, qword [rax]
test rcx, rcx
jne 0x14003b77d
mov eax, 0xff
jmp 0x14003b852
mov qword [rsp + 0x28], rcx
mov edx, dword [rsp + 0x20]
movzx eax, word [rcx]
cmp ax, 0x20
ja 0x14003b803
test ax, ax
je 0x14003b798
test edx, edx
jne 0x14003b803
sub ax, bx
cmp ax, di
ja 0x14003b7ae
add rcx, 2
mov qword [rsp + 0x28], rcx
movzx eax, word [rcx]
jmp 0x14003b798
test byte [rsp + 0x7c], bl
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rcx
xor edx, edx
lea rcx, [0x140000000]
call fcn.140001fc0
mov dword [0x140048280], eax
cmp dword [0x1400482a0], r14d
jne 0x14003b7ec
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x140048284], r14d
jne 0x14003b801
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x140048280]
jmp 0x14003b852
cmp ax, 0x22
jne 0x14003b817
mov eax, r14d
test edx, edx
sete al
mov edx, eax
mov dword [rsp + 0x20], eax
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x14003b786
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop r15
ret
sub rsp, 0x28
call fcn.140172000
add rsp, 0x28
jmp 0x14003b60c
Function at 0x140001d40
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rbx, rdx
mov edi, ecx
call fcn.1400020c0
test eax, eax
jne 0x140001e7f
xor r8d, r8d
mov rdx, rbx
mov ecx, edi
call sym.run_py3.7_win_amd64.exe_PySys_SetArgvEx
mov rax, qword [0x14000c288]
test rax, rax
jne 0x140001dd3
mov r10, qword [0x14000c248]
mov rbx, qword [0x14000c348]
test r10, r10
je 0x140001da2
nop dword [rax + rax]
cmp rbx, qword [r10]
je 0x140001e8a
mov r10, qword [r10 + 0x10]
test r10, r10
jne 0x140001d90
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.PyImport_ImportModule
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
lea rcx, [0x140004410]
cmove rax, rcx
mov qword [0x14000c288], rax
lea rcx, [0x14000b1fc]
call rax
mov rbx, rax
test rax, rax
je 0x140001e2a
xor r8d, r8d
lea rcx, str._MessageBox
xor edx, edx
call sym.run_py3.7_win_amd64.exe_PyCFunction_NewEx
mov rdx, qword [str._MessageBox]
mov r8, rax
mov rcx, rbx
call sym.run_py3.7_win_amd64.exe_PyObject_SetAttrString
xor r8d, r8d
lea rcx, str._SHGetSpecialFolderPath
xor edx, edx
call sym.run_py3.7_win_amd64.exe_PyCFunction_NewEx
mov rdx, qword [str._SHGetSpecialFolderPath]
mov r8, rax
mov rcx, rbx
call sym.run_py3.7_win_amd64.exe_PyObject_SetAttrString
call fcn.140002a60
lea rcx, str.PYTHONINSPECT
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140001e78
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str._stdin_
call sym.run_py3.7_win_amd64.exe_Py_FdIsInteractive
test eax, eax
je 0x140001e78
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor r8d, r8d
lea rdx, [0x14000b3a8]
mov rcx, rax
call sym.run_py3.7_win_amd64.exe_PyRun_InteractiveLoopFlags
call sym.run_py3.7_win_amd64.exe_Py_Finalize
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov eax, dword [r10 + 0x20]
lea rcx, [0x14000b578]
mov r9, qword [r10 + 8]
mov r8, rbx
xor edx, edx
mov dword [rsp + 0x20], eax
call fcn.140004970
mov rcx, qword [r10]
lea rdx, str.PyImport_ImportModule
call fcn.1400032f0
jmp 0x140001dcc
Function at 0x140001d50
Capabilities:
Create thread
Enumerate gui resources

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x140007040]
xor rax, rsp
mov qword [rsp + 0x78], rax
xor ebp, ebp
mov qword [r11 - 0x30], rbp
mov qword [r11 - 0x38], rbp
mov qword [r11 - 0x40], rbp
mov qword [r11 - 0x48], rbp
mov eax, dword [0x140007794]
mov dword [rsp + 0x38], eax
mov eax, dword [0x140007790]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 0x80000000
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0x80000000
xor r8d, r8d
lea rdx, str.STATIC
mov ecx, 0x800a8
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rsi, rax
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rbp
mov r8d, dword [0x140007794]
mov dword [rsp + 0x38], r8d
mov r8d, dword [0x140007790]
mov dword [rsp + 0x30], r8d
mov dword [rsp + 0x28], 0x80000000
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0x80000000
xor r8d, r8d
lea rdx, str.STATIC
mov ecx, 0x800a8
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rbx, rax
mov rcx, rsi
call qword [sym.imp.USER32.dll_GetWindowDC]
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetWindowDC]
mov rdi, rax
lea r9d, [rbp + 3]
mov r8b, 0xff
xor edx, edx
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetLayeredWindowAttributes]
lea r9d, [rbp + 3]
mov r8b, 0x7a
xor edx, edx
mov rcx, rbx
call qword [sym.imp.USER32.dll_SetLayeredWindowAttributes]
lea edx, [rbp + 5]
mov rcx, rsi
call qword [sym.imp.USER32.dll_ShowWindow]
lea edx, [rbp + 5]
mov rcx, rbx
call qword [sym.imp.USER32.dll_ShowWindow]
lea ecx, [rbp + 0x10]
call fcn.140002468
mov qword [rax], rdi
lea rcx, [0x140001950]
mov qword [rax + 8], rcx
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], ebp
mov r9, rax
lea r8, [0x1400022f0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x68], rax
test rax, rax
je 0x140001ef6
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
xor edx, edx
lea rcx, [0x140001630]
call qword [sym.imp.USER32.dll_EnumWindows]
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
xor edx, edx
mov rcx, rax
call qword [sym.imp.USER32.dll_ShowWindow]
mov rdx, rsi
call fcn.140001aa0
nop
mov dword [rsp + 0x70], ebp
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3

Function at 0x140002f40
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0042f9a0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x0042f9b0]
mov dword [rax], 1
mov rax, qword [0x0042f9c0]
mov dword [rax], 1
mov rax, qword [0x0042f990]
mov dword [rax], 1
mov rax, qword [0x0042f850]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x0042f980]
mov dword [0x00435008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010c2
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call dbg._encode_pointer
mov rdx, qword [0x0042f8e0]
mov qword [rdx], rax
mov rdx, qword [0x0042f8d0]
mov qword [rdx], rax
mov rax, qword [0x0042f940]
mov edx, dword [rax]
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov rax, qword [rax]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x0042f780]
cmp dword [rax], 1
je 0x401120
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 0x401133
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, [dbg._matherr]
call dbg.__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 0x401b98
Capabilities:
Execute command

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
call dbg.__main
lea rcx, str.Nhap_so_luong_phan_tu_n:
call sym.printf
lea rax, [rbp - 0xc]
mov rdx, rax
lea rcx, [0x0042d00d]
call sym.scanf
mov eax, dword [rbp - 0xc]
cdqe
movabs rdx, 0x1fc0000000000000
cmp rax, rdx
ja 0x401bde
shl rax, 2
jmp 0x401be5
mov rax, 0xffffffffffffffff
mov rcx, rax
call sym.operator_new___unsigned_long_long_
mov qword [rbp - 8], rax
mov eax, dword [rbp - 0xc]
mov rdx, qword [rbp - 8]
mov ecx, eax
call dbg.nhapmang(int, int*)
lea rcx, [0x0042d04f]
call sym.system
lea rcx, str._______________MENU_______________
call sym.puts
lea rcx, str.0._Xuat_mang.
call sym.puts
lea rcx, str.1._Sap_xep_cac_vi_tri_le_tang_dan__cac_vi_tri_khac_giu_nguyen_vi_tri_.
call sym.puts
lea rcx, str.2._Sap_xep_so_le_tang_dan__so_chan_tang_dan__vi_tri_tuong_doi_k_doi.
call sym.puts
lea rcx, str.3._Sap_xep_so_nguyen_to_tang_dan__cac_so_khac_giu_nguyen_vi_tri.
call sym.puts
lea rcx, str.4._Sap_xep_so_duong_tang_dan__so_le_giam_dan__vi_tri_tuong_doi_k_doi.
call sym.puts
lea rcx, str.5._THOAT.
call sym.puts
lea rcx, str.
call sym.puts
mov dword [rbp - 0x10], 0
lea rcx, str.Moi_ban_chon_1_so:
call sym.printf
lea rax, [rbp - 0x10]
mov rdx, rax
lea rcx, [0x0042d00d]
call sym.scanf
mov eax, dword [rbp - 0x10]
cmp eax, 5
ja case.default.0x401cba
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x0042d228]
mov eax, dword [rdx + rax]
movsxd rdx, eax
lea rax, [0x0042d228]
add rax, rdx
jmp rax
mov eax, dword [rbp - 0xc]
mov rdx, qword [rbp - 8]
mov ecx, eax
call dbg.xuatmang(int, int*)
jmp 0x401d19
mov eax, dword [rbp - 0xc]
mov rdx, qword [rbp - 8]
mov ecx, eax
call dbg.sapxepcacgiatriletangdan(int, int*)
jmp 0x401d19
mov eax, dword [rbp - 0xc]
mov rdx, qword [rbp - 8]
mov ecx, eax
call dbg.sapxepsonguyentangdansoletangdan(int, int*)
jmp 0x401d19
mov eax, dword [rbp - 0xc]
mov rdx, qword [rbp - 8]
mov ecx, eax
call dbg.sapxepsonguyentangdan(int, int*)
jmp 0x401d19
mov eax, dword [rbp - 0xc]
mov rdx, qword [rbp - 8]
mov ecx, eax
call dbg.sapxepsoduongtangsoamgiam(int, int*)
jmp 0x401d19
lea rcx, str.Gia_tri_nhap_vao_khong_hop_le_
call sym.printf
nop
jmp 0x401c0b
nop
lea rcx, str.Cam_on_
call sym.printf
mov eax, 0
add rsp, 0x30
pop rbp
ret
Function at 0x40e520
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 [0x00435054]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x40e63a
mov rax, qword [0x00435058]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40e56e
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40e620
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40e552
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40e672
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x00435058]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call dbg._GetPEImageBase
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x00435058]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40e655
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40e619
sub eax, 0x40
and eax, 0xffffffbf
je 0x40e619
mov r9, rbp
add r9, qword [0x00435058]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e641
add dword [0x00435054], 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 sym.memcpy
xor ebp, ebp
jmp 0x40e57b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
mov rax, qword [0x00435058]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call dbg.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call dbg.__report_error
nop
nop word cs:[rax + rax]

Function at 0x40f250
Capabilities:
Parse pe header

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

Function at 0x40f270
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 0x40f2b1
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 0x40f2a8
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40f2b3
add rax, 0x28
cmp rax, r9
jne 0x40f294
xor eax, eax
repz ret

Function at 0x40f360
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x0042f850]
cmp word [rbx], 0x5a4d
je 0x40f380
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40f374
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp dbg._FindPESection