joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003700
Capabilities:
Get thread local storage value
Modify service
Set thread local storage value

Disassembly:
mov r11, rsp
push rbp
sub rsp, 0x90
xor eax, eax
xor ebp, ebp
lea r8, [r11 - 0x38]
mov qword [r11 - 0x18], rax
mov qword [r11 - 0x30], rax
mov qword [r11 - 0x28], rax
mov qword [r11 - 0x20], rax
lea rax, [r11 + 0x10]
mov dword [rsp + 0x60], 0x3c
mov dword [rsp + 0x78], 1
lea edx, [rbp + 2]
mov dword [r11 + 0x10], ebp
mov qword [r11 - 0x18], rax
mov dword [r11 + 0x14], 0x2710
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400038c6
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0xb0], rsi
mov qword [rsp + 0xb8], rdi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140023468]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x1400037a3
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x1400037a3
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400037b2
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdi, [0x140024670]
lea rax, str.Changing_Failure_action_to__u_failed_with_error__u
mov dword [rsp + 0x30], esi
lea r8, str.......CommonSetupHelper.cpp
lea rdx, [0x14001bea8]
mov r9d, 0xd3
mov rcx, rdi
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
call fcn.1400074b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140023468]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x14000380d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x14000380d
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x14000381c
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdi, [0x140024670]
mov ecx, dword [0x14002346c]
mov rbx, qword [rsp + 0xa0]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], rdi
mov dword [rsp + 0x58], 0xff
cmp ecx, 0xffffffff
je 0x140003894
cmp dword [0x140023470], 0xffffffff
je 0x140003894
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x140023470]
mov qword [rsp + 0x40], rax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14002346c]
lea rdx, str.AlterFailureAction
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [0x140023470]
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x1400038a1
mov rcx, rdi
call fcn.140005d90
lea rcx, [rsp + 0x40]
call fcn.1400044b0
mov rdi, qword [rsp + 0xb8]
mov eax, esi
mov rsi, qword [rsp + 0xb0]
add rsp, 0x90
pop rbp
ret
mov eax, ebp
add rsp, 0x90
pop rbp
ret
Function at 0x1400038e0
Capabilities:
Get thread local storage value
Modify service

