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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400679b0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400345c3
cmp word [rdx], r13w
jne 0x1400345c3
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400345c8
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400346ed
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14003470e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140034601
mov rdx, r9
mov word [rbx], cx
jmp 0x140034628
cmp r9, r8
jae 0x140034638
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400345e2
jmp 0x1400346ed
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400346e2
cmp dword [rsp + 0x80], esi
je 0x1400346e2
lea r8, [0x1400679b0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400346ba
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14003468a
mov word [rbx], r13w
jmp 0x1400346ea
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x140034697
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400346ea
cmp word [rsp + 0x70], r13w
jne 0x1400346c7
cmp rbx, r14
je 0x140034684
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140033df0
cmp word [rsp + 0x70], r13w
je 0x1400346ed
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400679b0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400346e7
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400346ed
Function at 0x14003847c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140038492
mov al, 1
jmp 0x1400384f2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400384a3
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400384f0
mov ecx, dword [rcx + 0x18]
nop
call fcn.14003d53c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400384f0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400384f0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400384f0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400384f2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x14003c514
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14003c544
xor eax, eax
jmp 0x14003c607
mov rbp, rbx
cmp word [rax], si
je 0x14003c569
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14003c550
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14003c54c
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14003c434
movsxd r14, eax
test eax, eax
jne 0x14003c5a7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14003c53d
mov rcx, r14
call fcn.140036fbc
mov rdi, rax
test rax, rax
jne 0x14003c5c0
xor ecx, ecx
call fcn.140035250
jmp 0x14003c59c
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14003c434
test eax, eax
jne 0x14003c5f1
mov rcx, rdi
call fcn.140035250
jmp 0x14003c5fb
xor ecx, ecx
call fcn.140035250
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x14003fc20
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14003420c
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x14003fcc1
cmp ebx, dword [rsp + 0x30]
je 0x14003fcba
test esi, esi
je 0x14003fcba
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14003fc95
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14003fca2
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14003fc7f
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14003fca6
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14003fcc3
mov eax, 1
jmp 0x14003fcc3
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400449dc
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14002a3a4
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140044a66
cmp byte [rbp - 0x21], r15b
je 0x140044a61
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140044a9c
call fcn.140035554
test eax, eax
jne 0x140044a88
cmp byte [rbp - 0x21], r15b
je 0x140044a80
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140044a9c
cmp byte [rbp - 0x21], r15b
je 0x140044a99
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.14003345c
test eax, eax
jne 0x140044b3c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14002a3a4
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140044adb
cmp byte [rbp - 0x21], r15b
je 0x140044b10
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140044b10
call fcn.140035554
test eax, eax
jne 0x140044afc
cmp byte [rbp - 0x21], r15b
je 0x140044af5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140044b10
cmp byte [rbp - 0x21], r15b
je 0x140044b0d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.14003345c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140044b3c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140044b3f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140044b4d
mov rcx, rdi
call fcn.140035250
cmp byte [rbp + 0x3f], r15b
je 0x140044b5c
mov rcx, qword [rbp + 0x27]
call fcn.140035250
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x140045b10
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140033df0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140033df0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140045c60
cmp rax, 0xffffffffffffffff
je 0x140045c60
xor edi, edi
test rbp, rbp
jle 0x140045c0b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400351d8
mov rbx, rax
test rax, rax
jne 0x140045b98
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140045c01
mov edx, 0x8000
mov ecx, r14d
call fcn.140030c90
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1400368b0
cmp eax, 0xffffffff
je 0x140045be1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140045ba8
mov edx, r15d
mov ecx, r14d
call fcn.140030c90
jmp 0x140045c01
cmp byte [rsi + 0x38], dil
je 0x140045bf8
cmp dword [rsi + 0x34], 5
jne 0x140045bf8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140045c01
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140035250
jmp 0x140045c74
jns 0x140045c74
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140033df0
cmp rax, 0xffffffffffffffff
jne 0x140045c2c
cmp byte [rsi + 0x30], dil
je 0x140045c74
mov edi, dword [rsi + 0x2c]
jmp 0x140045c74
mov ecx, r14d
call fcn.14003d53c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140045c74
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140045c74
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140045c6d
mov eax, dword [rsi + 0x2c]
jmp 0x140045c72
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140033df0
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140046bc0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140046be8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140046be8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140002810
Capabilities:
Get file size
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x10048
call fcn.140020050
sub rsp, rax
mov r14, r8
mov rbx, rdx
mov rax, qword [0x140037010]
xor rax, rsp
mov qword [rsp + 0x10040], rax
mov dword [r8], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor edi, edi
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140002a5c
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor edi, edi
mov rcx, rbx
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140002a46
mov rbp, qword [sym.imp.KERNEL32.dll_GetFileSize]
xor edi, edi
mov rcx, rsi
xor edx, edx
call rbp
mov r15d, eax
mov rcx, rbx
xor edx, edx
call rbp
cmp r15d, 0xffffffff
je 0x140002a46
cmp eax, 0xffffffff
je 0x140002a46
mov edi, 1
cmp r15d, eax
jne 0x140002a46
mov ebp, r15d
shr ebp, 0xf
je 0x1400029ba
xor edi, edi
mov r13, qword [sym.imp.KERNEL32.dll_ReadFile]
xor r12d, r12d
nop word cs:[rax + rax]
mov qword [rsp + 0x20], 0
mov rcx, rsi
lea rdx, [rsp + 0x8040]
mov r8d, 0x8000
lea r9, [rsp + 0x3c]
call r13
test eax, eax
je 0x140002a46
cmp dword [rsp + 0x3c], 0x8000
jne 0x140002a46
mov qword [rsp + 0x20], 0
mov rcx, rbx
lea rdx, [rsp + 0x40]
mov r8d, 0x8000
lea r9, [rsp + 0x3c]
call r13
test eax, eax
je 0x140002a46
cmp dword [rsp + 0x3c], 0x8000
jne 0x140002a46
mov r8d, 0x8000
lea rcx, [rsp + 0x8040]
lea rdx, [rsp + 0x40]
call fcn.14000fd30
test eax, eax
jne 0x140002a41
add r12d, 1
cmp r12d, ebp
jb 0x140002920
and r15d, 0x7fff
je 0x140002a3a
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0x8040]
lea r9, [rsp + 0x3c]
mov rcx, rsi
mov r8d, r15d
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor edi, edi
test eax, eax
je 0x140002a46
cmp dword [rsp + 0x3c], r15d
jne 0x140002a46
mov qword [rsp + 0x20], 0
lea rdx, [rsp + 0x40]
lea r9, [rsp + 0x3c]
mov rcx, rbx
mov r8d, r15d
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140002a46
cmp dword [rsp + 0x3c], r15d
jne 0x140002a46
mov r8d, r15d
lea rcx, [rsp + 0x8040]
lea rdx, [rsp + 0x40]
call fcn.14000fd30
mov edi, 1
test eax, eax
jne 0x140002a46
mov dword [r14], 1
mov edi, 1
mov rax, rbx
add rax, 1
cmp rax, 2
jb 0x140002a5c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
add rax, 1
cmp rax, 2
jb 0x140002a72
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x10040]
xor rcx, rsp
call fcn.1400192f0
mov eax, edi
add rsp, 0x10048
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140004690
Capabilities:
Get file version info

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov r14, r9
mov r15, r8
mov rdi, rdx
mov rbx, rcx
mov rax, qword [0x140037010]
xor rax, rsp
mov qword [rsp + 0x30], rax
xor edx, edx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov ebp, eax
mov ecx, eax
call fcn.14000e240
mov rsi, rax
mov rcx, rbx
xor edx, edx
mov r8d, ebp
mov r9, rax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x14000472e
mov qword [rsp + 0x28], rsi
lea rdx, [0x140030334]
lea r8, [rsp + 0x28]
lea r9, [rsp + 0x24]
mov rcx, rsi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x140004765
mov rax, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x28]
movzx edx, word [rcx + 0xa]
mov dword [rdi], edx
movzx edx, word [rcx + 8]
mov dword [r15], edx
movzx edx, word [rcx + 0xe]
mov dword [r14], edx
movzx ecx, word [rcx + 0xc]
mov dword [rax], ecx
mov edi, 1
jmp 0x1400047a8
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400047cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_obtain_file_info_of_old_service.____d_
jmp 0x14000479e
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000480f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_query_file_version_info_of_old_service.____d_
mov r8d, eax
call fcn.14000d2d0
xor edi, edi
mov rcx, rsi
call fcn.14000e248
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400192f0
mov eax, edi
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x14000474f
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x14000474f
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x14000478a
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x14000478a
Function at 0x140004860
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rax, qword [0x140037010]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x140004949
mov r14, rax
lea rdx, str.MozillaMaintenance
mov rcx, rax
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x14000498e
mov rdi, rax
lea r8, [rsp + 0x20]
mov rcx, rax
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14000491c
xor esi, esi
mov r12, qword [sym.imp.KERNEL32.dll_Sleep]
lea r15, [rsp + 0x20]
mov rbx, qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
nop word cs:[rax + rax]
mov ecx, dword [rsp + 0x38]
call r12
cmp dword [rsp + 0x24], 1
je 0x14000491c
mov eax, dword [rsp + 0x38]
lea esi, [rsi + rax]
add esi, 0xa
cmp esi, 0xea60
ja 0x14000491c
mov rcx, rdi
mov rdx, r15
call rbx
test eax, eax
jne 0x1400048f0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test eax, eax
jne 0x14000493b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x430
sete bl
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400049d1
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400049f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_open_service_manager.____d_
mov r8d, eax
call fcn.14000d2d0
xor ebx, ebx
jmp 0x1400049da
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140004a3a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_open_service.____d_
mov r8d, eax
call fcn.14000d2d0
xor ebx, ebx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400192f0
mov eax, ebx
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x14000496e
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x14000496e
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x1400049b3
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x1400049b3
Function at 0x140005d50
Capabilities:
Check if file exists
Delete file

Disassembly:
push rsi
push rdi
sub rsp, 0x238
mov rax, qword [0x140037010]
xor rax, rsp
mov qword [rsp + 0x230], rax
cmp word [rcx], 0
je 0x140005e2e
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140005dd3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x140005dd3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140005dd3
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140005ec1
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_delete_service_updater_path:__ls.
mov r8, rsi
call fcn.14000d2d0
lea rcx, [rsp + 0x20]
mov r8d, 0x20a
xor edx, edx
call fcn.14000fe30
mov rcx, rsi
call fcn.1400173f8
cmp rax, 0x103
ja 0x140005e2e
lea rdi, [rsp + 0x20]
mov r8d, 0x104
mov rcx, rdi
mov rdx, rsi
call fcn.1400178c0
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x140005e2e
lea rcx, [rsp + 0x20]
call fcn.1400173f8
add rax, 0xb
cmp rax, 0x103
jbe 0x140005e49
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.1400192f0
nop
add rsp, 0x238
pop rdi
pop rsi
ret
lea rdx, str.updater.ini
lea rcx, [rsp + 0x20]
call int.14000e0c0
test eax, eax
je 0x140005e2e
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140005e2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x140005e2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140005e2e
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140005f04
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_delete_service_updater_INI_path:__ls.
lea r8, [rsp + 0x20]
call fcn.14000d2d0
jmp 0x140005e2e
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140005dbd
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x140005dbd
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140005ea4
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x140005ea4
Function at 0x14000a670
Capabilities:
Check if file exists
Move file

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x68
mov r14, r8
mov rdi, rdx
mov rbx, rcx
mov rax, qword [0x140037010]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rcx, qword [rdx + 8]
lea rax, [rcx + 1]
cmp rax, 2
jb 0x14000a6a9
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 8], 0xffffffffffffffff
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movzx eax, word [0x14002d740]
mov word [rsp + 0x50], ax
movaps xmm0, xmmword [str._s.bak_u]
movaps xmmword [rsp + 0x40], xmm0
mov r8, qword [rbx + 8]
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov r9d, 3
call fcn.14000b800
test rax, rax
jne 0x14000a74f
mov rcx, rbx
mov rdx, rdi
call fcn.14000b890
mov esi, eax
test r14, r14
je 0x14000a71a
test esi, esi
js 0x14000a71a
mov qword [r14], 0
mov rax, qword [r14 + 8]
test rax, rax
je 0x14000a71a
mov word [rax], 0
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x38], 0
test rcx, rcx
je 0x14000a732
call fcn.14000e248
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400192f0
mov eax, esi
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rsi, rax
add rsi, 1
mov r9, qword [rbx + 8]
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x40]
mov rdx, rsi
call fcn.14000b850
mov r12, qword [rsp + 0x30]
test r12, r12
je 0x14000a6ef
mov rcx, qword [rbx + 8]
mov r15, qword [rsp + 0x38]
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x14000a7b8
xor esi, esi
test r14, r14
je 0x14000a71a
movups xmm0, xmmword [r14]
mov qword [r14 + 8], r15
movaps xmmword [rsp + 0x30], xmm0
mov qword [r14], r12
jmp 0x14000a71a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14000a8f8
cmp eax, 5
je 0x14000a7d7
cmp eax, 0xb7
jne 0x14000a6ef
mov r9, qword [rbx + 8]
mov dword [rsp + 0x20], 1
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x40]
mov rdx, rsi
call fcn.14000b850
mov r12, qword [rsp + 0x30]
test r12, r12
je 0x14000a6ef
mov rcx, qword [rbx + 8]
mov r15, qword [rsp + 0x38]
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x14000a798
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14000a8f8
cmp eax, 0xb7
je 0x14000a83c
cmp eax, 5
jne 0x14000a6ef
mov r9, qword [rbx + 8]
mov dword [rsp + 0x20], 2
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x40]
mov rdx, rsi
call fcn.14000b850
mov r12, qword [rsp + 0x30]
test r12, r12
je 0x14000a6ef
mov rcx, qword [rbx + 8]
mov r15, qword [rsp + 0x38]
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x14000a798
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14000a8f8
cmp eax, 0xb7
je 0x14000a89d
cmp eax, 5
jne 0x14000a6ef
mov r9, qword [rbx + 8]
mov dword [rsp + 0x20], 3
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x40]
mov rdx, rsi
call fcn.14000b850
mov r12, qword [rsp + 0x30]
test r12, r12
je 0x14000a6ef
mov rcx, qword [rbx + 8]
mov r15, qword [rsp + 0x38]
mov rdx, r15
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x14000a798
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x14000a6ef
xor esi, esi
test r14, r14
jne 0x14000a705
jmp 0x14000a71a