joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140027de0
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.14001b784
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001b784
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140027f30
cmp rax, 0xffffffffffffffff
je 0x140027f30
xor edi, edi
test rbp, rbp
jle 0x140027edb
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001dd70
mov rbx, rax
test rax, rax
jne 0x140027e68
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140027ed1
mov edx, 0x8000
mov ecx, r14d
call fcn.140015928
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.14001c460
cmp eax, 0xffffffff
je 0x140027eb1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140027e78
mov edx, r15d
mov ecx, r14d
call fcn.140015928
jmp 0x140027ed1
cmp byte [rsi + 0x38], dil
je 0x140027ec8
cmp dword [rsi + 0x34], 5
jne 0x140027ec8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140027ed1
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140019e48
jmp 0x140027f44
jns 0x140027f44
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001b784
cmp rax, 0xffffffffffffffff
jne 0x140027efc
cmp byte [rsi + 0x30], dil
je 0x140027f44
mov edi, dword [rsi + 0x2c]
jmp 0x140027f44
mov ecx, r14d
call fcn.140016f28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140027f44
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 0x140027f44
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140027f3d
mov eax, dword [rsi + 0x2c]
jmp 0x140027f42
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001b784
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 0x140689c00
Capabilities:
Encode data using xor

Disassembly:
mov rax, qword gs:[0x60]
movabs r11, 0x689c70
movabs r10, 0x689c74
mov r9, qword [rax + 0x10]
xor eax, eax
movsxd rcx, dword [r9 + 0x3c]
movsxd r11, dword [r9 + r11]
add rcx, r9
mov r10d, dword [r9 + r10]
movzx r8d, word [rcx + 0x14]
add r8, rcx
cmp dword [r8 + 0x20], eax
jbe 0x140689c66
mov edx, eax
nop dword [rax]
nop word [rax + rax]
mov ecx, dword [r8 + 0x24]
inc eax
add rcx, rdx
inc rdx
xor byte [rcx + r9], r10b
cmp eax, dword [r8 + 0x20]
jb 0x140689c50
lea rax, [r9 + r11]
jmp rax
Function at 0x1404ccd30
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x1404ccd3d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x1404ccd4d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x1404ccd35
lea eax, [rcx + 1]
jmp 0x1404ccd5b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1404ccd6e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1404ccd54
sub eax, 3
jb 0x1404ccd8e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x1404ccddd
sar eax, 1
movsxd rbp, eax
jb 0x1404ccdc4
jmp 0x1404ccd9c
add ebx, ebx
jne 0x1404ccd9a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1404ccdc4
inc ecx
add ebx, ebx
jne 0x1404ccdaa
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1404ccdc4
call r11
adc ecx, ecx
add ebx, ebx
jne 0x1404ccdbd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x1404ccdac
add ecx, 2
jmp 0x1404ccdc9
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.1404cccf2
jmp 0x1404ccd3d
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
sub rsp, 0x28
lea rdi, [rsi + 0x4ca000]
mov eax, dword [rdi]
or eax, eax
je 0x1404cce3d
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x4cd1e4]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x1404ccded
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x1404cce37
mov qword [rbx], rax
add rbx, 8
jmp 0x1404cce0d
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x1404cce81
cmp al, 0xef
ja 0x1404cce69
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x1404cce49
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x1404cce58
mov eax, dword [rdi]
add rdi, 4
jmp 0x1404cce58
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x237]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x1404cced5
sub rsp, 0xffffffffffffff80
jmp 0x140015368
Function at 0x140001710
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x70
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor edi, edi
mov rbx, rcx
mov rcx, qword [rcx]
xor r9d, r9d
mov qword [rsp + 0x30], rdi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
jne 0x14000176e
xor eax, eax
jmp 0x14000189a
lea rdx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140001872
cmp qword [rsp + 0x48], 0x216
jl 0x140001872
mov rcx, qword [rbx + 8]
mov r9d, 2
xor r8d, r8d
mov rdx, 0xfffffffffffffdea
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140001851
mov rcx, qword [rbx + 8]
lea rdx, [rbx + 0x8c]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rdi
mov r8d, 0x20c
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140001851
cmp dword [rsp + 0x40], 0x20c
jne 0x140001851
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x40]
mov r8d, 0xa
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140001851
cmp dword [rsp + 0x40], 0xa
jne 0x140001851
movzx eax, byte [rsp + 0x50]
xor r9d, r9d
mov byte [rbx + 0x48], al
xor r8d, r8d
movzx eax, byte [rsp + 0x51]
mov rdx, rdi
mov byte [rbx + 0x49], al
mov rax, qword [rsp + 0x52]
mov qword [rbx + 0x18], rax
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea rdi, [rbx + 0x8c]
test eax, eax
je 0x140001858
mov rax, qword [rbx + 0x18]
mov qword [rbx + 0x10], rax
mov eax, 1
jmp 0x14000189a
lea rdi, [rbx + 0x8c]
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
je 0x140001891
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
jmp 0x140001891
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
je 0x14000188a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
lea rdi, [rbx + 0x8c]
mov ecx, 0x20c
xor eax, eax
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140006250
mov rbx, qword [rsp + 0x88]
add rsp, 0x70
pop rdi
ret
Function at 0x140006ce0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140006d2a
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140006d2a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140006d2a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140006d2a
cmp dword [rcx + 0x84], 0xe
jbe 0x140006d2a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140006d2c
xor al, al
add rsp, 0x28
ret

Function at 0x14000e7f4
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000e5f0
Function at 0x140013878
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 0x1400138a8
xor eax, eax
jmp 0x14001396b
mov rbp, rbx
cmp word [rax], si
je 0x1400138cd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400138b4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400138b0
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.140013798
movsxd r14, eax
test eax, eax
jne 0x14001390b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400138a1
mov rcx, r14
call fcn.14000fee0
mov rdi, rax
test rax, rax
jne 0x140013924
xor ecx, ecx
call fcn.14000f268
jmp 0x140013900
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.140013798
test eax, eax
jne 0x140013955
mov rcx, rdi
call fcn.14000f268
jmp 0x14001395f
xor ecx, ecx
call fcn.14000f268
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 0x140017c58
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140017c6e
mov al, 1
jmp 0x140017cce
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140017c7f
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140017ccc
mov ecx, dword [rcx + 0x18]
nop
call fcn.1400140e0
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140017ccc
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140017ccc
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140017ccc
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140017cce
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140018e60
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.14000d800
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140018eea
cmp byte [rbp - 0x21], r15b
je 0x140018ee5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140018f20
call fcn.14000f4b8
test eax, eax
jne 0x140018f0c
cmp byte [rbp - 0x21], r15b
je 0x140018f04
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140018f20
cmp byte [rbp - 0x21], r15b
je 0x140018f1d
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.140011ee4
test eax, eax
jne 0x140018fc0
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000d800
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140018f5f
cmp byte [rbp - 0x21], r15b
je 0x140018f94
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140018f94
call fcn.14000f4b8
test eax, eax
jne 0x140018f80
cmp byte [rbp - 0x21], r15b
je 0x140018f79
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140018f94
cmp byte [rbp - 0x21], r15b
je 0x140018f91
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.140011ee4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140018fc0
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140018fc3
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140018fd1
mov rcx, rdi
call fcn.14000f268
cmp byte [rbp + 0x3f], r15b
je 0x140018fe0
mov rcx, qword [rbp + 0x27]
call fcn.14000f268
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 0x14001b5d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001b5f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001b5f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001101
Capabilities:
Execute anti-debugging instructions

Disassembly:
xor eax, eax
cpuid
mov eax, 1
cpuid
movabs r9, 0xb2d05e00
cpuid
rdtsc
shl rdx, 0x20
or rax, rdx
mov rcx, rax
fldpi
frndint
rdtsc
shl rdx, 0x20
or rax, rdx
sub rax, rcx
cmp rax, r9
jb 0x140001124
push rbp
mov rbp, rsp
sub rsp, 8
mov r10, 0xa
mov rcx, 0x12345678
dec rcx
xor r9, r9
mov rax, rcx
jne 0x14000114f
xor rax, rax
mov rax, rbx
add rax, rdx
nop
nop
nop
dec r10
xor r11, r11
jne 0x140001148
xor rax, rax
mov rax, 0xa
dec rax
nop
nop
add rsp, 8
pop rbp
ret

Function at 0x1400026c7
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub rsp, 0xa0
mov rcx, 0
rol dword [rax], 0
add byte [rax], al
mov rdx, 0xa699
mov r8, 0x1000
lea r9, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x140002718
mov rbx, rax
call 0x1400026fb
nop
pop rsi
mov r9, rax
add rsi, 0x66ff3
mov rcx, 0xa699
mov r8, rcx
lea rax, [rsi]
mov dl, byte [rax]
mov byte [rbx], dl
add rsi, 1
add rbx, 1
add rax, 1
dec r8
jne 0x140002714
call r9
mov ecx, 1
ret
Function at 0x140003e70
Capabilities:
Create process on windows
Get common file path
Get program files directory

Disassembly:
push rbx
sub rsp, 0x2d0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov rax, qword [0x140066c80]
xor rax, rsp
mov qword [rsp + 0x2c0], rax
mov word [rsp + 0xb0], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0xb2]
call fcn.140031f70
lea r11, [rsp + 0xb0]
mov qword [rsp + 0x20], r11
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x26]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
call fcn.140014ad4
mov r11, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140003ef1
mov ecx, 0x80004005
call fcn.1400047b0
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0xb0]
lea rdx, str._sJiransoftPCFILTERPCFILTERService.exe
lea rcx, [rsp + 0x30]
call fcn.140004930
lea r8, [0x140055390]
lea rdx, str.__x86_
lea rcx, [rsp + 0x30]
call fcn.140004230
xor edx, edx
lea r8d, [rdx + 0x70]
lea rcx, [rsp + 0x40]
call fcn.140031f70
mov dword [rsp + 0x40], 0x70
lea rax, str.open
mov qword [rsp + 0x50], rax
mov rbx, qword [rsp + 0x30]
mov qword [rsp + 0x58], rbx
lea rax, str._service
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x44], 0x140
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140003fb1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rsp + 0x2c0]
xor rcx, rsp
call fcn.14002fbc0
add rsp, 0x2d0
pop rbx
ret
Function at 0x140003ff0
Capabilities:
Print debug messages
Stop service

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], r12
mov r12, rdx
or edi, 0xffffffff
xor ecx, ecx
xor edx, edx
mov r8d, 0x80000000
mov ebx, edi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rbp, rax
je 0x1400040ea
mov rdx, qword [r12]
mov r8d, 0x80000000
mov rcx, rax
mov qword [rsp + 0x58], rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov rsi, rax
je 0x1400040cd
lea r8, [rsp + 0x20]
lea edx, [rdi + 5]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov r11d, dword [rsp + 0x24]
cmp r11d, 1
jne 0x140004085
mov rcx, rsi
lea ebx, [rdi + 3]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x58]
jmp 0x1400040f7
cmp r11d, 4
jne 0x1400040a8
mov rcx, rsi
lea ebx, [r11 - 3]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x58]
jmp 0x1400040f7
mov eax, 3
cmp r11d, 7
mov rcx, rsi
cmove ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x58]
jmp 0x1400040f7
lea rcx, str.OpenService
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x58]
jmp 0x1400040f7
lea rcx, str.OpenSCManager
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rdx, qword [r12]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], edi
mov r12, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x50]
add edi, 0xffffffff
test edi, edi
mov rdi, qword [rsp + 0x60]
jg 0x140004124
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov eax, ebx
add rsp, 0x40
pop rbx
ret
Function at 0x140004130
Capabilities:
Print debug messages
Query service status
Start service

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x58], rsi
mov rsi, rdx
xor ecx, ecx
xor edx, edx
mov r8d, 0x80000000
mov qword [rsp + 0x40], rdi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rdi, rax
je 0x1400041e4
mov rdx, qword [rsi]
mov r8d, 0x14
mov rcx, rax
mov qword [rsp + 0x50], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edx, 0x7f02
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.USER32.dll_LoadCursorW]
mov rcx, rax
call qword [sym.imp.USER32.dll_SetCursor]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
cmp eax, 1
jne 0x1400041d4
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [rsp + 0x24], 4
je 0x1400041d4
mov ecx, dword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [rsp + 0x24], 4
jne 0x1400041b5
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x50]
jmp 0x1400041f1
lea rcx, str.OpenSCManager
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rsi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x58]
add eax, 0xffffffff
test eax, eax
jg 0x140004223
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
add rsp, 0x48
ret
Function at 0x140004cb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
sub rsp, 0x20
mov eax, r8d
mov rbp, rdx
mov ebx, r8d
shr eax, 4
mov rsi, rcx
mov r8d, 6
add ax, 1
mov rcx, rbp
movzx edx, ax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
mov r12, rax
je 0x140004e12
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140004e12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rdi, rax
je 0x140004e12
mov rdx, r12
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rdi
and ebx, 0xf
jbe 0x140004d56
nop
cmp rdi, r11
jae 0x140004e12
add ebx, 0xffffffff
movzx eax, word [rdi]
lea rdi, [rdi + rax*2 + 2]
jne 0x140004d40
cmp rdi, r11
jae 0x140004e12
movzx eax, word [rdi]
test ax, ax
je 0x140004e12
movzx ebx, ax
mov rax, qword [rsi]
mov ecx, 1
sub ecx, dword [rax - 8]
mov eax, dword [rax - 0xc]
sub eax, ebx
or ecx, eax
jge 0x140004d8c
mov edx, ebx
mov rcx, rsi
call fcn.1400047d0
movzx ecx, word [rdi]
lea r8, [rdi + 2]
cmp ecx, 0xffffffff
jne 0x140004da9
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r8
repne scasw ax, word [rdi]
not rcx
and ecx, ecx
movsxd r9, ecx
mov rcx, qword [rsi]
lea rdi, [rbx + rbx]
mov rdx, rdi
add r9, r9
call fcn.1400302b0
test eax, eax
je 0x140004de8
cmp eax, 0xc
je 0x140004de2
cmp eax, 0x16
je 0x140004ddc
cmp eax, 0x22
je 0x140004ddc
cmp eax, 0x50
je 0x140004de8
call fcn.140015260
int3
call fcn.140015260
int3
call fcn.140015218
int3
test ebx, ebx
js 0x140004e07
mov rcx, qword [rsi]
cmp ebx, dword [rcx - 0xc]
jg 0x140004e07
mov dword [rcx - 0x10], ebx
mov rcx, qword [rsi]
mov eax, 1
mov word [rdi + rcx], 0
jmp 0x140004e14
mov ecx, 0x80070057
call fcn.1400047b0
int3
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r12
ret

Function at 0x140004e30
Capabilities:
Extract resource via kernel32 functions

Disassembly:
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
jne 0x140004e63
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rbx, rax
je 0x140004ea7
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rbx
and edi, 0xf
jbe 0x140004ea2
cmp rbx, r11
jae 0x140004ea7
add edi, 0xffffffff
movzx eax, word [rbx]
lea rbx, [rbx + rax*2 + 2]
jne 0x140004e90
cmp rbx, r11
jb 0x140004eab
xor eax, eax
jmp 0x140004eb7
xor eax, eax
cmp word [rbx], ax
cmove rbx, rax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret