joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405740
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x41cb43
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1d4
push ebx
push esi
push edi
xor ebx, ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x1e8], ebx
call fcn.00416153
mov eax, dword [esp + 0x1f0]
push ebx
push 0x40
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x1f4], 1
call fcn.00416265
test eax, eax
je 0x405806
push ebx
push 0x424694
push str.NETIDX
push str.CapLoghistory.ini
call fcn.00406e70
mov esi, eax
add esp, 0x10
lea eax, [esi + esi*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*8]
lea edi, [esi + ecx*2]
lea ecx, [esp + 0xc]
call fcn.0041655f
cmp eax, edi
lea ecx, [esp + 0xc]
jae 0x4057f4
call fcn.00416480
mov edx, dword [esp + 0x1f0]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push 0x424694
push str.NETIDX
push str.CapLoghistory.ini
call fcn.00406f10
add esp, 0x10
jmp 0x405806
call fcn.0041655f
cmp eax, edi
jne 0x405837
lea ecx, [esp + 0xc]
call fcn.00416480
lea ecx, [esp + 0xc]
mov byte [esp + 0x1e8], bl
call fcn.004161a8
lea ecx, [esp + 0x1f0]
mov dword [esp + 0x1e8], 0xffffffff
call fcn.00415d1c
mov eax, 1
jmp 0x4058e1
push ebp
cmp esi, ebx
mov ebp, 1
jle 0x40584c
push ebx
push edi
lea ecx, [esp + 0x18]
call fcn.00416407
lea eax, [esp + 0x20]
push 0x1c3
push eax
lea ecx, [esp + 0x18]
call fcn.00416382
cmp eax, 0x1c3
jne 0x4058ae
lea ecx, [esp + 0x20]
push ecx
call fcn.00404dd0
add esp, 4
cmp eax, ebx
je 0x4058ac
inc esi
push esi
push 0x424694
push str.NETIDX
push str.CapLoghistory.ini
call fcn.00406f10
add esp, 0x10
lea edx, [esp + 0x20]
lea ecx, [esp + 0x10]
push 0x1c3
push edx
call fcn.00416382
cmp eax, 0x1c3
je 0x405866
jmp 0x4058ae
xor ebp, ebp
lea ecx, [esp + 0x10]
call fcn.00416480
lea ecx, [esp + 0x10]
mov byte [esp + 0x1ec], bl
call fcn.004161a8
lea ecx, [esp + 0x1f4]
mov dword [esp + 0x1ec], 0xffffffff
call fcn.00415d1c
mov eax, ebp
pop ebp
mov ecx, dword [esp + 0x1e0]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x1e0
ret
Function at 0x405d70
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x41cbd1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x128
push ebx
push esi
push edi
lea eax, [esp + 0x10]
push str._Y__m__d
lea ecx, [esp + 0x2c]
push eax
push ecx
call fcn.00414be0
mov ecx, eax
call fcn.00414c22
lea edx, [esp + 0x30]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x30]
push 0x104
push edx
rep stosd dword es:[edi], eax
push eax
mov dword [esp + 0x148], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x30]
push 0x5c
push eax
call fcn.00409bf0
mov byte [eax + 1], 0
mov edi, str.CapLog_fileop_
or ecx, 0xffffffff
xor eax, eax
add esp, 8
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.__________.txt
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call fcn.0041547a
lea eax, [esp + 0x14]
lea edx, [esp + 0x30]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push edx
mov byte [esp + 0x148], 1
call fcn.00415d8a
call fcn.00405560
mov eax, dword [esp + 0x24]
add esp, 8
xor esi, esi
test eax, eax
jle 0x405ef4
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov bl, 2
lea eax, [esp + 0xc]
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.004052c0
mov ecx, dword [esp + 0x1c]
xor edx, edx
dec ecx
lea eax, [esp + 0xc]
cmp esi, ecx
mov byte [esp + 0x13c], bl
sete dl
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
call fcn.00415a91
call fcn.00405f40
add esp, 8
test eax, eax
je 0x405ee3
mov ecx, dword [esp + 0xc]
push ecx
call edi
lea ecx, [esp + 0xc]
mov byte [esp + 0x13c], 1
call fcn.00415d1c
mov eax, dword [esp + 0x1c]
inc esi
cmp esi, eax
jl 0x405e80
jmp 0x405ef4
lea ecx, [esp + 0xc]
mov byte [esp + 0x13c], 1
call fcn.00415d1c
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x1c]
call fcn.0041550d
lea ecx, [esp + 0x14]
mov byte [esp + 0x13c], 0
call fcn.004154ad
lea ecx, [esp + 0x10]
mov dword [esp + 0x13c], 0xffffffff
call fcn.00415d1c
mov ecx, dword [esp + 0x134]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x134
ret
Function at 0x406510
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41cc6b
push eax
mov eax, 0x2d5e4
mov dword fs:[0], esp
call fcn.00409a50
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x1c]
push 0x104
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.00409bf0
mov byte [eax + 1], 0
mov edi, str.spy9.map
or ecx, 0xffffffff
xor eax, eax
add esp, 8
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x406649
mov ecx, ebp
call fcn.00406880
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and al, 0xfe
lea edx, [esp + 0x1c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0xc]
call fcn.00416153
push 0
lea ecx, [esp + 0x20]
push 0x1001
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x2d604], 0
call fcn.00416265
test eax, eax
je 0x40662e
mov ecx, 0xb534
xor eax, eax
lea edi, [esp + 0x120]
lea edx, [esp + 0x120]
rep stosd dword es:[edi], eax
push 0x2d4d0
push edx
lea ecx, [esp + 0x14]
call fcn.004163bc
lea ecx, [esp + 0xc]
call fcn.00416480
mov ecx, ebp
call fcn.004068a0
lea ecx, [esp + 0xc]
mov dword [esp + 0x2d5f8], 0xffffffff
call fcn.004161a8
mov ecx, dword [esp + 0x2d5f0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x2d5f0
ret
Function at 0x406910
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x228
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1004]
push eax
call sub.WSOCK32.dll_closesocket
mov eax, dword [esi + 0x1004]
mov edi, 1
cmp eax, 0xffffffff
jne 0x406958
push 0
push edi
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0x1004], eax
jne 0x406958
pop edi
xor eax, eax
pop esi
add esp, 0x228
ret 0xc
mov eax, dword [esp + 0x234]
xor ecx, ecx
mov dword [esp + 0x10], ecx
cmp eax, 0xffffffff
mov dword [esp + 0x14], ecx
mov word [esp + 0x10], 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
jne 0x40698e
pop edi
xor eax, eax
pop esi
add esp, 0x228
ret 0xc
mov edx, dword [esp + 0x238]
push edx
call sub.WSOCK32.dll_htons
mov ecx, dword [esi + 0x1004]
mov word [esp + 0x12], ax
lea eax, [esp + 8]
mov dword [esp + 8], edi
push eax
push 0x8004667e
push ecx
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esi + 0x1004]
lea edx, [esp + 0x10]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x406a3e
mov ecx, dword [esp + 0x23c]
mov eax, dword [esi + 0x1004]
lea edx, [esp + 0x20]
mov dword [esp + 0x20], ecx
push edx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x134], eax
push 0
lea edx, [esp + 0x134]
push ecx
inc eax
push edx
push eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], edi
mov dword [esp + 0x140], edi
call sub.WSOCK32.dll_select
test eax, eax
je 0x406a35
mov ecx, dword [esi + 0x1004]
lea eax, [esp + 0x28]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x406a3e
mov ecx, esi
xor edi, edi
call fcn.004068f0
mov eax, dword [esi + 0x1004]
lea edx, [esp + 8]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x14], 0
call sub.WSOCK32.dll_ioctlsocket
mov edx, dword [esi + 0x1004]
lea ecx, [esp + 0xc]
push 4
push ecx
push 0x1005
push 0xffff
push edx
mov dword [esp + 0x20], 0x1388
call sub.WSOCK32.dll_setsockopt
mov ecx, dword [esi + 0x1004]
lea eax, [esp + 0xc]
push 4
push eax
push 0x1006
push 0xffff
push ecx
call sub.WSOCK32.dll_setsockopt
mov eax, edi
pop edi
pop esi
add esp, 0x228
ret 0xc

