joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140044840
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x338]
sub rsp, 0x410
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rbp + 0x300], rax
mov rdi, rdx
mov r14, rcx
xor r12d, r12d
cmp qword [rcx + 0x30], r12
jne 0x1400448b2
lea r8, str.ORegistryKey.GetValueNames_failure:_Cannot_get_all_value_names._The_registry_is_closed_or_not_set
lea edx, [r12 + 0x3a]
lea rcx, [rsp + 0x70]
call fcn.140043fa0
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call fcn.140044cc0
mov esi, eax
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x68], 7
mov rcx, r12
mov qword [rsp + 0x60], rcx
mov word [rsp + 0x50], r12w
mov r15, qword [rdi + 8]
mov rbx, qword [rdi]
cmp rbx, r15
je 0x1400448fc
xor r8d, r8d
mov dl, 1
mov rcx, rbx
call fcn.140004f90
add rbx, 0x20
cmp rbx, r15
jne 0x1400448e1
mov rcx, qword [rsp + 0x60]
mov rax, qword [rdi]
mov qword [rdi + 8], rax
test esi, esi
je 0x140044a15
mov ebx, 0x3fff
dec esi
mov dword [rsp + 0x40], 0x4000
cmp rcx, rbx
jb 0x14004493f
mov qword [rsp + 0x60], rbx
lea rax, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rax, qword [rsp + 0x50]
mov word [rax + 0x7ffe], r12w
jmp 0x140044952
xor r8d, r8d
mov rdx, rbx
sub rdx, rcx
lea rcx, [rsp + 0x50]
call fcn.140005280
lea r8, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r8, qword [rsp + 0x50]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x40]
mov edx, esi
mov rcx, qword [r14 + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov r8d, eax
test eax, eax
jne 0x1400449e4
mov edx, dword [rsp + 0x40]
cmp rdx, qword [rsp + 0x60]
ja 0x1400449b7
mov qword [rsp + 0x60], rdx
lea rax, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rax, qword [rsp + 0x50]
mov word [rax + rdx*2], r12w
jmp 0x1400449c9
xor r8d, r8d
sub rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x50]
call fcn.140005280
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.140037150
test esi, esi
je 0x140044a15
mov rcx, qword [rsp + 0x60]
jmp 0x140044910
lea rax, [r14 + 0x10]
mov qword [rsp + 0x20], rax
lea r9, str.ORegistryKey.GetValueNames_failure:_Cannot_get_all_value_names_for_registry__s
mov edx, 0xf
lea rcx, [rsp + 0x70]
call fcn.14003ffc8
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x50]
call fcn.140004f90
mov rcx, qword [rbp + 0x300]
xor rcx, rsp
call fcn.1400387b0
lea r11, [rsp + 0x410]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140044a50
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x2d0]
sub rsp, 0x3d0
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rbp + 0x2c0], rax
xor esi, esi
mov rbx, rdx
mov rdi, rcx
cmp qword [rcx + 0x30], rsi
je 0x140044b11
cmp qword [rdx + 0x10], 0x3fff
ja 0x140044b39
mov rcx, qword [r8 + 8]
mov eax, 0xffffffff
sub rcx, qword [r8]
cmp rcx, rax
ja 0x140044b65
mov rax, rcx
neg rax
sbb rdx, rdx
and rdx, qword [r8]
cmp qword [rbx + 0x18], 8
jb 0x140044ac5
mov rax, qword [rbx]
jmp 0x140044ac8
mov rax, rbx
mov dword [rsp + 0x28], ecx
mov r9d, 3
mov rcx, qword [rdi + 0x30]
xor r8d, r8d
mov qword [rsp + 0x20], rdx
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140044b98
mov rcx, qword [rbp + 0x2c0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x408]
add rsp, 0x3d0
pop rdi
pop rsi
pop rbp
ret
lea r8, str.ORegistryKey.SetValue_failure:_Registry_key_is_not_initialized
mov edx, 0x3a
lea rcx, [rsp + 0x30]
call fcn.14003b748
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea r9, [rcx + 0x10]
mov edx, 0x1d
lea rcx, [rsp + 0x30]
lea r8, str.ORegistryKey.SetValue_failure:_Cannot_set_binary_into_registry_key__s._The_value_name_is_too_long
call fcn.140044024
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, [0x14008be38]
mov dword [rsp + 0x30], 0x5d
lea rcx, [rsp + 0x30]
mov dword [rbp + 0x134], esi
mov word [rbp + 0x238], si
mov word [rbp + 0x138], si
mov word [rsp + 0x34], si
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rcx, [rdi + 0x10]
mov r8d, eax
mov qword [rsp + 0x28], rcx
lea r9, str.ORegistryKey.SetValue_failure:_Cannot_set_binary___s__reg_value__s.
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rbx
mov edx, 0xf
call fcn.140043a50
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3

