joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10005080
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov eax, dword [0x10051070]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x9c
push 0
lea eax, [ebp - 0xa0]
push eax
call fcn.10023d20
add esp, 0xc
mov dword [ebp - 0xa0], 0x9c
lea ecx, [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0
jne 0x100050ee
mov dword [ebp - 0xa0], 0x94
lea edx, [ebp - 0xa0]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x100050ee
xor al, al
jmp 0x10005106
cmp dword [ebp - 0x9c], 6
jne 0x10005104
cmp dword [ebp - 0x98], 1
jne 0x10005104
mov al, 1
jmp 0x10005106
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000afc9
mov esp, ebp
pop ebp
ret

Function at 0x10005120
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x10051070]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x120], 0
push 0x114
push 0
lea eax, [ebp - 0x118]
push eax
call fcn.10023d20
add esp, 0xc
mov dword [ebp - 0x118], 0x114
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x1000518e
cmp dword [ebp - 0x114], 5
ja 0x1000518e
mov dword [ebp - 0x120], 1
jmp 0x10005198
mov dword [ebp - 0x120], 0
cmp dword [ebp - 0x120], 0
je 0x100051aa
mov byte [ebp - 0x119], 1
jmp 0x100051b1
mov byte [ebp - 0x119], 0
mov al, byte [ebp - 0x119]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000afc9
mov esp, ebp
pop ebp
ret

Function at 0x100052b0
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
je 0x10005335
mov ecx, dword [ebp - 4]
cmp dword [ecx + 4], 0
je 0x100052d8
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf01ff
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0
je 0x10005331
mov dword [ebp - 0xc], 0x24
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov eax, dword [ebp + 0xc]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x10005337
xor eax, eax
jmp 0x10005337
xor eax, eax
mov esp, ebp
pop ebp
ret 8
Function at 0x10005340
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
je 0x10005459
mov ecx, dword [ebp - 4]
cmp dword [ecx + 4], 0
je 0x1000536c
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf01ff
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0
je 0x10005453
mov eax, dword [ebp - 4]
add eax, 0xc
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 4
jne 0x100053be
mov eax, 1
jmp 0x1000545b
push 0
push 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x1000542c
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
add eax, 0xc
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1000542a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 2
jne 0x10005426
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 8]
cmp eax, 0x3a98
jbe 0x10005419
xor eax, eax
jmp 0x1000545b
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10005428
jmp 0x1000542a
jmp 0x100053e4
jmp 0x10005430
xor eax, eax
jmp 0x1000545b
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x10], 4
jne 0x1000544d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 1
jmp 0x1000545b
xor eax, eax
jmp 0x1000545b
xor eax, eax
jmp 0x1000545b
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x10006280
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10035db8
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x10051070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x74], 0
mov eax, dword [ebp - 0x5c]
cmp dword [eax + 0x2c], 0
je 0x10006300
mov ecx, dword [ebp - 0x5c]
cmp dword [ecx + 0x30], 0
je 0x10006300
mov ecx, dword [ebp + 8]
call fcn.10004830
movzx edx, al
test edx, edx
jne 0x10006300
mov ecx, dword [ebp + 0xc]
call fcn.10004830
movzx eax, al
test eax, eax
jne 0x10006300
mov ecx, dword [ebp + 0x10]
call fcn.10004830
movzx ecx, al
test ecx, ecx
jne 0x10006300
mov ecx, dword [ebp + 0x14]
call fcn.10004830
movzx edx, al
test edx, edx
je 0x1000630a
mov eax, 1
jmp 0x100063df
call fcn.10005120
movzx eax, al
test eax, eax
je 0x10006320
mov eax, 4
jmp 0x100063df
lea ecx, [ebp - 0x58]
push ecx
call fcn.100041f0
add esp, 4
mov dword [ebp - 0x60], eax
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x64], edx
mov dword [ebp - 4], 0
push str.client.p12
mov eax, dword [ebp - 0x64]
push eax
lea ecx, [ebp - 0x40]
push ecx
call fcn.10002a00
add esp, 0xc
mov dword [ebp - 0x68], eax
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x6c], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.100061e0
add esp, 8
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x40]
call fcn.10001ad0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x58]
call fcn.10001ad0
lea ecx, [ebp - 0x28]
call fcn.10006c70
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100063ac
lea ecx, [ebp - 0x28]
call fcn.10006c70
push eax
mov ecx, dword [ebp - 0x5c]
call fcn.10006570
jmp 0x100063c7
mov dword [ebp - 0x70], 5
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10006d30
mov eax, dword [ebp - 0x70]
jmp 0x100063df
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x78], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.10006d30
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000afc9
mov esp, ebp
pop ebp
ret 0x10
Function at 0x10008d60
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10036000
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x10051070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
add ecx, 0x42c
call fcn.100019c0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp + 8]
call fcn.100019c0
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.100060a0
add esp, 8
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x38]
call fcn.10006c70
push eax
mov ecx, dword [ebp - 0x30]
call fcn.10008a70
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.10006d30
mov byte [ebp - 0x29], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10001ad0
mov al, byte [ebp - 0x29]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000afc9
mov esp, ebp
pop ebp
ret 0x18

