joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140007200
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x98
mov rax, qword [0x140013008]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x80], 0
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x68], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0xffffffffffffffff
jne 0x1400072c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_open_the_DLL_file__Error_Code__x_n
call fcn.140001070
mov eax, 0xffffffff
jmp 0x14000741a
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0xffffffff
je 0x1400072e8
cmp dword [rsp + 0x40], 0
jne 0x1400072fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x14000ff00]
call fcn.140001070
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x70]
mov r8, rcx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140007349
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_get_the_DLL_file_size__Error_Code__x_n
call fcn.140001070
mov eax, 0xffffffff
jmp 0x14000741a
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x80]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140007389
lea rcx, str.Failed_to_alloc_a_buffer_
call fcn.140001070
mov eax, 0xffffffff
jmp 0x14000741a
mov r8d, dword [rsp + 0x68]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x1400073c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_open_the_target_process__Error_Code__x_n
call fcn.140001070
mov eax, 0xffffffff
jmp 0x14000741a
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x58]
call fcn.140003da0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0xffffffff
jne 0x1400073e7
mov eax, 0xffffffff
jmp 0x14000741a
cmp qword [rsp + 0x48], 0
je 0x140007405
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x48]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x58], 0
je 0x140007418
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.14000b3a0
add rsp, 0x98
ret
Function at 0x14000cd10
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x10088
call fcn.14002c240
sub rsp, rax
mov rax, qword [0x14005be78]
xor rax, rsp
mov qword [rsp + 0x10070], rax
xor eax, eax
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x70], ax
mov word [rsp + 0x20], ax
lea r8d, [rax + 0x28]
call fcn.140027770
mov r8d, 0x10000
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x14000cd8d
lea rcx, [rsp + 0x70]
call fcn.140034694
mov rcx, qword [rsp + 0x10070]
xor rcx, rsp
call fcn.14002c210
add rsp, 0x10088
ret
xor eax, eax
mov rcx, qword [rsp + 0x10070]
xor rcx, rsp
call fcn.14002c210
add rsp, 0x10088
ret

Function at 0x14000ce70
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14005be78]
xor rax, rsp
mov qword [rsp + 0x70], rax
lea rcx, [0x140042190]
call fcn.14000cd10
xor edi, edi
mov qword [0x14005dbf0], rax
lea rdx, [0x140042190]
mov word [rsp + 0x20], di
lea rcx, [rsp + 0x20]
lea r8d, [rdi + 0x28]
call fcn.140027770
lea rdx, [0x140042198]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, str.PYTHONHOME
call fcn.14000cd10
mov cl, 1
mov qword [0x14005dbf8], rax
call fcn.1400289a0
lea r8d, [rdi + 0x28]
mov word [rsp + 0x20], di
lea rdx, str.PYTHONHOME
mov rbx, rax
lea rcx, [rsp + 0x20]
call fcn.140027770
mov rdx, rbx
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov cl, 1
call fcn.1400289a0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov rax, qword [sym.imp.python310.dll__Py_path_config]
mov dword [rax + 0x30], 1
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14002c210
mov rbx, qword [rsp + 0x90]
add rsp, 0x80
pop rdi
ret
Function at 0x14000d2a0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x14005be78]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rbp, rdx
mov rsi, rcx
call fcn.14001acc0
lea rdx, str.environ
mov rcx, rax
call qword [sym.imp.python310.dll_PyObject_GetAttrString]
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.python310.dll_PyUnicode_FromString]
mov rdx, rsi
lea rcx, [rsp + 0x20]
mov rdi, rax
xor eax, eax
mov word [rsp + 0x20], ax
lea r8d, [rax + 0x28]
call fcn.140027770
lea rcx, [rsp + 0x20]
test rbp, rbp
je 0x14000d361
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, 0xffffffffffffffff
mov rcx, rbp
call sub.python310.dll_PyUnicode_FromWideChar
mov r8, rax
mov rdx, rdi
mov rcx, rbx
mov rsi, rax
call qword [sym.imp.python310.dll_PyObject_SetItem]
test eax, eax
je 0x14000d34f
mov ecx, 1
call qword [sym.imp.python310.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python310.dll_Py_Exit]
int3
sub qword [rsi], 1
jne 0x14000d37e
mov rax, qword [rsi + 8]
mov rcx, rsi
call qword [rax + 0x30]
jmp 0x14000d37e
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.python310.dll_PyObject_DelItem]
test eax, eax
je 0x14000d37e
call fcn.14000c940
sub qword [rdi], 1
jne 0x14000d38e
mov rax, qword [rdi + 8]
mov rcx, rdi
call qword [rax + 0x30]
sub qword [rbx], 1
jne 0x14000d39e
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14002c210
mov rbx, qword [rsp + 0xb0]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret
Function at 0x140027820
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov r8, rcx
mov eax, 0xffffffff
test edx, edx
je 0x1400278e4
mov r9d, edx
nop dword [rax]
nop word [rax + rax]
movzx edx, byte [r8]
lea r8, [r8 + 1]
xor eax, edx
mov edx, eax
and dl, 1
neg dl
sbb ecx, ecx
shr eax, 1
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
and al, 1
neg al
sbb edx, edx
shr ecx, 1
and edx, 0xedb88320
xor edx, ecx
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0xedb88320
xor ecx, edx
mov eax, ecx
and al, 1
neg al
sbb edx, edx
shr ecx, 1
and edx, 0xedb88320
xor edx, ecx
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0xedb88320
xor ecx, edx
mov eax, ecx
and al, 1
neg al
sbb edx, edx
shr ecx, 1
and edx, 0xedb88320
xor edx, ecx
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0xedb88320
xor ecx, edx
mov eax, ecx
and al, 1
neg al
sbb eax, eax
shr ecx, 1
and eax, 0xedb88320
xor eax, ecx
sub r9, 1
jne 0x140027840
not eax
ret
Function at 0x140033f60
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140033d8c
Function at 0x140001090
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x58
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rsp + 0x48], rax
movzx eax, byte [rdx]
mov r11, rcx
mov r10, qword [rsp + 0x88]
shl eax, 0x18
mov dword [rsp + 0x38], eax
movzx eax, word [rdx + 1]
mov dword [rsp + 0x3c], eax
mov rax, qword [rdx + 3]
add rdx, 0xb
mov qword [rsp + 0x40], rax
mov rax, qword [rcx + 8]
mov qword [r10], rax
mov rax, qword [rcx + 8]
mov qword [rsp + 0x28], r10
movzx ecx, word [rax]
mov dword [r10 + 8], ecx
lea rcx, str.ETW0
mov qword [r10 + 0x10], rdx
mov dword [r10 + 0xc], 2
movzx eax, word [rdx]
lea rdx, [rsp + 0x38]
mov dword [r10 + 0x18], eax
lea rax, [0x1400f664e]
sub eax, ecx
mov dword [r10 + 0x1c], 1
mov rcx, qword [r11 + 0x20]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_EventWriteTransfer]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400be470
add rsp, 0x58
ret
Function at 0x14001b3fc
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
mov qword [rbp - 0x39], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rdi
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rbp + 0x4f], rax
mov ebx, edx
mov rdi, rcx
and qword [rbp + 0x47], 0
lea rax, [rbp + 0x47]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftUEVAgentConfiguration
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x14001b4be
mov dword [rbp + 0x37], 4
mov rcx, qword [rbp + 0x47]
test rcx, rcx
je 0x14001b4fa
lea rax, [rbp + 0x37]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3f]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x3b]
xor r8d, r8d
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
test eax, eax
jne 0x14001b4cd
mov edx, dword [rbp + 0x3b]
cmp edx, 4
jne 0x14001b4b0
mov ebx, dword [rbp + 0x3f]
jmp 0x14001b4cd
lea rcx, str.AgentService.Util::GetDwordConfigValue:_Unexpected_value_type__type__0x_X
call fcn.1400045a0
jmp 0x14001b4cd
mov edx, eax
lea rcx, str.AgentService.Util::GetDwordConfigValue:_Failed_to_open_configuration_key__status__0x_X
call fcn.1400045a0
nop
lea rcx, [rbp + 0x47]
call fcn.140006264
mov eax, ebx
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.1400be470
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp - 0x31]
call fcn.1400062c8
nop
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 9]
call fcn.140005ae4
lea rdx, [0x140116d40]
lea rcx, [rbp - 9]
call sub.msvcrt.dll__CxxThrowException
int3
Function at 0x14001fba4
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x150]
sub rsp, 0x250
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rbp + 0x140], rax
xor r12d, r12d
lea rax, [rsp + 0x30]
mov qword [rdx], r12
lea r8, [rsp + 0x30]
mov r14d, r12d
sub rcx, rax
mov r15, rdx
mov r9d, 0x104
lea rax, [r9 + 0x7ffffefa]
test rax, rax
je 0x14001fc19
movzx eax, word [rcx + r8]
test ax, ax
je 0x14001fc19
mov word [r8], ax
add r8, 2
sub r9, 1
jne 0x14001fbf5
lea rax, [r8 - 2]
test r9, r9
lea rcx, [rsp + 0x30]
cmovne rax, r8
lea r8, [0x1400dd578]
mov word [rax], r12w
call fcn.14001cf54
mov edi, 0x1f0003
lea r8, [rsp + 0x30]
mov ecx, edi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x14001fc88
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 2
je 0x14001fd7d
mov rcx, qword [rbp + 0x178]
mov edx, 0xc9
call fcn.14001e748
mov esi, eax
jmp 0x14001fd61
lea rdx, [rsp + 0x24]
mov dword [rsp + 0x24], r12d
mov rcx, rbx
mov dword [rsp + 0x20], r12d
call fcn.14001ec98
mov esi, eax
test eax, eax
jns 0x14001fcc6
mov rcx, qword [rbp + 0x178]
mov r9d, eax
mov edx, 0xcf
call fcn.14001e70c
mov rcx, rbx
call fcn.14001e7dc
jmp 0x14001fd61
lea r8, [0x1400dd580]
lea rcx, [rsp + 0x30]
call fcn.14001cf54
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
jne 0x14001fd09
mov rcx, qword [rbp + 0x178]
mov edx, 0xd5
call fcn.14001e748
mov esi, eax
jmp 0x14001fcb9
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.14001ec98
mov esi, eax
test eax, eax
jns 0x14001fd3d
mov rcx, qword [rbp + 0x178]
mov r9d, eax
mov edx, 0xd7
call fcn.14001e70c
mov rcx, rdi
call fcn.14001e7dc
jmp 0x14001fcb9
mov rcx, rdi
call fcn.14001e7dc
movsxd rax, dword [rsp + 0x20]
mov rcx, rbx
movsxd r14, dword [rsp + 0x24]
shl rax, 0x1f
or r14, rax
call fcn.14001e7dc
mov esi, r12d
test esi, esi
jns 0x14001fd7d
mov rcx, qword [rbp + 0x178]
mov r9d, esi
mov edx, 0x62
call fcn.14001e70c
mov eax, esi
jmp 0x14001fd82
mov qword [r15], r14
xor eax, eax
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.1400be470
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140021ce0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov esi, edx
mov rdi, rcx
or ebx, 0xffffffff
cmp edx, ebx
jne 0x140021d22
xor eax, eax
jmp 0x140021f06
mov rax, qword [rcx + 0x40]
cmp qword [rax], 0
je 0x140021d5c
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
mov rcx, r8
add rcx, qword [rax]
cmp qword [rax], rcx
jae 0x140021d5c
lea ecx, [r8 - 1]
mov dword [rdx], ecx
mov rdx, qword [rdi + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], sil
mov eax, esi
jmp 0x140021f06
cmp qword [rdi + 0x90], 0
je 0x140021f04
mov rdx, qword [rdi + 0x18]
lea rax, [rdi + 0x80]
cmp qword [rdx], rax
jne 0x140021d93
mov rcx, qword [rdi + 0x70]
mov rax, qword [rdi + 0x68]
mov qword [rdx], rax
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
and dword [rax], 0
cmp qword [rdi + 0x78], 0
jne 0x140021dbb
movsx ecx, sil
mov rdx, qword [rdi + 0x90]
call qword [sym.imp.msvcrt.dll_fputc]
nop dword [rax + rax]
cmp eax, ebx
cmovne ebx, esi
jmp 0x140021f04
mov byte [rbp - 0x19], sil
mov qword [rbp + 0x1f], 0xf
and qword [rbp + 0x17], 0
mov byte [rbp + 7], 0
xor r8d, r8d
lea edx, [r8 + 8]
lea rcx, [rbp + 7]
call fcn.140011068
nop
lea r8, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae r8, qword [rbp + 7]
lea r9, [rbp + 7]
cmovae r9, qword [rbp + 7]
mov rcx, qword [rdi + 0x78]
mov rdx, qword [rcx]
add r8, qword [rbp + 0x17]
mov rax, qword [rdx + 0x38]
lea rdx, [rbp - 0x11]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], r9
lea rdx, [rbp - 9]
mov qword [rsp + 0x20], rdx
lea r9, [rbp - 0x18]
lea r8, [rbp - 0x19]
lea rdx, [rdi + 0x84]
call qword [0x1400d12d8]
test eax, eax
js 0x140021eed
cmp eax, 1
jg 0x140021ecc
lea rax, [rbp + 7]
mov rdx, qword [rbp + 7]
mov r10, qword [rbp + 0x1f]
cmp r10, 0x10
cmovae rax, rdx
mov r14, qword [rbp - 0x11]
sub r14, rax
je 0x140021e92
lea rcx, [rbp + 7]
cmp r10, 0x10
cmovae rcx, rdx
mov r9, qword [rdi + 0x90]
mov r8, r14
mov edx, 1
call qword [sym.imp.msvcrt.dll_fwrite]
nop dword [rax + rax]
cmp r14, rax
jne 0x140021eed
mov byte [rdi + 0x81], 1
lea rax, [rbp - 0x19]
cmp qword [rbp - 9], rax
jne 0x140021ec8
test r14, r14
jne 0x140021de1
cmp qword [rbp + 0x17], 0x20
jae 0x140021eed
xor r8d, r8d
lea edx, [r14 + 8]
lea rcx, [rbp + 7]
call fcn.1400070c8
jmp 0x140021de1
mov ebx, esi
jmp 0x140021eed
cmp eax, 3
jne 0x140021eed
movsx ecx, byte [rbp - 0x19]
mov rdx, qword [rdi + 0x90]
call qword [sym.imp.msvcrt.dll_fputc]
nop dword [rax + rax]
cmp eax, ebx
cmovne ebx, esi
cmp qword [rbp + 0x1f], 0x10
jb 0x140021f04
mov rcx, qword [rbp + 7]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400be470
mov rbx, qword [rsp + 0xe0]
add rsp, 0xa0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x14002248c
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rdi, rcx
xor ebx, ebx
cmp qword [rcx + 0x78], rbx
je 0x1400225f5
cmp byte [rcx + 0x81], bl
je 0x1400225f5
or edx, 0xffffffff
call fcn.140021ce0
cmp eax, 0xffffffff
jne 0x1400224ec
xor al, al
jmp 0x1400225fa
mov qword [rbp - 0x18], 0xf
mov qword [rbp - 0x20], rbx
mov byte [rbp - 0x30], bl
xor r8d, r8d
lea edx, [r8 + 8]
lea rcx, [rbp - 0x30]
call fcn.140011068
nop
mov esi, 1
lea r9, [rbp - 0x30]
cmp qword [rbp - 0x18], 0x10
cmovae r9, qword [rbp - 0x30]
lea r8, [rbp - 0x30]
cmovae r8, qword [rbp - 0x30]
mov rcx, qword [rdi + 0x78]
mov rdx, qword [rcx]
add r9, qword [rbp - 0x20]
mov rax, qword [rdx + 0x40]
lea rdx, [rbp - 0x40]
mov qword [rsp + 0x20], rdx
lea rdx, [rdi + 0x84]
call qword [0x1400d12d8]
mov ecx, eax
test eax, eax
je 0x14002255e
sub ecx, esi
je 0x140022564
cmp ecx, 2
jne 0x1400225da
jmp 0x1400225d7
mov byte [rdi + 0x81], bl
lea rax, [rbp - 0x30]
mov rdx, qword [rbp - 0x30]
mov r10, qword [rbp - 0x18]
cmp r10, 0x10
cmovae rax, rdx
mov r14, qword [rbp - 0x40]
sub r14, rax
je 0x1400225ab
lea rcx, [rbp - 0x30]
cmp r10, 0x10
cmovae rcx, rdx
mov r9, qword [rdi + 0x90]
mov r8, r14
mov rdx, rsi
call qword [sym.imp.msvcrt.dll_fwrite]
nop dword [rax + rax]
cmp r14, rax
jne 0x1400225d4
cmp byte [rdi + 0x81], bl
je 0x1400225d1
test r14, r14
jne 0x140022511
xor r8d, r8d
lea edx, [r14 + 8]
lea rcx, [rbp - 0x30]
call fcn.1400070c8
jmp 0x140022511
mov bl, sil
mov sil, bl
mov bl, sil
cmp qword [rbp - 0x18], 0x10
jb 0x1400225f1
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop dword [rax + rax]
mov al, bl
jmp 0x1400225fa
mov eax, 1
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400be470
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140028488
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x190
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov r12, rdx
mov rdi, rcx
cmp qword [rcx + 0x18], 8
jb 0x1400284c9
mov rcx, qword [rcx]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
mov r15d, eax
xor esi, esi
test eax, eax
je 0x140028586
lea eax, [rsi + 2]
mul r15
lea r14, [rsi - 1]
cmovo rax, r14
mov rcx, rax
call fcn.1400a1a90
mov rbx, rax
mov qword [rsp + 0x28], rax
cmp qword [rdi + 0x18], 8
jb 0x14002850f
mov rdi, qword [rdi]
mov r8d, r15d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
test eax, eax
je 0x1400285ce
cmp word [rbx], si
je 0x14002853e
inc r14
cmp word [rbx + r14*2], si
jne 0x140028531
mov rsi, r14
mov r8, rsi
mov rdx, rbx
mov rcx, r12
call fcn.1400064bc
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop dword [rax + rax]
nop
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.1400be470
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x190
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
lea rdx, str.Cannot_expand_environment_strings
lea rcx, [rsp + 0x38]
call fcn.1400062c8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8d, eax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x110]
call fcn.140005970
lea rdx, [0x140116c60]
lea rcx, [rsp + 0x110]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Cannot_expand_environment_strings
lea rcx, [rsp + 0x38]
call fcn.1400062c8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8d, eax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xa0]
call fcn.140005970
lea rdx, [0x140116c60]
lea rcx, [rsp + 0xa0]
call sub.msvcrt.dll__CxxThrowException
int3
Function at 0x14003ecf0
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rsp + 0x28], rax
xor ebx, ebx
cmp qword [0x14011a3b0], rbx
jne 0x14003ed87
lea r9, [rsp + 0x20]
xor r8d, r8d
mov edx, 0x8000
lea rcx, [0x1400e5168]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
nop dword [rax + rax]
test eax, eax
js 0x14003ed76
mov rdx, qword [rsp + 0x20]
cmp word [rdx], bx
je 0x14003ed4e
or rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], bx
jne 0x14003ed42
mov rbx, rax
mov r8, rbx
lea rcx, [0x14011a3a0]
call fcn.1400064bc
mov r8d, 0x18
lea rdx, str.MicrosoftUEVTemplates
lea rcx, [0x14011a3a0]
call fcn.1400065a4
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
lea rax, [0x14011a3a0]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400be470
add rsp, 0x30
pop rbx
ret

Function at 0x14003ee1c
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x140120c80]
xor rax, rsp
mov qword [rsp + 0x48], rax
and dword [rsp + 0x30], 0
lea rdx, str.SOFTWAREMicrosoftHvsiOffice
and qword [rsp + 0x40], 0
mov eax, 4
mov dword [rsp + 0x38], eax
mov r9d, 0x20019
mov dword [rsp + 0x34], eax
xor r8d, r8d
lea rax, [rsp + 0x40]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
xor bl, bl
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov ecx, eax
movzx eax, ax
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
test eax, eax
js 0x14003eeda
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.OfficeWDAGEnabledOnHost
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
mov ecx, eax
movzx eax, ax
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
test eax, eax
js 0x14003eeda
cmp dword [rsp + 0x30], 1
sete bl
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14003eef0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov al, bl
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400be470
add rsp, 0x50
pop rbx
ret