Function at 0x140045b4c
Capabilities:
Query service status

Disassembly:
sub rsp, 0x3e8
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x3d0], rax
mov rcx, qword [rcx + 8]
lea rax, [rsp + 0x30]
and dword [rsp + 0x30], 0
mov r8, rdx
xor edx, edx
mov qword [rsp + 0x20], rax
mov r9d, 0x24
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140045ba5
mov rcx, qword [rsp + 0x3d0]
xor rcx, rsp
call fcn.1400387b0
add rsp, 0x3e8
ret
lea r8, str.Failed_to_query_service_Status
mov edx, 0x74
lea rcx, [rsp + 0x40]
call fcn.140005f68
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x140045bd0
Capabilities:
Start service

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rdi, rcx
xor r8d, r8d
mov rcx, qword [rcx + 8]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov dword [rsp + 0x38], eax
test eax, eax
jne 0x140045c1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
mov ecx, 2
cmp eax, 0x420
jne 0x140045c27
lea rdx, str.OService::StartService___Service_instance_already_running
call fcn.140045414
cmp byte [rdi + 0x28], 0
je 0x140045c76
mov rbx, qword [rdi + 0x18]
jmp 0x140045c4d
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x38]
lea rdx, str.OService::StartService___Failed_to_Start_Service_:_ret___d_:_errCode___d
call fcn.1400455cc
xor al, al
jmp 0x140045c78
add rbx, 0xffffffffffffffd0
mov rcx, rbx
call fcn.140045bd0
cmp rbx, qword [rdi + 0x10]
jne 0x140045c41
mov rsi, qword [rdi + 0x18]
mov rbx, qword [rdi + 0x10]
jmp 0x140045c69
mov rcx, rbx
call fcn.140045a30
add rbx, 0x30
cmp rbx, rsi
jne 0x140045c5d
mov rax, qword [rdi + 0x10]
mov qword [rdi + 0x18], rax
mov al, 1
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x140045cbc
Capabilities:
Stop service

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r14, rdx
mov r15d, r8d
lea rdx, [rbp - 0x58]
mov rsi, rcx
call fcn.140045b4c
mov eax, dword [rbp - 0x54]
xor edi, edi
mov byte [r14], dil
cmp eax, 1
je 0x140045ddb
mov ebx, dword [rbp - 0x40]
cmp byte [rsi + 0x28], dil
je 0x140045d1a
mov edx, r15d
mov rcx, rsi
call fcn.140045e04
mov eax, dword [rbp - 0x54]
mov byte [r14], 1
cmp eax, 3
je 0x140045d6d
mov rcx, qword [rsi + 8]
lea r8, [rbp - 0x30]
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140045d67
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x60], eax
cmp eax, 0x426
je 0x140045d63
lea r8, [rbp - 0x60]
mov ecx, 2
lea rdx, str.OService::StopServiceRecursive___Failed_to_control_service_:_errCode___d
call fcn.140045574
xor al, al
jmp 0x140045dde
mov al, 1
jmp 0x140045dde
mov ebx, dword [rbp - 0x18]
mov eax, dword [rbp - 0x54]
cmp eax, 1
je 0x140045ddb
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, r15d
cmp eax, 0x7fffffff
jb 0x140045dbc
cmp ebx, 0x2710
jbe 0x140045d96
mov eax, 0xcccccccd
mul ebx
shr edx, 3
jmp 0x140045d9b
mov edx, 0x3e8
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x58]
mov rcx, rsi
call fcn.140045b4c
mov eax, dword [rbp - 0x54]
mov ebx, dword [rbp - 0x40]
cmp eax, 1
jne 0x140045d72
jmp 0x140045dbf
mov eax, dword [rbp - 0x54]
cmp eax, 1
je 0x140045ddb
lea rdx, str.OService::StopServiceRecursive___Timed_out_waiting_for_service_to_stop
mov ecx, 2
call fcn.14004551c
mov eax, dword [rbp - 0x54]
cmp eax, 1
sete al
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140047650
Capabilities:
Get common file path

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x510]
sub rsp, 0x610
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rbp + 0x500], rax
mov r14, r9
mov al, r8b
mov rsi, rdx
mov rdi, rcx
cmp qword [rdx + 0x18], 8
jb 0x140047695
mov rdx, qword [rdx]
cmp qword [rcx + 0x18], 8
jb 0x14004769f
mov rcx, qword [rcx]
xor ebx, ebx
mov r8d, ebx
test al, al
sete r8b
lea r9, [rbp + 0x2f0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x1400476f4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rdi
lea r9, str.Cannot_get_temp_file_name_in_path__s_with_prefix__s
mov r8d, eax
lea edx, [rbx + 0xf]
lea rcx, [rsp + 0x60]
call fcn.140047388
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov qword [rsp + 0x50], 7
mov qword [rsp + 0x48], rbx
mov word [rsp + 0x38], bx
cmp word [rbp + 0x2f0], bx
je 0x140047727
lea rcx, [rbp + 0x2f0]
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], bx
jne 0x14004771b
mov rbx, rax
mov r8, rbx
lea rdx, [rbp + 0x2f0]
lea rcx, [rsp + 0x38]
call fcn.1400054c8
nop
lea rax, [rsp + 0x38]
cmp r14, rax
je 0x140047761
xor r8d, r8d
mov dl, 1
mov rcx, r14
call fcn.140004f90
lea rdx, [rsp + 0x38]
mov rcx, r14
call fcn.140004ce8
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x38]
call fcn.140004f90
mov rcx, qword [rbp + 0x500]
xor rcx, rsp
call fcn.1400387b0
add rsp, 0x610
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret

Function at 0x14004783c
Capabilities:
Get file version info

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
and dword [rsp + 0x40], 0
mov rsi, rdx
mov rbx, rcx
call fcn.14001c438
test al, al
jne 0x140047863
xor al, al
jmp 0x1400478b8
cmp qword [rbx + 0x18], 8
jb 0x14004786f
mov rcx, qword [rbx]
jmp 0x140047872
mov rcx, rbx
lea rdx, [rsp + 0x40]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
test eax, eax
je 0x14004785f
mov edx, edi
mov rcx, rsi
call fcn.14000a590
mov rax, qword [rsi + 8]
sub rax, qword [rsi]
neg rax
sbb r9, r9
and r9, qword [rsi]
cmp qword [rbx + 0x18], 8
jb 0x1400478a6
mov rbx, qword [rbx]
mov r8d, edi
xor edx, edx
mov rcx, rbx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
setne al
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x1400479ac
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x328]
sub rsp, 0x410
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rbp + 0x300], rax
mov rbx, rdx
mov rdi, rcx
xor esi, esi
mov dword [rsp + 0x38], esi
mov rcx, qword [rcx + 0x30]
cmp rcx, 0xffffffffffffffff
jne 0x140047a1f
lea r8, str.trying_to_read_from_a_file_thats_not_open
lea edx, [rsi + 0x15]
lea rcx, [rsp + 0x70]
call fcn.140014350
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov r14d, 7
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], rsi
mov word [rsp + 0x48], si
jmp 0x140047a77
cmp dword [rsp + 0x34], 2
jne 0x140047b19
movzx r8d, word [rsp + 0x30]
cmp r8w, 0xa
je 0x140047b19
cmp r8w, 0xd
je 0x140047a9f
mov eax, 0xfeff
cmp r8w, ax
je 0x140047a73
mov edx, 1
lea rcx, [rsp + 0x48]
call fcn.140005280
mov rcx, qword [rdi + 0x30]
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x34], esi
lea r9, [rsp + 0x34]
mov r8d, 2
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140047a36
jmp 0x140047b28
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x34]
mov r8d, 2
lea rdx, [rsp + 0x30]
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140047afe
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x140047b19
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea r9, str.read_from_file_failed
mov edx, 0xf
lea rcx, [rsp + 0x70]
call fcn.14003d138
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
cmp word [rsp + 0x30], 0xa
je 0x140047b19
mov rdx, 0xfffffffffffffffe
lea r8d, [rdx + 3]
mov rcx, rdi
call fcn.140047dac
mov qword [rbx + 0x18], r14
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 0x18], 8
jmp 0x140047b3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x140047b6e
mov qword [rbx + 0x18], r14
mov qword [rbx + 0x10], rsi
cmp r14, 8
jb 0x140047b46
mov rax, qword [rbx]
jmp 0x140047b49
mov rax, rbx
mov word [rax], si
lea rdx, [rsp + 0x48]
mov rcx, rbx
call fcn.140004ce8
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x48]
call fcn.140004f90
mov rax, rbx
jmp 0x140047b9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea r9, str.read_from_file_failed
mov edx, 0xf
lea rcx, [rsp + 0x70]
call fcn.14003d138
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rbp + 0x300]
xor rcx, rsp
call fcn.1400387b0
lea r11, [rsp + 0x410]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
Function at 0x140047bc8
Capabilities:
Move file

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rbp - 8], rax
mov rbx, rdx
mov rdi, rcx
mov eax, 7
mov qword [rbp - 0x30], rax
xor esi, esi
mov qword [rbp - 0x38], rsi
mov word [rbp - 0x48], si
mov qword [rbp - 0x10], rax
mov qword [rbp - 0x18], rsi
mov word [rbp - 0x28], si
lea r8d, [rax - 4]
lea rdx, [0x14007ef80]
lea rcx, [rbp - 0x28]
call fcn.1400054c8
nop
lea r9, [rbp - 0x48]
mov r8b, 1
lea rdx, [rbp - 0x28]
mov rcx, rbx
call fcn.140047650
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x28]
call fcn.140004f90
lea rdx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rdx, qword [rbp - 0x48]
cmp qword [rdi + 0x18], 8
jb 0x140047c65
mov rcx, qword [rdi]
jmp 0x140047c68
mov rcx, rdi
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
lea rcx, [rbp - 0x48]
jne 0x140047c7f
mov rcx, rdi
call fcn.140047cb4
mov bl, al
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x48]
call fcn.140004f90
mov al, bl
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0xa0]
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret

Function at 0x140047cb4
Capabilities:
Move file

Disassembly:
push rbx
sub rsp, 0x20
cmp qword [rcx + 0x18], 8
mov rbx, rcx
jb 0x140047cc6
mov rcx, qword [rcx]
xor edx, edx
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x140047cfd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, [rsp + 0x30]
mov r8, rbx
lea rdx, str.Failed_to_schedule_delete_file__s.__Error_Code:_0x_x.
mov dword [rsp + 0x30], eax
mov ecx, 2
call fcn.140047544
xor al, al
jmp 0x140047cff
mov al, 1
add rsp, 0x20
pop rbx
ret

Function at 0x140047d08
Capabilities:
Set file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x3e0
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x3d0], rax
cmp qword [rcx + 0x18], 8
mov dil, r8b
mov rbx, rcx
mov dword [rsp + 0x30], edx
jb 0x140047d3b
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140047d4a
test dil, dil
jne 0x140047d6b
mov rcx, qword [rsp + 0x3d0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x400]
add rsp, 0x3e0
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.Cannot_set_file__s_attbutes_to__u
mov edx, 0xf
mov r8d, eax
lea rcx, [rsp + 0x40]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
call fcn.140047244
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x1400482a0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
mov eax, 0x103d0
call fcn.140039bb0
sub rsp, rax
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x103c0], rax
xor ebx, ebx
mov rax, rdx
cmp qword [rdx + 0x18], 8
mov rdi, rcx
mov dword [rsp + 0x20], ebx
jb 0x1400482db
mov rax, qword [rdx]
mov r8d, 0x7fff
lea rdx, [rsp + 0x3c0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7ffe
ja 0x140048363
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rbx
mov word [rdi], bx
cmp word [rsp + 0x3c0], bx
je 0x14004832c
lea rcx, [rsp + 0x3c0]
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], bx
jne 0x140048320
mov rbx, rax
mov r8, rbx
lea rdx, [rsp + 0x3c0]
mov rcx, rdi
call fcn.1400054c8
mov rax, rdi
mov rcx, qword [rsp + 0x103c0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x103f0]
add rsp, 0x103d0
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.Failed_to_expand_environment_variables
mov edx, 0xf
mov r8d, eax
lea rcx, [rsp + 0x30]
call fcn.14003a964
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3

Function at 0x140048fd4
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x58
and dword [rsp + 0x20], 0
lea rcx, [rsp + 0x24]
xor edx, edx
lea r8d, [rdx + 0x2c]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [rsp + 0x20]
add rsp, 0x58
ret

Function at 0x140049ae0
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x3f0
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x3e0], rax
cmp qword [rcx + 0x18], 8
mov dil, dl
mov rbx, rcx
jb 0x140049b0f
mov rcx, qword [rcx]
lea r8, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x140049b4c
cmp dword [rsp + 0x20], 0xffffffff
je 0x140049b4c
test byte [rsp + 0x20], 0x10
je 0x140049b4c
cmp qword [rbx + 0x18], 8
jb 0x140049b38
mov rbx, qword [rbx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140049b4c
test dil, dil
jne 0x140049b6f
jmp 0x140049b4e
mov al, 1
mov rcx, qword [rsp + 0x3e0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x408]
add rsp, 0x3f0
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.failed_to_delete_directory
mov edx, 0xf
mov r8d, eax
lea rcx, [rsp + 0x50]
call fcn.140005e10
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov bl, dl
mov rdi, rcx
call fcn.140049900
test bl, bl
mov rcx, rdi
sete dl
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x140049ae0
Function at 0x140049ba0
Capabilities:
Check if file exists
Delete file

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x3d0
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x3c0], rax
cmp qword [rcx + 0x18], 8
mov dil, dl
mov rbx, rcx
jb 0x140049bcf
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140049c23
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140049c23
cmp eax, 5
jne 0x140049c16
mov r8b, dil
lea edx, [rax + 0x7b]
mov rcx, rbx
call fcn.140047d08
cmp qword [rbx + 0x18], 8
jb 0x140049c03
mov rcx, qword [rbx]
jmp 0x140049c06
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140049c23
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140049c23
test dil, dil
jne 0x140049c46
xor al, al
jmp 0x140049c25
mov al, 1
mov rcx, qword [rsp + 0x3c0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x3e8]
add rsp, 0x3d0
pop rdi
ret
lea r9, str.failed_to_delete_file__s
mov qword [rsp + 0x20], rbx
mov r8d, eax
lea rcx, [rsp + 0x30]
mov edx, 0xf
call fcn.140049370
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3

Function at 0x140049c78
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x3f0
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x3e0], rax
cmp qword [rcx + 0x18], 8
mov dil, dl
mov rbx, rcx
jb 0x140049b0f
mov rcx, qword [rcx]
lea r8, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x140049b4c
cmp dword [rsp + 0x20], 0xffffffff
je 0x140049b4c
test byte [rsp + 0x20], 0x10
je 0x140049b4c
cmp qword [rbx + 0x18], 8
jb 0x140049b38
mov rbx, qword [rbx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140049b4c
test dil, dil
jne 0x140049b6f
jmp 0x140049b4e
mov al, 1
mov rcx, qword [rsp + 0x3e0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x408]
add rsp, 0x3f0
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.failed_to_delete_directory
mov edx, 0xf
mov r8d, eax
lea rcx, [rsp + 0x50]
call fcn.140005e10
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov bl, dl
mov rdi, rcx
call fcn.140049900
test bl, bl
mov rcx, rdi
sete dl
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x140049ae0
Function at 0x14004b138
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x3f0
mov rax, qword [0x14007bd60]
xor rax, rsp
mov qword [rsp + 0x3e0], rax
mov rdi, rcx
mov dword [rsp + 0x40], r8d
mov rcx, qword [rcx + 0x30]
mov rbx, rdx
test rcx, rcx
je 0x14004b1c2
cmp qword [rdx + 0x10], 0x3fff
ja 0x14004b1ea
cmp qword [rdx + 0x18], 8
jb 0x14004b17f
mov rdx, qword [rdx]
mov r9d, 4
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x14004b212
mov rcx, qword [rsp + 0x3e0]
xor rcx, rsp
call fcn.1400387b0
mov rbx, qword [rsp + 0x418]
add rsp, 0x3f0
pop rdi
ret
lea r8, str.ORegistryKey.SetValue_failure:_Cannot_set_DWORD_value._The_registry_key_is_closed_or_not_set
mov edx, 0x3a
lea rcx, [rsp + 0x50]
call fcn.14001f600
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea r8, str.ORegistryKey.SetValue_failure:_Cannot_set_DWORD_value._value_name_is_too_long
mov edx, 0x1d
lea rcx, [rsp + 0x50]
call fcn.14004aa50
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rcx, [rdi + 0x10]
mov r8d, eax
mov qword [rsp + 0x30], rcx
lea r9, str.ORegistryKey.SetValue_failure:_Cannot_set_DWORD_name___s__value___i__in_registry_key__s
lea rcx, [rsp + 0x40]
mov edx, 0xf
mov qword [rsp + 0x28], rcx
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rbx
call fcn.14004ab74
lea rdx, [0x14008be38]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3