Function at 0x406ab0
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0
call ebp
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
mov ebx, eax
mov eax, dword [esp + 0x14]
push 0
push esi
push edi
mov ecx, dword [eax + 0x1004]
push ecx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x406b0f
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x406b29
call ebp
sub eax, ebx
cmp eax, 0xfa0
ja 0x406b29
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406b25
test eax, eax
je 0x406b29
mov edx, dword [esp + 0x10]
add edi, eax
add edx, eax
sub esi, eax
mov dword [esp + 0x10], edx
call ebp
mov ebx, eax
test esi, esi
jg 0x406ad5
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
Function at 0x406b40
Capabilities:
Check for time delay via gettickcount
Send data
Send data on socket

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push edi
mov dword [esp + 0x10], ecx
call ebp
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x10]
push 0
push esi
push edi
mov ecx, dword [eax + 0x1004]
push ecx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x406b95
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x406ba7
call ebp
sub eax, ebx
cmp eax, 0xfa0
ja 0x406ba7
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406ba1
test eax, eax
jle 0x406ba7
add edi, eax
sub esi, eax
call ebp
mov ebx, eax
test esi, esi
jle 0x406bb1
jmp 0x406b5b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8

Function at 0x406e70
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
mov ecx, 0x41
xor eax, eax
push ebx
push esi
push edi
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0xc]
push 0x5c
push ecx
call fcn.00409bf0
mov edi, dword [esp + 0x11c]
mov byte [eax + 1], 0
or ecx, 0xffffffff
xor eax, eax
add esp, 8
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x11c]
mov ecx, ebx
and ecx, 3
lea eax, [esp + 0xc]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x120]
push eax
mov eax, dword [esp + 0x11c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
pop edi
pop esi
pop ebx
add esp, 0x104
ret

Function at 0x4070c0
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x4070e5
push esi
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4070e3
mov eax, dword [eax + 0xc]
pop esi
mov ecx, dword [eax]
mov eax, dword [ecx]
ret
xor eax, eax
pop esi
ret

Function at 0x4070f0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x404
push edi
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
lea ecx, [esp + 8]
push eax
push ecx
mov dword [esp + 0xc], 0x400
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
jne 0x407134
add esp, 0x404
ret
lea edx, [esp + 4]
push edx
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x407149
add esp, 0x404
ret
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
add esp, 0x404
ret
Function at 0x407160
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41ccf7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [0x424aa0]
push ebx
push esi
xor esi, esi
mov dword [esp + 0x14], esi
mov dword [esp + 8], eax
mov ebx, 1
mov dword [esp + 0xc], eax
mov dword [esp + 0x28], ebx
or eax, 0xffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], eax
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
push ecx
push edx
push esi
push eax
mov byte [esp + 0x38], 2
mov dword [esp + 0x20], 6
call sub.iphlpapi.dll_SendARP
cmp eax, esi
jne 0x407293
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x407293
lea ecx, [eax + eax*2]
push edi
push ecx
call fcn.0041611f
mov edx, dword [esp + 0x18]
add esp, 4
dec edx
mov edi, eax
test edx, edx
jbe 0x407220
xor eax, eax
lea ecx, [esp + 0xc]
mov al, byte [esp + esi + 0x1c]
push eax
push str._02X
push ecx
call fcn.0041532b
add esp, 0xc
lea edx, [esp + 0xc]
lea ecx, [esp + 0x10]
push edx
call fcn.0041600e
mov eax, dword [esp + 0x14]
inc esi
dec eax
cmp esi, eax
jb 0x4071ef
xor ecx, ecx
lea edx, [esp + 0xc]
mov cl, byte [esp + esi + 0x1c]
push ecx
push str._02X
push edx
call fcn.0041532b
add esp, 0xc
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
call fcn.0041600e
push edi
call fcn.00416148
mov esi, dword [esp + 0x38]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.00415a91
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x2c], bl
call fcn.00415d1c
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
call fcn.00415d1c
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
mov esi, dword [esp + 0x30]
push 0x4281ec
mov ecx, esi
call fcn.00415d8a
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0xc]
mov byte [esp + 0x28], bl
call fcn.00415d1c
lea ecx, [esp + 8]
mov byte [esp + 0x28], 0
call fcn.00415d1c
mov ecx, dword [esp + 0x20]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret
Function at 0x4072e0
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x41cd23
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push 0
push 2
mov dword [esp + 0x140], 0
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
lea eax, [esp + 8]
push eax
push ebx
mov dword [esp + 0x10], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x4073c5
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ecx, dword [0x424aa0]
mov dword [esp + 0x10], ecx
lea edx, [esp + 0x38]
lea ecx, [esp + 0x10]
push edx
mov byte [esp + 0x148], 1
call fcn.00415e59
lea ecx, [esp + 0x10]
call fcn.004160bd
lea ecx, [esp + 0x14c]
call fcn.004160bd
mov eax, dword [esp + 0x14c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.004094be
add esp, 8
test eax, eax
jne 0x40739c
mov edx, dword [esp + 0x1c]
push edx
push eax
push 0x1f0fff
call edi
push 0
push eax
call ebp
lea eax, [esp + 0x14]
push eax
push ebx
call sub.KERNEL32.dll_Process32Next
lea ecx, [esp + 0x10]
mov esi, eax
mov byte [esp + 0x144], 0
call fcn.00415d1c
test esi, esi
jne 0x40733c
pop edi
pop esi
pop ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x140]
mov dword [esp + 0x138], 0xffffffff
call fcn.00415d1c
mov ecx, dword [esp + 0x130]
pop ebx
mov dword fs:[0], ecx
add esp, 0x138
ret

Function at 0x407400
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x14
lea eax, [esp]
push esi
push eax
push 0x20
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40746c
lea ecx, [esp + 0xc]
mov dword [esp + 8], 1
push ecx
push str.SeDebugPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp + 4]
push esi
push esi
lea edx, [esp + 0x10]
push 0x10
push edx
push esi
push eax
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 4]
mov esi, eax
neg esi
sbb esi, esi
push ecx
inc esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x14
ret
Function at 0x407900
Capabilities:
Query service status

Disassembly:
sub esp, 0x1c
push ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x4079ac
mov eax, dword [esp + 0x24]
push ebp
push esi
push edi
push 0x34
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x40799a
lea ecx, [esp + 0x10]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x407987
mov eax, dword [esp + 0x14]
mov esi, 3
cmp eax, 1
jne 0x40796d
push edi
mov esi, 2
call ebp
push ebx
call ebp
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
cmp eax, 4
jne 0x40798a
push edi
mov esi, 1
call ebp
push ebx
call ebp
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
or esi, 0xffffffff
push edi
call ebp
push ebx
call ebp
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push ebx
mov esi, 0xfffffffe
call ebp
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov eax, 0xfffffffd
pop ebx
add esp, 0x1c
ret

Function at 0x4079c0
Capabilities:
Start service

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00407900
add esp, 4
cmp eax, 1
je 0x407a12
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x407a12
push ebx
push 0x34
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x407a0e
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
call ebx
push edi
call ebx
pop ebx
pop edi
pop esi
ret

Function at 0x407a20
Capabilities:
Stop service

Disassembly:
sub esp, 0x1c
push esi
push edi
mov edi, dword [esp + 0x28]
push edi
call fcn.00407900
add esp, 4
cmp eax, 2
je 0x407a6f
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x407a6f
push 0x34
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
je 0x407a68
lea ecx, [esp + 8]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
add esp, 0x1c
ret
Function at 0x407a80
Capabilities:
Create service
Persist via windows service

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41cdc0
push eax
mov dword fs:[0], esp
push ebx
push esi
push edi
xor edi, edi
push 0xf003f
push edi
push edi
mov dword [esp + 0x20], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x407af7
mov eax, dword [esp + 0x24]
push edi
mov ecx, dword [esp + 0x24]
push edi
mov edx, dword [esp + 0x24]
push 0x4281ec
push edi
push edi
push eax
push 1
push 2
push 0x110
push 0xf01ff
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x407af4
push eax
mov edi, 1
call ebx
push esi
call ebx
lea ecx, [esp + 0x1c]
call fcn.00415d1c
lea ecx, [esp + 0x20]
mov byte [esp + 0x14], 0
call fcn.00415d1c
lea ecx, [esp + 0x24]
mov dword [esp + 0x14], 0xffffffff
call fcn.00415d1c
mov ecx, dword [esp + 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0xc
ret

Function at 0x407b40
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x20
push ebp
push 0xf003f
push 0
push 0
mov dword [esp + 0x10], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x407be0
mov eax, dword [esp + 0x28]
push esi
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x407bd8
lea ecx, [esp + 0xc]
push edi
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x407bbd
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea edx, [esp + 0x10]
push edx
push esi
call edi
test eax, eax
je 0x407bbd
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x18], 3
jne 0x407bbc
push 0x64
call ebx
lea eax, [esp + 0x14]
push eax
push esi
call edi
test eax, eax
jne 0x407ba5
pop ebx
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
pop edi
je 0x407bd1
mov dword [esp + 8], 1
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
lea ecx, [esp + 0x28]
call fcn.00415d1c
mov eax, dword [esp + 4]
pop ebp
add esp, 0x20
ret

Function at 0x407c00
Capabilities:
Modify service

Disassembly:
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x407c55
mov eax, dword [esp + 8]
push ebx
push esi
push 2
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x407c50
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push esi
call ebx
push edi
call ebx
pop esi
pop ebx
pop edi
ret