joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140022ee0
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rdx, qword [rcx + 0x20]
lea rcx, [0x14015f2e0]
movzx eax, word [rdx + 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rdx + 0x78]
xor edx, edx
mov qword [rsp + 0x48], rax
lea r8d, [rdx + 0x68]
call fcn.1400e43c0
xor ebx, ebx
lea rax, [0x140022960]
mov qword [rsp + 0x28], rbx
lea rdx, [0x140152d30]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9d, [rbx + 3]
lea r8d, [rbx + 0x1c]
call sym.ProcessHacker.exe_PhParseCommandLine
test al, al
je 0x140022f57
mov eax, dword [0x14015f2e0]
bt eax, 0xe
jae 0x140022f7f
lea r8, str.Command_line_options:_n_n_c_n_ctype_command_type_n_cobject_command_object_n_caction_command_action_n_cvalue_command_value_n_debug_n_elevate_n_help_n_hide_n_installkph_n_newinstance_n_nokph_n_noplugins_n_nosettings_n_plugin_pluginname:value_n_priority_rhnl_n_s_n_selectpid_pid_to_select_n_selecttab_name_of_tab_to_select_n_settings_filename_n_sysinfo__section_name__n_uninstallkph_n_v_n
mov edx, 0x40
xor ecx, ecx
call sym.ProcessHacker.exe_PhShowMessage
mov eax, dword [0x14015f2e0]
bt eax, 0xe
jae 0x140022f7f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
test al, 0x20
je 0x140022fe4
mov rcx, qword [0x14015f350]
lea rdx, str.kzzzzzzzzzzzzz.sys
mov rcx, qword [rcx + 8]
call sym.ProcessHacker.exe_PhConcatStrings2
mov dword [rsp + 0x70], 2
lea r8, [rsp + 0x70]
mov byte [rsp + 0x74], 1
mov rdx, qword [rax + 8]
call fcn.1400c0010
mov ebx, eax
test eax, eax
jns 0x140022fdb
test dword [0x14015f2e0], 0x2000
jne 0x140022fdb
xor r9d, r9d
lea rdx, str.Unable_to_install_Kzzzzzzzzzzzzz
mov r8d, eax
xor ecx, ecx
call sym.ProcessHacker.exe_PhShowStatus
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
test al, 0x40
je 0x14002301c
call fcn.1400c0160
mov ebx, eax
test eax, eax
jns 0x140023013
test dword [0x14015f2e0], 0x2000
jne 0x140023013
xor r9d, r9d
lea rdx, str.Unable_to_uninstall_Kzzzzzzzzzzzzz
mov r8d, eax
xor ecx, ecx
call sym.ProcessHacker.exe_PhShowStatus
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
bt eax, 0xc
jae 0x14002306c
lea rcx, [rsp + 0x50]
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte [rax + 8], 1
jne 0x140023066
mov qword [rsp + 0x38], rbx
mov r9d, 5
mov dword [rsp + 0x30], ebx
xor r8d, r8d
mov dword [rsp + 0x28], 5
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 1
call fcn.14000b320
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [0x14015f2e0]
test al, al
jns 0x14002307a
add rsp, 0x60
pop rbx
jmp fcn.140011060
add rsp, 0x60
pop rbx
ret
Function at 0x1400438f0
Capabilities:
Delete registry value
Persist via run registry key
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x80
cmp byte [0x14015c5ba], cl
movzx edi, dl
movzx ebx, cl
jne 0x14004391f
test cl, cl
je 0x140043a72
cmp byte [0x14015c557], dl
je 0x140043a72
mov r8, qword [0x140153510]
mov rax, qword [str.SoftwareMicrosoftWindowsCurrentVersionRun]
mov word [rsp + 0x40], r8w
mov word [rsp + 0x42], r8w
mov qword [rsp + 0x48], rax
cmp r8, 0xfffe
ja 0x140043a72
xor r8d, r8d
lea rax, [rsp + 0xa8]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
lea rcx, [r8 - 9]
call fcn.1400beed0
test eax, eax
js 0x140043a72
lea r8, [rsp + 0x50]
mov qword [rsp + 0x90], rsi
mov edx, 0x20006
lea rcx, [rsp + 0xa0]
call qword [sym.imp.ntdll.dll_NtOpenKey]
mov rcx, qword [rsp + 0xa8]
mov esi, eax
test rcx, rcx
je 0x1400439ab
call qword [sym.imp.ntdll.dll_NtClose]
test esi, esi
mov rsi, qword [rsp + 0x90]
js 0x140043a72
mov dword [rsp + 0x30], 0x220020
lea rax, str.zzzzzzz_zzzzzz_2
mov qword [rsp + 0x38], rax
test bl, bl
je 0x140043a51
mov r8, qword [0x14015f348]
lea r9, [0x14012d794]
lea rdx, [0x14012d794]
mov ecx, 3
mov r8, qword [r8 + 8]
call sym.ProcessHacker.exe_PhConcatStrings
mov rcx, rax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov rcx, rax
test dil, dil
je 0x140043a21
mov rcx, qword [rax + 8]
lea rdx, str.__hide
call sym.ProcessHacker.exe_PhConcatStrings2
mov rcx, rax
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov rcx, rax
mov eax, dword [rcx]
lea rdx, [rsp + 0x30]
add eax, 2
mov r9d, 1
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rax, qword [rcx + 8]
mov rcx, qword [rsp + 0xa0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
jmp 0x140043a64
mov rcx, qword [rsp + 0xa0]
lea rdx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_NtDeleteValueKey]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ntdll.dll_NtClose]
mov rbx, qword [rsp + 0x98]
add rsp, 0x80
pop rdi
ret
Function at 0x1400bfbd0
Capabilities:
Create service
Delete service
Start service

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2b0
mov edi, 1
mov qword [rsp + 0x80], 0x10
lea rax, str.Device_
mov dword [rsp + 0x70], edi
mov qword [rsp + 0x88], rax
lea rcx, [rsp + 0x70]
mov r15, r8
mov dword [rsp + 0x90], edi
mov r12, rdx
mov qword [rsp + 0xa0], 0x1e
lea rax, str.Kzzzzzzzzzzzzz3
xor r13d, r13d
lea edx, [rdi + 1]
mov qword [rsp + 0xa8], rax
mov r9d, 0x200
mov qword [rsp + 0x20], r13
lea r8, [rsp + 0xb0]
xor sil, sil
xor r14b, r14b
call sym.ProcessHacker.exe_PhFormatToBuffer
test al, al
jne 0x1400bfc68
mov eax, 0xc0000106
jmp 0x1400bfe33
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0x2e0], rbx
call fcn.1400bfaa0
mov ebx, eax
mov eax, 0x80000000
lea ecx, [rbx + rax]
test eax, ecx
jne 0x1400bfe29
cmp ebx, 0xc000020a
je 0x1400bfe29
lea eax, [rbx + 0x3ffffff2]
cmp eax, 0x2c
ja 0x1400bfe29
movabs rcx, 0x104000000003
bt rcx, rax
jae 0x1400bfe29
mov r8d, edi
mov qword [rsp + 0x2e8], rbp
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
je 0x1400bfd35
mov r8d, 0x10
lea rdx, str.Kzzzzzzzzzzzzz3
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x1400bfd1e
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
movzx esi, sil
mov rcx, rdi
test eax, eax
mov eax, 1
cmovne esi, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test sil, sil
jne 0x1400bfdfb
mov edi, 1
mov rcx, r12
call qword [sym.imp.ntdll.dll_RtlDoesFileExists_U]
test al, al
je 0x1400bfe21
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
je 0x1400bfe21
lea rax, [0x14010bbf8]
mov r9d, 0xf01ff
mov qword [rsp + 0x60], rax
lea r8, str.Kzzzzzzzzzzzzz3
mov qword [rsp + 0x58], r13
lea rdx, str.Kzzzzzzzzzzzzz3
mov qword [rsp + 0x50], r13
mov rcx, rbp
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
je 0x1400bfded
mov r14b, 1
test r15, r15
je 0x1400bfdd1
mov rdx, r15
call fcn.1400bfe50
mov ebx, eax
test eax, eax
js 0x1400bfe0f
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
movzx esi, sil
mov eax, 1
cmovne esi, eax
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test sil, sil
je 0x1400bfe0a
lea rcx, [rsp + 0xb0]
call fcn.1400bfaa0
mov ebx, eax
test r14b, r14b
je 0x1400bfe21
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbp, qword [rsp + 0x2e8]
mov eax, ebx
mov rbx, qword [rsp + 0x2e0]
mov rsi, qword [rsp + 0x2f0]
add rsp, 0x2b0
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1400bfe50
Capabilities:
Delete registry key
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0xc0
mov rsi, rdx
mov qword [rbp + 0x7f], 0
lea rdx, str.SystemCurrentControlSetServices_
mov ecx, 3
lea r9, str.Parameters
lea r8, str.Kzzzzzzzzzzzzz3
call sym.ProcessHacker.exe_PhConcatStrings
mov rdi, rax
cmp qword [rax], 0xfffe
movzx ecx, word [rax]
mov word [rbp - 0x29], cx
mov word [rbp - 0x27], cx
mov rcx, qword [rax + 8]
mov qword [rbp - 0x21], rcx
jbe 0x1400bfeb9
mov ebx, 0xc0000106
jmp 0x1400bff1d
xor r8d, r8d
lea rax, [rbp + 0x77]
lea r9, [rbp + 0x17]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x29]
lea rcx, [r8 - 3]
call fcn.1400beed0
mov ebx, eax
test eax, eax
js 0x1400bff1d
lea rax, [rbp + 0x67]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [rbp + 0x17]
mov dword [rsp + 0x28], 0
lea rcx, [rbp + 0x7f]
mov edx, 0x30006
mov qword [rsp + 0x20], 0
call qword [sym.imp.ntdll.dll_NtCreateKey]
mov rcx, qword [rbp + 0x77]
mov ebx, eax
test rcx, rcx
je 0x1400bff1d
call qword [sym.imp.ntdll.dll_NtClose]
lea rcx, [rdi - 0x10]
or edx, 0xffffffff
lock xadd dword [rcx + 8], edx
cmp edx, 1
jne 0x1400bff33
call fcn.1400ae900
test ebx, ebx
js 0x1400bfff2
mov rcx, qword [rbp + 0x7f]
lea rax, str.SecurityLevel
mov dword [rsp + 0x28], 4
lea rdx, [rbp - 0x39]
mov r9d, 4
mov qword [rbp - 0x31], rax
xor r8d, r8d
mov dword [rbp - 0x39], 0x1c001a
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x1400bffd8
cmp byte [rsi + 4], 0
je 0x1400bffd4
lea rax, str.DynamicConfiguration
mov dword [rbp - 0x39], 0x2a0028
lea rcx, [rbp - 0x11]
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x19], 3
mov dword [rbp - 0x15], 1
call fcn.1400e2af0
test eax, eax
js 0x1400bffd4
mov rcx, qword [rbp + 0x7f]
lea rax, [rbp - 0x19]
mov dword [rsp + 0x28], 0x2c
lea rdx, [rbp - 0x39]
mov r9d, 3
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test ebx, ebx
jns 0x1400bffe8
cmp dword [rbp + 0x67], 1
jne 0x1400bffe8
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, ebx
mov rbx, qword [rsp + 0xe8]
add rsp, 0xc0
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400c0010
Capabilities:
Create service
Delete service
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x70
mov rsi, r8
mov rdi, rdx
xor ebx, ebx
xor edx, edx
xor ecx, ecx
lea r8d, [rbx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x1400c005d
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1400c0141
movzx eax, ax
or eax, 0xc0070000
jmp 0x1400c0141
lea rax, [0x14010bbf8]
mov r9d, 0xf01ff
mov qword [rsp + 0x60], rax
lea r8, str.Kzzzzzzzzzzzzz3
mov qword [rsp + 0x58], rbx
lea rdx, str.Kzzzzzzzzzzzzz3
mov qword [rsp + 0x50], rbx
mov rcx, rbp
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
je 0x1400c011f
test rsi, rsi
je 0x1400c00e2
mov rdx, rsi
call fcn.1400bfe50
mov ebx, eax
test eax, eax
jns 0x1400c00e2
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400c0136
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x1400c0114
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1400c010b
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400c0136
movzx ebx, ax
or ebx, 0xc0070000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400c0136
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x1400c012d
mov ebx, eax
jmp 0x1400c0136
movzx ebx, ax
or ebx, 0xc0070000
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x1400c0160
Capabilities:
Delete service
Stop service

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x40
xor ebx, ebx
xor edx, edx
xor ecx, ecx
lea r8d, [rbx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x1400c01a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1400c022b
movzx eax, ax
or eax, 0xc0070000
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rsi
ret
mov r8d, 0x10020
mov qword [rsp + 0x50], rdi
lea rdx, str.Kzzzzzzzzzzzzz3
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x1400c0206
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400c01fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x1400c01fb
movzx ebx, ax
or ebx, 0xc0070000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400c021b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x1400c021b
movzx ebx, ax
or ebx, 0xc0070000
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rsi
ret

Function at 0x1400c0500
Capabilities:
Terminate process

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
push rdi
sub rsp, 0x90
mov qword [r11 - 0x48], rcx
lea rax, [0x1400c0b90]
xor ecx, ecx
mov qword [r11 - 0x28], rax
mov dword [rsp + 0x48], ecx
lea rax, [r11 - 0x48]
mov qword [r11 - 0x58], rcx
lea r8, [0x1400c09a0]
mov qword [r11 - 0x20], rax
mov edi, edx
lea rax, [r11 + 0x10]
mov dword [rsp + 0x38], 4
mov qword [r11 - 0x68], rax
xor r9d, r9d
lea rax, [r11 - 0x38]
mov dword [rsp + 0x58], edx
mov dword [rsp + 0x5c], ecx
xor edx, edx
mov rcx, qword [0x14015b300]
mov dword [rsp + 0x28], 0x9999200b
mov qword [r11 - 0x78], rax
mov dword [r11 + 0x10], 2
mov dword [r11 - 0x18], 0xc0000001
call qword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
mov ebx, eax
call qword [sym.imp.ntdll.dll_NtTestAlert]
mov eax, dword [rsp + 0x80]
test ebx, ebx
cmovs eax, ebx
cmp eax, 0xc00000db
jne 0x1400c05a7
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140011be0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140011bf0]
mov dword [rax], 1
mov rax, qword [0x140011c00]
mov dword [rax], 1
mov rax, qword [0x140011b80]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140011bd0]
mov dword [0x140015020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140011cb0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140011c90]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140011b30]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x1400084a0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140008510
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400150b4]
mov rbx, rcx
test esi, esi
jle 0x140008640
mov rax, qword [0x1400150b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000855b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400085e5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140008540
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140008662
mov rax, qword [0x1400150b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400150b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140008647
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400085de
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400085f0
add dword [0x1400150b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400150b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400085de
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 esi, esi
jmp 0x140008568
mov rax, qword [0x1400150b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140008bd0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140015120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140015100]
test rbx, rbx
je 0x140008c2c
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 eax, eax
jne 0x140008c23
test rsi, rsi
je 0x140008c23
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140008c08
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 0x140008e40
Capabilities:
Parse pe header

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

Function at 0x140008e70
Capabilities:
Enumerate pe sections

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

Function at 0x140008ec0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140008f50
mov rdx, qword [0x140011b80]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x140008f3e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x140008f3e
cmp word [rax + 0x18], 0x20b
jne 0x140008f3e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140008f50
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140008f29
add rbx, 0x28
cmp rbx, rdi
je 0x140008f50
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140008f20
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 0x140008f60
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140011b80]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140008f80
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140008f88
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140008f80
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140008fdd
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]
mov rdx, r8
cmp rcx, r8
jb 0x140008fd4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140008f80
add rax, 0x28
cmp rax, r9
jne 0x140008fc0
xor eax, eax
ret

Function at 0x140008fe0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140011b80]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140008fff
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140009008
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140008fff
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140009020
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140011b80]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140009040
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140009048
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140009040
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140009090
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140009087
test rcx, rcx
je 0x140009040
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x140009078
xor eax, eax
ret

Function at 0x1400090a0
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x140011b80]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140009100
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140009108
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140009100
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140009100
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]
mov rax, r8
cmp rcx, r8
jb 0x140009154
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140009160
add rdx, 0x28
cmp r9, rdx
jne 0x140009140
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x140011b80]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140009192
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400091a0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140009192
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140009192
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140009192
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]
mov r8, r9
cmp rax, r9
jb 0x1400091f5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140009208
add rdx, 0x28
cmp rdx, r10
jne 0x1400091e0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140009217
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140009227
mov edx, dword [rax + 0xc]
test edx, edx
je 0x1400091fe
test ecx, ecx
jg 0x140009210
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret