joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40abc0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbp, qword [fcn.004110c0]
mov rsi, qword [rcx]
mov ecx, 1
call rbp
mov rdi, rax
test rsi, rsi
je 0x40aca0
cmp qword [rsi], 0
lea r8, [rsi + 0x10]
mov rcx, rdi
lea rax, [section..rdata]
lea rdx, [0x00413224]
cmove r8, rax
call sub.msvcrt.dll_fprintf
lea r12, [0x00413224]
mov ebx, eax
movsxd rax, ebx
cmp rax, qword [rsi]
jge 0x40ac3a
cmp byte [rsi + rax + 0x10], 0
jne 0x40ac80
xor ecx, ecx
mov rdx, rdi
call sub.msvcrt.dll_fputc
test eax, eax
jne 0x40ac3a
add ebx, 1
movsxd rax, ebx
cmp rax, qword [rsi]
jl 0x40ac1a
mov ecx, 1
call rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x004130b6]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
call rbp
mov rcx, rax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp sub.msvcrt.dll_fflush
lea r8, [rsi + rax + 0x10]
mov rdx, r12
mov rcx, rdi
call sub.msvcrt.dll_fprintf
test eax, eax
jle 0x40ac3a
add ebx, eax
jmp 0x40ac12
lea r8, [section..rdata]
mov rcx, rax
lea rdx, [0x00413224]
call sub.msvcrt.dll_fprintf
lea rsi, [0x00413224]
mov ebx, eax
nop
test ebx, ebx
jns 0x40ac3a
movsxd r8, ebx
cmp byte [r8 + 0x10], 0
jne 0x40acf9
xor ecx, ecx
mov rdx, rdi
call sub.msvcrt.dll_fputc
test eax, eax
jne 0x40ac3a
add ebx, 1
test ebx, ebx
jns 0x40ac3a
movsxd r8, ebx
cmp byte [r8 + 0x10], 0
je 0x40acd2
add r8, 0x10
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_fprintf
test eax, eax
jle 0x40ac3a
add ebx, eax
jmp 0x40acc0
Function at 0x410030
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0042b7c4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4101b8
mov rax, qword [0x0042b7c8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x41007c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x410105
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x410060
mov rcx, rbx
call fcn.00410cd0
test rax, rax
mov r12, rax
je 0x4101ed
mov rax, qword [0x0042b7c8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.00410e00
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0042b7c8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4101d0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x4100fe
sub eax, 0x40
and eax, 0xffffffbf
jne 0x410160
add dword [0x0042b7c4], 1
cmp edi, 8
jae 0x410133
test dil, 4
jne 0x4101a4
test edi, edi
je 0x410128
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4101bf
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x410128
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x41014c
jmp 0x410128
add rsi, qword [0x0042b7c8]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4100fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00411290
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x410128
xor esi, esi
jmp 0x410087
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x410128
mov rax, qword [0x0042b7c8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.00411290
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.00411290
nop
nop dword [rax]

Function at 0x410940
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0042baa0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0042ba80]
test rbx, rbx
je 0x410994
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x41098b
test rsi, rsi
je 0x41098b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x410970
lea rcx, [0x0042baa0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x410cd0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004164e0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x410d3d
mov rcx, r8
call fcn.00410bb0
test eax, eax
je 0x410d3d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x410d3d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x410d34
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x410d3f
add rax, 0x28
cmp rax, r9
jne 0x410d20
xor eax, eax
add rsp, 0x28
ret

Function at 0x411290
Capabilities:
Write file on windows

Disassembly:
lea rcx, [0x00401540]
jmp 0x401510
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.004110c0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.004110c0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
jmp 0x401530
Function at 0x180002d60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x68
mov eax, dword [rsp + 0x90]
sub eax, 0x2a5
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x80]
add eax, 0x97d
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x80]
xor eax, 0x3246
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x98]
sub eax, 0x28d2
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x98]
sub eax, 0xd5c
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x70]
xor eax, 0x3dd3
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x90]
sub eax, 0x2ba
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x88]
sub eax, 0x19a5
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0x88]
xor eax, 0x19a5
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x80]
sub eax, 0x1f55
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x2c]
xor eax, 0x3605
cmp dword [rsp + 0x28], eax
je 0x180002e54
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x9c]
sub eax, 0x962ff
mov rcx, qword [rsp + 0x78]
mov ecx, dword [rcx + 0x28]
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x78]
mov dword [rcx + 0x28], eax
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x24], eax
jmp 0x180002ef3
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x90]
mov dword [rsp + 0x20], eax
jmp 0x180002e70
mov eax, dword [rsp + 0x20]
add eax, 4
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x34]
sub ecx, eax
mov eax, ecx
cmp dword [rsp + 0x20], eax
jge 0x180002ef3
mov eax, dword [rsp + 0x38]
sub eax, 0x2540
sub eax, dword [rsp + 0x28]
mov dword [rsp + 0x44], eax
mov eax, 4
imul rax, rax, 0
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x78]
mov eax, dword [rdx + rax + 0x3c]
mov ecx, dword [rcx + 0x38]
sub ecx, eax
mov eax, ecx
mov ecx, 4
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x78]
and eax, dword [rdx + rcx + 0xa4]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x48]
sub eax, 0x159e
mov dword [rsp + 0x3c], eax
mov r8d, dword [rsp + 0x3c]
mov edx, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x44]
call qword [sym.imp.KERNEL32.dll_OpenThread]
jmp 0x180002e65
mov eax, dword [rsp + 0x2c]
sub eax, 0xdbe
add rsp, 0x68
ret
Function at 0x180004660
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x68
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0xa0]
add eax, 0x725
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x70]
sub eax, 0x19a5
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x70]
add eax, 0xfd8
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x80]
xor eax, 0x334d
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0xa0]
xor eax, 0xee8
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x98]
add eax, 0xab
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x88]
add eax, 0x13e5
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x98]
xor eax, 0x28d2
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x24]
sub eax, 0x1761
cmp dword [rsp + 0x2c], eax
jle 0x1800047f2
mov eax, dword [rsp + 0x24]
sub eax, 0xb41
cmp dword [rsp + 0x2c], eax
jle 0x180004740
mov rax, qword [rsp + 0x78]
lea rcx, [0x1800b0110]
mov qword [rax + 0x70], rcx
mov eax, dword [rsp + 0x20]
add eax, 0xab
mov dword [rsp + 0x20], eax
jmp 0x1800047f2
mov eax, dword [rsp + 0x30]
or eax, 0x1f55
mov rcx, qword [rsp + 0x78]
sub eax, dword [rcx + 0x2c]
cmp dword [rsp + 0x20], eax
jb 0x1800047f2
mov eax, dword [rsp + 0x20]
mov dword [rsp + 0x28], eax
jmp 0x180004770
mov eax, dword [rsp + 0x28]
add eax, 2
mov dword [rsp + 0x28], eax
mov eax, 4
imul rax, rax, 2
mov rcx, qword [rsp + 0x78]
mov eax, dword [rcx + rax + 0xa4]
add eax, dword [rsp + 0x34]
and eax, dword [rsp + 0x24]
cmp dword [rsp + 0x28], eax
jbe 0x1800047f2
mov eax, 4
imul rax, rax, 3
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x78]
mov eax, dword [rdx + rax + 0xa4]
mov ecx, dword [rcx + 0x98]
xor ecx, eax
mov eax, ecx
mov eax, eax
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x98]
mov ecx, dword [rsp + 0x38]
or ecx, eax
mov eax, ecx
sub eax, 0x1b16
mov eax, eax
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
jmp 0x180004765
mov eax, dword [rsp + 0x3c]
sub eax, 0xbe8
add rsp, 0x68
ret
Function at 0x180008220
Capabilities:
Get file attributes
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov dword [rsp + 8], ecx
sub rsp, 0x58
mov eax, dword [rsp + 0x68]
sub eax, 0x26d3
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x78]
xor eax, 0x19a5
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x80]
sub eax, 0xb40
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x88]
sub eax, 0xb4
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x68]
sub eax, 0x77e
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x68]
sub eax, 0x26d3
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x78]
sub eax, 0x19a5
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x68]
add eax, 0x2aa
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c]
xor eax, 0x2d13
cmp dword [rsp + 0x20], eax
jg 0x1800082c2
mov eax, dword [rsp + 0x20]
xor eax, 0x28d2
mov dword [rsp + 0x20], eax
jmp 0x180008315
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x24], eax
jmp 0x1800082d7
mov eax, dword [rsp + 0x24]
add eax, 2
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x34]
and eax, 0x2286
mov rcx, qword [rsp + 0x70]
or eax, dword [rcx + 0x90]
cmp dword [rsp + 0x24], eax
jb 0x180008315
mov rax, qword [rsp + 0x70]
mov eax, dword [rax + 0x2c]
mov ecx, dword [rsp + 0x28]
sub ecx, eax
mov eax, ecx
mov eax, eax
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jmp 0x1800082cc
mov eax, dword [rsp + 0x28]
sub eax, 0xab
add rsp, 0x58
ret
Function at 0x180021560
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov dword [rsp + 8], ecx
sub rsp, 0x68
mov eax, dword [rsp + 0xa8]
sub eax, 0x1b16
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0xb0]
xor eax, 0x455
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0xa8]
xor eax, 0x60
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x90]
sub eax, 0x1c5
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x98]
add eax, 0x13cb
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x80]
xor eax, 0x2ddb
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x90]
sub eax, 0x5d8
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x34]
xor eax, 0x9ed
cmp dword [rsp + 0x2c], eax
jg 0x1800217aa
mov eax, dword [rsp + 0x20]
xor eax, 0x1b76
cmp dword [rsp + 0x34], eax
jg 0x18002167a
mov eax, 4
imul rax, rax, 1
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x88]
xor eax, 0x1663b7
mov rcx, qword [rsp + 0x88]
mov ecx, dword [rcx + 0xa0]
imul ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x88]
mov dword [rcx + 0xa0], eax
mov eax, dword [rsp + 0x20]
add eax, 0x1f55
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x88]
mov ecx, dword [rcx + 0xa0]
mov dword [rax + 0x64], ecx
jmp 0x1800217aa
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x88]
mov eax, dword [rax + 0x44]
imul eax, dword [rcx + 0x48]
add eax, dword [rsp + 0x20]
cmp dword [rsp + 0x30], eax
jb 0x1800217aa
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x24], eax
jmp 0x1800216b3
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x88]
mov eax, dword [rax + 0x2c]
add eax, 0x325c
cmp dword [rsp + 0x24], eax
jae 0x1800217aa
mov eax, 4
imul rax, rax, 0
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0xb8]
mov dword [rsp + 0x28], eax
jmp 0x1800216f6
mov eax, dword [rsp + 0x28]
add eax, 2
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x88]
mov eax, dword [rax + 0x90]
sub eax, 0x2286
cmp dword [rsp + 0x28], eax
jae 0x1800217a5
mov eax, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x2c]
or ecx, eax
mov eax, ecx
cdqe
mov qword [rsp + 0x50], rax
mov eax, 4
imul rax, rax, 0
mov rcx, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x88]
mov edx, dword [rdx + 0x18]
mov eax, dword [rcx + rax + 0xb8]
xor eax, edx
mov eax, eax
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov eax, dword [rsp + 0x2c]
xor eax, 0x1c5f
mov ecx, 4
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x88]
add eax, dword [rdx + rcx + 8]
mov rcx, qword [rsp + 0x88]
mov ecx, dword [rcx + 0xb4]
xor ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x88]
mov dword [rcx + 0xb4], eax
jmp 0x1800216eb
jmp 0x1800216a9
mov eax, dword [rsp + 0x30]
add eax, 0x16b3
add rsp, 0x68
ret
Function at 0x1400018f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140001965
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x140001965
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, eax
add rcx, rbx
and edi, 0xf
jbe 0x140001955
nop
cmp rbx, rcx
jae 0x140001965
movzx eax, word [rbx]
lea rbx, [rbx + rax*2]
add rbx, 2
add edi, 0xffffffff
jne 0x140001940
cmp rbx, rcx
jae 0x140001965
cmp word [rbx], 0
je 0x140001965
mov rax, rbx
jmp 0x140001967
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400030d0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x470
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x4b8], rbx
mov rax, qword [0x14002a010]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov r15, r8
mov rbx, rdx
mov r14, rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x50], r8
xor ebp, ebp
mov dword [rsp + 0x38], ebp
call fcn.140001a50
mov rcx, rax
test rax, rax
je 0x140003320
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [r14], rax
lea rdx, [0x140024a10]
lea rsi, [rbp - 1]
cmp rdx, 0x10000
jae 0x14000315a
movzx edx, dx
mov rcx, r14
call fcn.140004fd0
jmp 0x140003176
mov rax, rsi
nop dword [rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x140003160
mov r8d, eax
mov rcx, r14
call fcn.140005250
nop
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x34], 0x400
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400032db
mov ecx, dword [rsp + 0x30]
lea eax, [rcx - 1]
mov ebx, 0x200
lea rdi, [0x1400250c4]
cmp eax, 1
jbe 0x1400031df
cmp ecx, 7
jne 0x14000326e
mov eax, dword [rsp + 0x34]
lea rcx, [rsp + 0x60]
test eax, eax
je 0x1400031fc
mov rax, rsi
nop
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400031f0
jmp 0x14000325a
mov rdx, rbx
mov r8, rdi
lea rax, [rsp + 0x60]
sub r8, rax
nop word [rax + rax]
lea rax, [rdx + 0x7ffffdfe]
test rax, rax
je 0x140003233
movzx eax, word [r8 + rcx]
test ax, ax
je 0x140003233
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140003210
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], bp
lea rcx, [rsp + 0x60]
mov rax, rsi
nop dword [rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140003250
mov r8d, eax
lea rdx, [rsp + 0x60]
mov rcx, r14
call fcn.140005250
mov ecx, dword [rsp + 0x30]
test ecx, ecx
jne 0x1400032db
lea rcx, [rsp + 0x60]
lea rax, [rsp + 0x60]
sub rdi, rax
nop
lea rax, [rbx + 0x7ffffdfe]
test rax, rax
je 0x1400032a2
movzx eax, word [rdi + rcx]
test ax, ax
je 0x1400032a2
mov word [rcx], ax
add rcx, 2
sub rbx, 1
jne 0x140003280
lea rax, [rcx - 2]
test rbx, rbx
cmovne rax, rcx
mov word [rax], bp
lea rcx, [rsp + 0x60]
mov rax, rsi
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400032c0
mov r8d, eax
lea rdx, [rsp + 0x60]
mov rcx, r14
call fcn.140005250
nop
mov rdx, qword [r15]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x1400032f6
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov rax, r14
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.140006180
mov rbx, qword [rsp + 0x4b8]
add rsp, 0x470
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400018b0
int3
Function at 0x140004770
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x83c0]
mov eax, 0x84c0
call fcn.14001a660
sub rsp, rax
mov rax, qword [0x14002a010]
xor rax, rsp
mov qword [rbp + 0x83a0], rax
mov r12, qword [rbp + 0x8420]
mov r14, rdx
mov rdi, rcx
mov qword [rsp + 0x84b8], rsi
mov rsi, r8
lea rcx, [rbp + 0x190]
mov r8d, 0x208
xor edx, edx
mov r15, r9
call fcn.140007ff0
lea rax, [rbp - 0x78]
mov dword [rsp + 0x6c], 0x104
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x6c]
lea rax, [rsp + 0x74]
mov dword [rsp + 0x64], 0x3fff
mov qword [rsp + 0x50], rax
lea rdx, [rbp + 0x190]
lea rax, [rsp + 0x78]
xor r13d, r13d
mov qword [rsp + 0x48], rax
xor r9d, r9d
lea rax, [rsp + 0x7c]
mov dword [rsp + 0x60], r13d
mov qword [rsp + 0x40], rax
mov rcx, rdi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x7c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x1400048cf
mov ebx, r13d
nop dword [rax]
lea rax, [rbp - 0x78]
mov dword [rsp + 0x70], 0xff
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x70]
mov qword [rsp + 0x30], r13
lea r8, [rbp - 0x70]
mov qword [rsp + 0x28], r13
mov edx, ebx
mov rcx, rdi
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x1400048c5
lea edx, [rbx + 1]
lea r8, [rbp - 0x70]
lea rcx, str.__d___ws_n
call fcn.140005cd0
mov eax, ebx
lea r8, [rbp - 0x70]
imul rcx, rax, 0x1fe
mov edx, 0xff
add rcx, rsi
call fcn.14000cb2c
mov eax, dword [rsp + 0x60]
inc ebx
cmp ebx, eax
jb 0x140004860
mov ecx, dword [rsp + 0x68]
mov rsi, qword [rsp + 0x84b8]
test ecx, ecx
je 0x140004970
mov ebx, r13d
nop word [rax + rax]
mov qword [rsp + 0x38], r13
lea r9, [rsp + 0x64]
mov qword [rsp + 0x30], r13
lea r8, [rbp + 0x3a0]
mov qword [rsp + 0x28], r13
mov edx, ebx
mov rcx, rdi
mov qword [rsp + 0x20], r13
mov dword [rsp + 0x64], 0x3fff
mov word [rbp + 0x3a0], r13w
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x140004962
lea edx, [rbx + 1]
lea r8, [rbp + 0x3a0]
lea rcx, str.__d___ws_n
call fcn.140005cd0
mov eax, ebx
lea r8, [rbp + 0x3a0]
imul rcx, rax, 0x1fe
mov edx, 0xff
add rcx, r12
call fcn.14000cb2c
mov ecx, dword [rsp + 0x68]
inc ebx
cmp ebx, ecx
jb 0x1400048f0
mov eax, dword [rsp + 0x60]
mov dword [r14], eax
mov dword [r15], ecx
mov rcx, qword [rbp + 0x83a0]
xor rcx, rsp
call fcn.140006180
add rsp, 0x84c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret
Function at 0x140005b20
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x50
mov rax, qword [0x14002a010]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
lea r8d, [rax + 1]
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140005b87
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140001320
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140006180
add rsp, 0x50
pop rdi
ret
mov r8d, 0x10024
mov qword [rsp + 0x60], rbx
lea rdx, str.ETDService
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140005bc3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.140001320
jmp 0x140005c9b
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140005c65
lea rdx, str.ETDService
lea rcx, str.Stopping__s.
call fcn.140001320
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140005c42
nop
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x140005c46
lea rcx, [0x1400261f4]
call fcn.140001320
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140005c10
mov eax, dword [rsp + 0x24]
lea rdx, str.ETDService
lea rcx, [0x1400261f8]
cmp eax, 1
je 0x140005c60
lea rcx, str._n_s_failed_to_stop._n
call fcn.140001320
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140005c88
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.140001320
jmp 0x140005c9b
lea rdx, str.ETDService
lea rcx, str._s_is_removed._n
call fcn.140001320
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x140005cb2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140006180
add rsp, 0x50
pop rdi
ret