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

Disassembly:
push 0xffffffffffffffff
push 0x41cc41
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.00414c50
mov ecx, eax
call fcn.00414c92
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.00409c60
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.004154ea
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.00415dfa
call fcn.004055f0
mov eax, dword [esp + 0x24]
add esp, 8
xor esi, esi
test eax, eax
jle 0x405f44
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.00405350
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.00415b01
call fcn.00405f90
add esp, 8
test eax, eax
je 0x405f33
mov ecx, dword [esp + 0xc]
push ecx
call edi
lea ecx, [esp + 0xc]
mov byte [esp + 0x13c], 1
call fcn.00415d8c
mov eax, dword [esp + 0x1c]
inc esi
cmp esi, eax
jl 0x405ed0
jmp 0x405f44
lea ecx, [esp + 0xc]
mov byte [esp + 0x13c], 1
call fcn.00415d8c
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x1c]
call fcn.0041557d
lea ecx, [esp + 0x14]
mov byte [esp + 0x13c], 0
call fcn.0041551d
lea ecx, [esp + 0x10]
mov dword [esp + 0x13c], 0xffffffff
call fcn.00415d8c
mov ecx, dword [esp + 0x134]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x134
ret
Function at 0x406560
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41ccdb
push eax
mov eax, 0x2d5e4
mov dword fs:[0], esp
call fcn.00409ac0
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.00409c60
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 0x406699
mov ecx, ebp
call fcn.004068f0
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.004161c3
push 0
lea ecx, [esp + 0x20]
push 0x1001
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x2d604], 0
call fcn.004162d5
test eax, eax
je 0x40667e
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.0041642c
lea ecx, [esp + 0xc]
call fcn.004164f0
mov ecx, ebp
call fcn.00406910
lea ecx, [esp + 0xc]
mov dword [esp + 0x2d5f8], 0xffffffff
call fcn.00416218
mov ecx, dword [esp + 0x2d5f0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x2d5f0
ret
Function at 0x406980
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 0x4069c8
push 0
push edi
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0x1004], eax
jne 0x4069c8
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 0x4069fe
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 0x406aae
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 0x406aa5
mov ecx, dword [esi + 0x1004]
lea eax, [esp + 0x28]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x406aae
mov ecx, esi
xor edi, edi
call fcn.00406960
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 0x406b20
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 0x406b7f
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x406b99
call ebp
sub eax, ebx
cmp eax, 0xfa0
ja 0x406b99
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406b95
test eax, eax
je 0x406b99
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 0x406b45
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
Function at 0x406bb0
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 0x406c05
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x406c17
call ebp
sub eax, ebx
cmp eax, 0xfa0
ja 0x406c17
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406c11
test eax, eax
jle 0x406c17
add edi, eax
sub esi, eax
call ebp
mov ebx, eax
test esi, esi
jle 0x406c21
jmp 0x406bcb
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 0x406ee0
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.00409c60
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 0x407130
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 0x407155
push esi
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x407153
mov eax, dword [eax + 0xc]
pop esi
mov ecx, dword [eax]
mov eax, dword [ecx]
ret
xor eax, eax
pop esi
ret