Function at 0x1000cb65
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret

Function at 0x406846
Capabilities:
Connect socket

Disassembly:
mov dword [0x6213ec8b], eax
adc byte [edx], al
add al, byte [eax]
add byte [ebx - 0x75], dl
pop ebp
or byte [eax + 0x45b8b57], ah
cmp eax, 0xffffffff
je 0x4069ef
mov ecx, dword [ebx + 0x6e]
test ecx, ecx
je 0x13169ef
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi + 0x14]
lea edx, [esi + 0x28]
inc edi
push edx
push eax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x6e69b8
inc eax
add byte [ebx - 0x7af00008], al
aaa
add dword [esi], ebp
add byte [ebx - 0x493e27cb], cl
cmp edi, edi
salc
mov esi, dword [0x39b6c1d8]
call esi
test ebp, edi
shld esp, ebp, cl
add byte [eax], al
add bh, bh
salc
loop 0x406876
cld
or al, byte [eax]
cmp eax, 0xb23b3
jne 0x847969f4
idiv dword [ebx + 0x20]
mov esi, dword [esi + ebx]
mov esp, dword [ecx]
or eax, esi
scasd eax, dword es:[edi]
push cs
pop edi
dec esp
mov eax, 0xac0b68b4
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, 0x9c8b3
pop edi
pop esi
pop ebx
mov esp, ebp
add dl, 0x36
add byte [eax - 0x74aa35f8], dl
push ebp
mov ebp, esp
Function at 0x401af0
Capabilities:
Get disk information
Get disk size
Get volume information via ioctl

Disassembly:
sub esp, 0x18c
mov eax, dword [0x42fcec]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [0x429dec]
mov ecx, dword [0x429df0]
push 0x80
lea edx, [esp + 0x84]
push edx
push 0
push 0
push 0
push 0
mov dword [esp + 0x90], eax
push 0
lea eax, [esp + 0x94]
push eax
mov dword [esp + 0x9c], ecx
mov word [esp + 0x98], di
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov ecx, str.NTFS
lea eax, [esp + 0x80]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401b7c
test dx, dx
je 0x401b78
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401b7c
add eax, 4
add ecx, 4
test dx, dx
jne 0x401b56
xor eax, eax
jmp 0x401b81
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
test eax, eax
sete cl
lea edx, [esp + 0x80]
push edx
push 0x40
push 0x433e6e
mov word [0x433e6c], di
mov dword [0x443f80], ecx
call fcn.00413f66
add esp, 0xc
cmp dword [0x443f80], 0
je 0x401c2c
mov edx, dword [0x443f30]
push 0
lea eax, [esp + 0x18]
push eax
push 0x60
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push 0x90064
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x401bf2
mov ecx, dword [esp + 0x184]
xor ecx, esp
call fcn.00413f57
add esp, 0x18c
ret
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [0x433e18], eax
mov eax, dword [esp + 0x34]
mov dword [0x433e28], edx
mov dword [0x433e2c], eax
mov eax, dword [esp + 0x44]
mov dword [0x433e1c], ecx
mov ecx, dword [esp + 0x40]
xor edx, edx
mov dword [0x433e44], ecx
div ecx
jmp 0x401c83
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
mov dword [0x433e18], eax
mov eax, dword [esp + 4]
mov dword [0x433e1c], 0
mov dword [0x433e28], ecx
mov dword [0x433e2c], 0
mov dword [0x433e44], edx
mov ecx, dword [esp + 0x184]
mov dword [0x433e40], eax
xor ecx, esp
mov eax, 1
call fcn.00413f57
add esp, 0x18c
ret
Function at 0x401f20
Capabilities:
Get volume information via ioctl

Disassembly:
mov edx, dword [esi + 0x10178]
sub esp, 0x90
push ebx
push ebp
push edi
xor edi, edi
push edi
lea eax, [esp + 0x38]
push eax
push 0x60
lea ecx, [esp + 0x44]
push ecx
push edi
push edi
push 0x90064
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x401f66
call dword [sym.imp.KERNEL32.dll_GetLastError]
dec eax
neg eax
sbb eax, eax
inc eax
pop edi
pop ebp
pop ebx
add esp, 0x90
ret
mov eax, dword [esp + 0x90]
mov ebx, dword [esp + 0x94]
mov ebp, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
add eax, 0xffffffff
push 1
adc ebx, 0xffffffff
push ebx
push eax
push ebp
mov dword [esp + 0x30], eax
push ecx
lea eax, [esi + 0x10188]
push eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebp
call fcn.00401950
xor edx, edx
cmp dword [esi + 0x10180], edi
jbe 0x401fcc
xor eax, eax
mov ecx, dword [esi + 0x1017c]
mov dword [ecx + eax + 0x20], edi
mov dword [ecx + eax + 0x24], edi
inc edx
add eax, 0x28
cmp edx, dword [esi + 0x10180]
jb 0x401fb2
mov edi, dword [esi + 0x10184]
mov ecx, dword [esp + 0x10]
push 0
push edi
push ebp
push ecx
call fcn.00424aa0
imul edi, eax
xor ecx, ecx
cmp ecx, ebx
ja 0x4020ab
jb 0x401ff9
cmp edi, dword [esp + 0x20]
ja 0x4020ab
lea ecx, [eax + eax*4]
add ecx, ecx
add ecx, ecx
add ecx, ecx
lea edx, [eax + 1]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xc], edx
jmp 0x402014
mov ebp, dword [esp + 0x14]
mov edx, dword [esi + 0x10184]
mov ecx, dword [esp + 0xc]
imul ecx, edx
mov edi, edx
mov dword [esp + 0x2c], 0
imul edi, eax
dec ecx
xor edx, edx
cmp dword [esp + 0x2c], ebp
ja 0x40204b
jb 0x402043
cmp edi, dword [esp + 0x10]
jae 0x40204b
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x2c], ebp
cmp edx, ebx
jb 0x40205d
ja 0x402057
cmp ecx, dword [esp + 0x20]
jbe 0x40205d
mov ecx, dword [esp + 0x20]
mov edx, ebx
mov ebp, dword [esp + 0x1c]
sub ecx, edi
sbb edx, dword [esp + 0x2c]
add ecx, 1
adc edx, 0
mov edi, edx
mov edx, dword [esi + 0x1017c]
add dword [edx + ebp + 0x20], ecx
lea edx, [edx + ebp + 0x20]
adc dword [edx + 4], edi
mov ecx, dword [esi + 0x10184]
inc dword [esp + 0xc]
inc eax
add ebp, 0x28
imul ecx, eax
xor edx, edx
mov dword [esp + 0x1c], ebp
cmp edx, ebx
jb 0x402010
ja 0x4020ab
cmp ecx, dword [esp + 0x20]
jbe 0x402010
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x90
ret
Function at 0x403c10
Capabilities:
Get file size

Disassembly:
sub esp, 0x30
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
xor ebx, ebx
push edi
lea eax, [esp + 0x10]
push eax
mov edi, 1
push ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi + 0xa0], ecx
push ebp
lea ecx, [esp + 0x1c]
mov dword [esi + 0xa4], edx
call fcn.00402af0
test eax, eax
jne 0x403c79
mov dword [esp + 0x40], ebx
jmp 0x403cf8
mov ecx, dword [esp + 0x28]
cmp ecx, edi
jbe 0x403ca3
xor eax, eax
add dword [esi + 0x50], ecx
adc dword [esi + 0x54], eax
add dword [esi + 0x58], ecx
mov ecx, dword [esp + 0x14]
adc dword [esi + 0x5c], eax
add dword [esi + 0x38], edi
mov eax, dword [esp + 0x10]
adc dword [esi + 0x3c], ebx
add dword [esi + 0x40], eax
adc dword [esi + 0x44], ecx
push esi
lea edi, [esp + 0x1c]
call fcn.00402510
cmp byte [esp + 0x44], bl
jne 0x403cd6
mov ecx, esi
cmp dword [esi + 0x101d0], ebx
jne 0x403cc7
push ebp
mov edx, edi
call fcn.004032d0
jmp 0x403cd2
lea ebx, [esp + 0x18]
call fcn.00403830
xor ebx, ebx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x18]
add dword [esi + 0x78], eax
mov ecx, dword [esp + 0x1c]
adc dword [esi + 0x7c], ecx
cmp dword [esi + 0xb0], ebx
je 0x403cf8
add dword [esi + 0x80], eax
adc dword [esi + 0x84], ecx
mov edx, dword [esp + 0x34]
push edx
call fcn.00407d28
mov eax, dword [esp + 0x44]
add esp, 4
pop edi
pop ebp
pop ebx
add esp, 0x30
ret 8
Function at 0x406110
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x406129
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406164
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x406160
lea ebx, [ebx]
cmp esi, eax
jae 0x406164
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x406150
cmp esi, eax
jb 0x40616a
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x4069f0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x20064
call fcn.00417a00
mov eax, dword [0x42fcec]
xor eax, esp
mov dword [esp + 0x20060], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
push 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00409365
mov eax, dword [ebp + 8]
push eax
lea esi, [esp + 0x14]
call fcn.00406f60
movzx eax, word [edi]
mov dword [esp + 0x2005c], 0
mov dword [esp + 0x10], vtable.CService.0
mov dword [esp + 0x20058], 0x42a38c
cmp ax, 0x2d
je 0x406aac
cmp ax, 0x2f
je 0x406aac
call fcn.00407350
mov esi, eax
mov eax, dword [esp + 0x20028]
mov dword [esp + 0x20058], 0x42a358
mov dword [esp + 0x10], vtable.CServiceTemplate.0
test eax, eax
je 0x406af1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20060]
xor ecx, esp
call fcn.00413f57
mov esp, ebp
pop ebp
ret 0x10
add edi, 2
push edi
push 0x42a334
call fcn.004149a5
add esp, 8
test eax, eax
jne 0x406b0a
lea eax, [esp + 0x10]
call fcn.004070d0
mov esi, eax
mov eax, dword [esp + 0x20028]
mov dword [esp + 0x20058], 0x42a358
mov dword [esp + 0x10], vtable.CServiceTemplate.0
test eax, eax
je 0x406af1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20060]
xor ecx, esp
call fcn.00413f57
mov esp, ebp
pop ebp
ret 0x10
push edi
push str.remove
call fcn.004149a5
add esp, 8
test eax, eax
jne 0x406b65
lea ebx, [esp + 0x10]
call fcn.004071e0
mov esi, eax
mov eax, dword [esp + 0x20028]
mov dword [esp + 0x20058], 0x42a358
mov dword [esp + 0x10], vtable.CServiceTemplate.0
test eax, eax
je 0x406af1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20060]
xor ecx, esp
call fcn.00413f57
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esp + 0x20028]
mov dword [esp + 0x20058], 0x42a358
mov dword [esp + 0x10], vtable.CServiceTemplate.0
test eax, eax
je 0x406b8a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x2006c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 0x3e9
call fcn.00413f57
mov esp, ebp
pop ebp
ret 0x10
Function at 0x406db0
Capabilities:
Create thread

Disassembly:
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 0
push 0
mov esi, ecx
call edi
push 0
push 0
push 1
push 0
mov dword [0x433cc8], eax
call edi
push 0
push 0
push 1
push 0
mov dword [0x433cb4], eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0x431188
mov dword [0x433cb0], eax
mov eax, dword [esi + 0x20018]
push 0x406f40
mov dword [0x43118c], eax
mov ecx, dword [esi + 0x20018]
push 0
push 0
mov dword [esi + 0x2004c], ecx
call edi
push 0
push 0
lea edx, [esi + 0x20048]
push edx
push 0x406f40
push 0
push 0
mov dword [esi + 0x20050], eax
call edi
mov dword [esi + 0x20054], eax
pop edi
mov eax, 1
pop esi
ret

Function at 0x406ed0
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x431198]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SuspendThread]
push eax
mov esi, ecx
call edi
mov ecx, dword [esi + 0x20054]
push ecx
call edi
pop edi
mov eax, 1
pop esi
ret

Function at 0x406f00
Capabilities:
Resume thread

Disassembly:
mov eax, dword [0x431198]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ResumeThread]
push eax
mov esi, ecx
call edi
mov ecx, dword [esi + 0x20054]
push ecx
call edi
pop edi
mov eax, 1
pop esi
ret

Function at 0x4070d0
Capabilities:
Create service
Persist via run registry key
Persist via windows service
Set registry value

Disassembly:
push ecx
push ebp
push esi
mov esi, eax
xor ebp, ebp
cmp dword [esi + 4], 4
push edi
jl 0x407171
push 0xf003f
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x407108
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 0x3eb
mov ecx, esi
call edx
pop edi
pop esi
pop ebp
pop ecx
ret
mov eax, dword [esi + 0x14]
push ebx
mov edx, dword [esi + 0x10]
push 0
push 0
push eax
mov eax, dword [esi + 0xc]
push 0
push 0
lea ecx, [esi + 0x10018]
push ecx
push 1
push 2
push 0x10
push 0xf01ff
push edx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x407152
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 0x3eb
mov ecx, esi
call eax
mov ebp, eax
jmp 0x407155
push eax
call ebx
push edi
call ebx
mov ecx, dword [esi + 0xc]
push ecx
push str._s_service_installed._n
call fcn.00414cff
add esp, 8
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
lea edx, [esp + 0xc]
push edx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x4071c3
add esi, 0x10018
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0xc]
lea eax, [eax + eax + 2]
push eax
push esi
push 1
push 0
push str.CDPCODiskOptimizer
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
push 0
push 0x42a454
push 0x42a454
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
Function at 0x4071e0
Capabilities:
Delete registry value
Delete service
Persist via run registry key
Query service status
Stop service

Disassembly:
push ecx
cmp dword [ebx + 4], 4
push ebp
push esi
jl 0x40730a
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
mov dword [esp + 8], ebp
test ebp, ebp
jne 0x407218
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 0x3eb
mov ecx, ebx
call edx
pop esi
pop ebp
pop ecx
ret
mov eax, dword [ebx + 0xc]
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x407247
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push 0x3ed
mov ecx, ebx
call eax
pop esi
pop ebp
pop ecx
ret
push edi
lea edi, [ebx + 0x2001c]
push edi
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4072d0
mov ecx, dword [ebx + 0xc]
push ecx
push str.Stopping__s_service._Please_wait.
call fcn.00414cff
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x1f4
call ebp
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4072af
cmp dword [ebx + 0x20020], 3
jne 0x4072af
push 0x429fb4
call fcn.00414cff
add esp, 4
push 0x1f4
call ebp
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x407286
cmp dword [ebx + 0x20020], 1
jne 0x4072bf
push str._stopped._n
jmp 0x4072c4
push str._failed._n
call fcn.00414cff
mov ebp, dword [esp + 0x10]
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
pop edi
test eax, eax
je 0x4072e7
mov edx, dword [ebx + 0xc]
push edx
push str._s_service_removed._n
jmp 0x4072f0
mov eax, dword [ebx + 0xc]
push eax
push str.Cant_remove__s_service._n
call fcn.00414cff
add esp, 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop esi
xor eax, eax
pop ebp
pop ecx
ret
lea ecx, [esp + 8]
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x40733e
mov edx, dword [esp + 8]
push str.CDPCODiskOptimizer
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
xor eax, eax
pop ebp
pop ecx
ret