Disassembly:
mov rax, rsp
sub rsp, 0x68
test rcx, rcx
je 0x1400039c6
mov qword [rax + 8], rbx
xor ebx, ebx
or r9d, 0xffffffff
mov qword [rax - 0x18], rbx
mov qword [rax - 0x20], rbx
mov qword [rax - 0x28], rbx
mov qword [rax - 0x30], rbx
mov qword [rax - 0x38], rbx
mov qword [rax - 0x40], rbx
lea r8d, [rbx + 4]
or edx, r9d
mov qword [rax - 0x48], rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x1400039ba
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x60], rdi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140023468]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x140003968
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x140003968
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140003977
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdi, [0x140024670]
lea rax, str.......CommonSetupHelper.cpp
lea r8, str.ChangeServiceConfig_failed
lea rdx, str.SetServiceStartType
mov r9d, esi
mov rcx, rdi
mov dword [rsp + 0x28], 0xed
mov qword [rsp + 0x20], rax
call fcn.140007d00
mov rdi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x70]
mov eax, esi
mov rsi, qword [rsp + 0x78]
add rsp, 0x68
ret
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x68
ret
mov eax, 0x57
add rsp, 0x68
ret
Function at 0x140004340
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
cmp dword [0x140023468], 0xffffffff
jne 0x1400043ed
lea r8, [rsp + 0x30]
lea rdx, str.DLApi.dll
xor ecx, ecx
mov qword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
je 0x1400043dd
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400043ed
lea rdx, str.GetTraceTLS
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x1400043d8
mov ecx, 1
call rbx
mov r11d, eax
or eax, 0xffffffff
lock cmpxchg dword [0x140023468], r11d
mov ecx, 2
call rbx
mov r11d, eax
or eax, 0xffffffff
lock cmpxchg dword [0x14002346c], r11d
mov ecx, 3
call rbx
mov r11d, eax
or eax, 0xffffffff
lock cmpxchg dword [0x140023470], r11d
mov rbx, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400043ed
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x140023468]
cmp eax, 0xffffffff
jne 0x14000442b
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov r11d, eax
cmp eax, 0xffffffff
je 0x14000442b
or eax, 0xffffffff
lock cmpxchg dword [0x140023468], r11d
cmp eax, 0xffffffff
je 0x14000442b
mov ecx, dword [0x140023468]
cmp ecx, r11d
je 0x14000442b
mov ecx, r11d
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov eax, dword [0x14002346c]
cmp eax, 0xffffffff
jne 0x140004469
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov r11d, eax
cmp eax, 0xffffffff
je 0x140004469
or eax, 0xffffffff
lock cmpxchg dword [0x14002346c], r11d
cmp eax, 0xffffffff
je 0x140004469
mov ecx, dword [0x14002346c]
cmp ecx, r11d
je 0x140004469
mov ecx, r11d
call qword [sym.imp.KERNEL32.dll_TlsFree]
mov ecx, dword [0x140023470]
cmp ecx, 0xffffffff
jne 0x1400044a7
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov r11d, eax
cmp eax, 0xffffffff
je 0x1400044a7
or eax, 0xffffffff
lock cmpxchg dword [0x140023470], r11d
cmp eax, 0xffffffff
je 0x1400044a7
mov ecx, dword [0x140023470]
cmp ecx, r11d
je 0x1400044a7
mov ecx, r11d
call qword [sym.imp.KERNEL32.dll_TlsFree]
add rsp, 0x28
ret
Function at 0x1400044b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
sub rsp, 0x40
cmp dword [rcx + 0x18], 0xff
mov rdi, rcx
je 0x14000457a
mov ecx, dword [0x14002346c]
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rsi
cmp ecx, 0xffffffff
je 0x1400044e6
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
jmp 0x1400044e8
xor ebp, ebp
mov rsi, qword [rdi + 0x10]
mov dword [rdi + 0x18], 0xff
test rsi, rsi
jne 0x14000453c
mov qword [rsp + 0x50], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140023468]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x140004528
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
test rax, rax
je 0x140004528
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140004537
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rsi, [0x140024670]
mov rbx, qword [rsp + 0x50]
lea rax, [0x14001b9c8]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov eax, dword [rdi + 0x18]
mov rdx, rbp
mov dword [rsp + 0x30], eax
mov rcx, rsi
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x50
call fcn.140006c50
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
mov ecx, dword [0x14002346c]
cmp ecx, 0xffffffff
je 0x1400045a7
cmp dword [0x140023470], 0xffffffff
je 0x1400045a7
mov rdx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rdx, qword [rdi + 8]
mov ecx, dword [0x140023470]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
add rsp, 0x40
pop rdi
ret
Function at 0x140004ac0
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x190
mov rax, qword [0x140022218]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov rsi, rcx
lea rcx, [rsp + 0x40]
mov rbx, r9
mov rdi, r8
call fcn.1400081f0
mov edx, 0xa0
mov r10d, edx
lea rax, [rsp + 0x40]
xor ebp, ebp
cmp word [rax], bp
je 0x140004b13
add rax, 2
dec r10
jne 0x140004b01
jmp 0x140004b7d
test r10, r10
je 0x140004b7d
mov rax, rdx
lea r8, [0x14001c2c0]
sub rax, r10
sub rdx, rax
test rdi, rdi
cmovne r8, rdi
lea rcx, [rsp + rax*2 + 0x40]
cmp rdx, 1
jbe 0x140004b7d
test rdx, rdx
je 0x140004b76
mov r9d, 0x7ffffffe
sub r9, rdx
sub r8, rcx
nop dword [rax + rax]
lea rax, [r9 + rdx]
test rax, rax
je 0x140004b71
movzx eax, word [r8 + rcx]
test ax, ax
je 0x140004b71
mov word [rcx], ax
add rcx, 2
dec rdx
jne 0x140004b50
jmp 0x140004b76
test rdx, rdx
jne 0x140004b7a
sub rcx, 2
mov word [rcx], bp
mov eax, dword [rsp + 0x1d0]
cmp eax, 2
jae 0x140004bb6
cmp eax, 1
jne 0x140004b91
mov word [rbx], bp
xor al, al
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.14000c410
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x190
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rsi + 0x100]
lea eax, [rax + rax - 2]
lea r9, [rsp + 0x34]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov dword [rsp + 0x34], ebp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004b8e
cmp dword [rsp + 0x34], 1
jne 0x140004b8e
mov eax, dword [rsp + 0x30]
shr eax, 1
inc eax
mov word [rbx + rax*2], bp
mov al, 1
jmp 0x140004b93

Function at 0x140004c10
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140023468]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x140004c51
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x140004c51
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x30]
lea rax, [0x140024670]
add rsp, 0x20
pop rdi
ret
Function at 0x140004e50
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rax, qword [r9]
mov rdi, r9
mov rbx, r8
cmp rax, 2
jae 0x140004e82
cmp rax, 1
jne 0x140004ee9
mov rax, qword [r8]
mov byte [rax], 0
xor al, al
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
dec eax
lea r9, [rsp + 0x68]
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov rax, qword [r8]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140004ee3
cmp dword [rsp + 0x68], 1
jne 0x140004ee3
mov eax, dword [rsp + 0x30]
mov rcx, qword [rbx]
inc eax
mov byte [rax + rcx], 0
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
mov al, 1
add qword [rbx], rcx
sub qword [rdi], rcx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
mov rax, qword [rbx]
mov byte [rax], 0
xor al, al
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x140004f00
Capabilities:
Get system information on windows

Disassembly:
mov r11, rsp
sub rsp, 0x88
mov qword [r11 + 8], rbx
mov qword [r11 - 8], rdi
lea rax, [r11 + 0x18]
mov rdi, rdx
mov rbx, rcx
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
mov r9d, 0x101
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [r11 + 0x18], 0
mov qword [r11 - 0x68], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400050e7
mov rcx, qword [rsp + 0xa0]
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0xa8], rsi
mov rsi, qword [rbx]
lea rdx, [0x14001c510]
mov r9, rdi
mov r8, rbx
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], r13
call fcn.140004e50
test al, al
je 0x140004fa4
mov rdx, qword [rdi]
mov rcx, qword [rbx]
lea r8, [0x14001c354]
mov r9, rbx
mov qword [rsp + 0x20], rdi
call fcn.140009770
jmp 0x140004fa6
xor esi, esi
mov rcx, qword [rsp + 0xa0]
lea rdx, str.CSDVersion
mov r9, rdi
mov r8, rbx
call fcn.140004e50
test al, al
je 0x140004fde
mov rdx, qword [rdi]
mov rcx, qword [rbx]
lea r8, [0x14001c354]
mov r9, rbx
mov qword [rsp + 0x20], rdi
call fcn.140009770
mov rcx, qword [rsp + 0xa0]
lea rdx, str.DisplayVersion
mov r9, rdi
mov r8, rbx
call fcn.140004e50
test al, al
jne 0x14000501a
mov rcx, qword [rsp + 0xa0]
lea rdx, str.ReleaseId
mov r9, rdi
mov r8, rbx
call fcn.140004e50
test al, al
je 0x140005034
mov rdx, qword [rdi]
mov rcx, qword [rbx]
lea r8, [0x14001c354]
mov r9, rbx
mov qword [rsp + 0x20], rdi
call fcn.140009770
mov rbp, qword [rbx]
mov r12, qword [rdi]
lea r8, str._Build
mov rdx, r12
mov rcx, rbp
mov r9, rbx
mov qword [rsp + 0x20], rdi
call fcn.140009770
mov rcx, qword [rsp + 0xa0]
mov r13, qword [rbx]
lea rdx, str.CurrentBuildNumber
mov r9, rdi
mov r8, rbx
call fcn.140004e50
test al, al
je 0x1400050c7
test rsi, rsi
je 0x1400050ab
mov rax, qword [rbx]
sub rax, rsi
cmp rax, 0xa
jl 0x1400050ab
cmp byte [rsi + 8], 0x31
jne 0x1400050ab
cmp byte [rsi + 9], 0x30
jne 0x1400050ab
xor edx, edx
mov rcx, r13
lea r8d, [rdx + 0xa]
call fcn.14000d180
cmp eax, 0x55f0
jl 0x1400050ab
mov byte [rsi + 9], 0x31
mov rdx, qword [rdi]
mov rcx, qword [rbx]
lea r8, [0x14001c56c]
mov r9, rbx
mov qword [rsp + 0x20], rdi
call fcn.140009770
jmp 0x1400050cd
mov qword [rbx], rbp
mov qword [rdi], r12
mov r12, qword [rsp + 0x78]
mov rsi, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0x98]
mov r13, qword [rsp + 0x70]
xor edx, edx
lea rcx, [rsp + 0x44]
mov dword [rsp + 0x40], 0
lea r8d, [rdx + 0x2c]
call fcn.140010250
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx r11d, word [rsp + 0x40]
mov rdx, qword [rdi]
mov rcx, qword [rbx]
test r11d, r11d
je 0x140005150
cmp r11d, 9
je 0x140005147
mov dword [rsp + 0x30], r11d
lea rax, str.Arch_i
mov r9, rdi
mov qword [rsp + 0x28], rax
mov r8, rbx
mov dword [rsp + 0x20], 0x100
call fcn.140009490
jmp 0x140005164
lea r8, [0x14001c574]
jmp 0x140005157
lea r8, [0x14001c570]
mov r9, rbx
mov qword [rsp + 0x20], rdi
call fcn.140009770
mov rcx, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x90]
test rcx, rcx
je 0x140005187
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rsp, 0x88
ret
Function at 0x140005190
Capabilities:
Get token privileges

Disassembly:
push rbx
sub rsp, 0x30
mov ebx, 1
mov qword [rsp + 0x50], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
lea edx, [rbx + 7]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140005205
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
lea r9d, [rbx + 3]
lea r8, [rsp + 0x48]
lea edx, [rbx + 0x11]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x40], 0
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1400051fa
cmp dword [rsp + 0x40], 4
cmove ebx, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
add rsp, 0x30
pop rbx
ret
Function at 0x140007250
Capabilities:
Get file size
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x30
mov rsi, rdx
mov rbx, rcx
mov edi, 1
test rdx, rdx
je 0x140007337
cmp byte [rdx], 0
je 0x140007337
add rcx, 0x58
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x68], r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rbx + 0x40]
xor r12d, r12d
mov dword [rsp + 0x58], r12d
cmp rcx, 0xffffffffffffffff
je 0x14000730e
cmp dword [rbx + 0x560], r12d
je 0x1400072e9
cmp word [rbx + 0x350], r12w
je 0x1400072e9
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x60], r12
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400072e9
mov eax, dword [rbx + 0x560]
cmp qword [rsp + 0x60], rax
jle 0x1400072e9
lea rdx, str._r_n____Continued_from_old_log_because_size_limit_was_reached_____r_n_r_n
mov rcx, rbx
call fcn.140008030
test al, al
jne 0x1400072e9
mov dword [rbx + 0x560], r12d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov rcx, qword [rbx + 0x40]
lea r9, [rsp + 0x58]
mov r8d, eax
mov rdx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
lea rcx, [rbx + 0x58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [rbx + 8], 0
mov r12, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x50]
je 0x140007337
lea rcx, [0x14001cb9c]
mov rdx, rsi
call fcn.14000d600
mov eax, edi
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
Function at 0x140008030
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
mov rax, rsp
push rbx
push rsi
push rdi
sub rsp, 0x50
xor dil, dil
cmp qword [rcx + 0x40], 0xffffffffffffffff
mov rsi, rdx
mov rbx, rcx
je 0x140008170
mov rcx, qword [rcx + 0x48]
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], r12
mov qword [rax - 0x20], r13
mov qword [rax - 0x28], r14
cmp rcx, 0xffffffffffffffff
je 0x140008076
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x48], 0xffffffffffffffff
lea rcx, [rbx + 0x350]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rbx + 0x350]
lea rcx, [rbx + 0x148]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
xor r14d, r14d
lea rcx, [rbx + 0x148]
mov qword [rsp + 0x30], r14
lea r8d, [r14 + 5]
xor r9d, r9d
mov edx, 0x40000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140008116
mov r8d, dword [rbx + 0x50]
xor edx, edx
mov rcx, rax
call fcn.140005390
test rsi, rsi
je 0x140008103
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r9, [rsp + 0x70]
mov rdx, rsi
mov rcx, rbp
mov r8d, eax
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbx + 0x40]
mov qword [rbx + 0x40], rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dil, 1
jmp 0x14000812a
lea rdx, [rbx + 0x148]
lea rcx, [rbx + 0x350]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rbx + 0x148]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, qword [rsp + 0x40]
mov r13, qword [rsp + 0x48]
mov r12, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov qword [rbx + 0x48], rax
movzx eax, dil
add rsp, 0x50
pop rdi
pop rsi
pop rbx
ret
Function at 0x140009c50
Capabilities:
Get file version info

Disassembly:
push rbp
lea rbp, [rsp - 0x380]
sub rsp, 0x480
mov rax, qword [0x140022218]
xor rax, rsp
mov qword [rbp + 0x370], rax
lea rdx, [rbp + 0x160]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x160]
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [rsp + 0x30], eax
test eax, eax
je 0x140009e7e
mov ecx, eax
mov qword [rsp + 0x4a0], rdi
call fcn.14000c3f4
mov r8d, dword [rsp + 0x30]
mov edx, dword [rsp + 0x40]
lea rcx, [rbp + 0x160]
mov r9, rax
mov rdi, rax
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x140009e6e
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x50]
lea rdx, [0x14001ca64]
mov rcx, rdi
mov qword [rsp + 0x490], rbx
mov qword [rsp + 0x498], rsi
call qword [sym.imp.VERSION.dll_VerQueryValueW]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x48]
lea rdx, str.VarFileInfoTranslation
mov rcx, rdi
call qword [sym.imp.VERSION.dll_VerQueryValueW]
mov r11, qword [rsp + 0x48]
lea r8, str.StringFileInfo_04x_04xProductName
movzx eax, word [r11 + 2]
movzx r9d, word [r11]
lea rcx, [rsp + 0x60]
mov edx, 0x1fe
mov dword [rsp + 0x20], eax
call fcn.140009410
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.VERSION.dll_VerQueryValueW]
or rsi, 0xffffffffffffffff
test eax, eax
je 0x140009dd8
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
movsxd rcx, eax
mov eax, 2
mul rcx
lea rdx, [0x140023480]
cmovo rax, rsi
mov rcx, rax
call fcn.14000d7b8
mov rdx, qword [rsp + 0x38]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov qword [str.___], rbx
mov qword [str.___], rbx
mov qword [str.___], rbx
mov qword [str.___], rbx
mov qword [str.___], rbx
mov qword [str.___], rbx
mov qword [str.___], rbx
mov qword [str.___], rbx
mov rax, qword [rsp + 0x48]
lea r8, str.StringFileInfo_04x_04xCompanyName
mov edx, 0x1fe
movzx ecx, word [rax + 2]
movzx r9d, word [rax]
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0x60]
call fcn.140009410
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x140009e5e
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
movsxd rcx, eax
mov eax, 2
mul rcx
lea rdx, [0x140023480]
cmovo rax, rsi
mov rcx, rax
call fcn.14000d7b8
mov rdx, qword [rsp + 0x38]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov qword [str.___], rbx
mov rbx, qword [rsp + 0x490]
mov rsi, qword [rsp + 0x498]
mov rcx, rdi
call fcn.14000d6e4
mov rdi, qword [rsp + 0x4a0]
mov rcx, qword [rbp + 0x370]
xor rcx, rsp
call fcn.14000c410
add rsp, 0x480
pop rbp
ret
Function at 0x140009ea0
Capabilities:
Get thread local storage value
Get uefi variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140022218]
xor rax, rsp
mov qword [rsp + 0x48], rax
lea r8, [rsp + 0x40]
lea rdx, str.00000000_0000_0000_0000_000000000000
lea rcx, [0x14001c2c0]
mov r9d, 8
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
setne sil
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140023468]
mov ebx, eax
cmp ecx, 0xffffffff
je 0x140009f15
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
je 0x140009f15
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140009f24
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdi, [0x140024670]
lea rax, [0x14001b9c8]
movzx edx, sil
lea r8, str.c:_buildagentwork8c9bc8b116591fb5_setupcustomactionsmsiremover.._.._.._Common_UefiCheck.h
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 5
mov dword [rsp + 0x28], edx
lea rdx, str.IsUefiFirmware
mov r9d, 8
mov rcx, rdi
mov dword [rsp + 0x20], 0x13
call fcn.140006c50
movzx eax, sil
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14000c410
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x14000de43
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x140022218]
jne 0x14000c42a
rol rcx, 0x10
test cx, 0xffff
jne 0x14000c426
repz ret
ror rcx, 0x10
jmp 0x14000dd9c
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140023570]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140023668]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x14000de21
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x140023570]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x14000de43
mov rax, qword [rsp + 0x88]
mov qword [0x140023668], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x140023608], rax
mov rax, qword [0x140023668]
mov qword [0x1400234e0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x1400235f0], rax
mov dword [0x1400234d0], 0xc0000409
mov dword [0x1400234d4], 1
mov rax, qword [0x140022218]
mov qword [rsp + 0x68], rax
mov rax, qword [0x140022220]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140023568], eax
mov ecx, 1
call fcn.1400131c0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x140019620]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140023568], 0
jne 0x14000deca
mov ecx, 1
call fcn.1400131c0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret

Function at 0x14001269c
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.14001250c