Function at 0x407160
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 0x4071a4
add esp, 0x404
ret
lea edx, [esp + 4]
push edx
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x4071b9
add esp, 0x404
ret
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
add esp, 0x404
ret
Function at 0x4071d0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41cd67
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [0x424ad8]
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 0x407303
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x407303
lea ecx, [eax + eax*2]
push edi
push ecx
call fcn.0041618f
mov edx, dword [esp + 0x18]
add esp, 4
dec edx
mov edi, eax
test edx, edx
jbe 0x407290
xor eax, eax
lea ecx, [esp + 0xc]
mov al, byte [esp + esi + 0x1c]
push eax
push str._02X
push ecx
call fcn.0041539b
add esp, 0xc
lea edx, [esp + 0xc]
lea ecx, [esp + 0x10]
push edx
call fcn.0041607e
mov eax, dword [esp + 0x14]
inc esi
dec eax
cmp esi, eax
jb 0x40725f
xor ecx, ecx
lea edx, [esp + 0xc]
mov cl, byte [esp + esi + 0x1c]
push ecx
push str._02X
push edx
call fcn.0041539b
add esp, 0xc
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
call fcn.0041607e
push edi
call fcn.004161b8
mov esi, dword [esp + 0x38]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.00415b01
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x2c], bl
call fcn.00415d8c
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
call fcn.00415d8c
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 0x42822c
mov ecx, esi
call fcn.00415dfa
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0xc]
mov byte [esp + 0x28], bl
call fcn.00415d8c
lea ecx, [esp + 8]
mov byte [esp + 0x28], 0
call fcn.00415d8c
mov ecx, dword [esp + 0x20]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret
Function at 0x407350
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x41cd93
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 0x407435
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 [0x424ad8]
mov dword [esp + 0x10], ecx
lea edx, [esp + 0x38]
lea ecx, [esp + 0x10]
push edx
mov byte [esp + 0x148], 1
call fcn.00415ec9
lea ecx, [esp + 0x10]
call fcn.0041612d
lea ecx, [esp + 0x14c]
call fcn.0041612d
mov eax, dword [esp + 0x14c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0040952e
add esp, 8
test eax, eax
jne 0x40740c
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.00415d8c
test esi, esi
jne 0x4073ac
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.00415d8c
mov ecx, dword [esp + 0x130]
pop ebx
mov dword fs:[0], ecx
add esp, 0x138
ret

Function at 0x407470
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 0x4074dc
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 0x407970
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 0x407a1c
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 0x407a0a
lea ecx, [esp + 0x10]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4079f7
mov eax, dword [esp + 0x14]
mov esi, 3
cmp eax, 1
jne 0x4079dd
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 0x4079fa
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 0x407a30
Capabilities:
Start service

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00407970
add esp, 4
cmp eax, 1
je 0x407a82
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x407a82
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 0x407a7e
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 0x407a90
Capabilities:
Stop service

Disassembly:
sub esp, 0x1c
push esi
push edi
mov edi, dword [esp + 0x28]
push edi
call fcn.00407970
add esp, 4
cmp eax, 2
je 0x407adf
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x407adf
push 0x34
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
je 0x407ad8
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 0x407af0
Capabilities:
Create service
Persist via windows service

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41ce30
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 0x407b67
mov eax, dword [esp + 0x24]
push edi
mov ecx, dword [esp + 0x24]
push edi
mov edx, dword [esp + 0x24]
push 0x42822c
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 0x407b64
push eax
mov edi, 1
call ebx
push esi
call ebx
lea ecx, [esp + 0x1c]
call fcn.00415d8c
lea ecx, [esp + 0x20]
mov byte [esp + 0x14], 0
call fcn.00415d8c
lea ecx, [esp + 0x24]
mov dword [esp + 0x14], 0xffffffff
call fcn.00415d8c
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 0x407bb0
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 0x407c50
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 0x407c48
lea ecx, [esp + 0xc]
push edi
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x407c2d
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea edx, [esp + 0x10]
push edx
push esi
call edi
test eax, eax
je 0x407c2d
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x18], 3
jne 0x407c2c
push 0x64
call ebx
lea eax, [esp + 0x14]
push eax
push esi
call edi
test eax, eax
jne 0x407c15
pop ebx
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
pop edi
je 0x407c41
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.00415d8c
mov eax, dword [esp + 4]
pop ebp
add esp, 0x20
ret

Function at 0x407c70
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 0x407cc5
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 0x407cc0
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
Function at 0x4080c0
Capabilities:
Delete registry key
Delete registry value
Query or enumerate registry key

Disassembly:
push ecx
mov ecx, dword [esp + 0xc]
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
lea eax, [esp + 0x14]
push edi
push eax
push 0x2001f
push 0
push ecx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4080ed
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x20]
test eax, eax
je 0x408123
mov edx, dword [esp + 0x18]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
mov eax, dword [esp + 0x18]
push eax
call edi
push ebp
call edi
test esi, esi
je 0x40824a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push 0
push 0
mov eax, dword [esp + 0x20]
push 0
push 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
push 0
lea ecx, [esp + 0x24]
push 0
lea edx, [esp + 0x38]
push ecx
push edx
push 0
push 0
push 0
push eax
mov dword [esp + 0x50], 0
call ebx
test eax, eax
jne 0x4081dd
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov eax, dword [esp + 0x20]
test eax, eax
jbe 0x408227
mov ecx, dword [esp + 0x10]
inc ecx
push ecx
call fcn.0041618f
mov edx, dword [esp + 0x14]
add esp, 4
inc edx
mov esi, eax
mov eax, dword [esp + 0x18]
push edx
push esi
push 0
push eax
call edi
test eax, eax
jne 0x4081f0
mov ecx, dword [esp + 0x18]
push eax
push esi
push ecx
call fcn.004080c0
add esp, 0xc
test eax, eax
push esi
je 0x40820c
call fcn.004161b8
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
jbe 0x408227
push 0
push 0
mov ecx, dword [esp + 0x20]
push 0
push 0
push 0
lea edx, [esp + 0x24]
push 0
lea eax, [esp + 0x38]
push edx
push eax
push 0
push 0
push 0
push ecx
call ebx
test eax, eax
je 0x408162
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push esi
call fcn.004161b8
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
call fcn.004161b8
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x40824a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret