joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4016c8
Capabilities:
Acquire debug privileges
Check os version
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff3c
push dword [ebp + 8]
push 0
push 1
call sub.KERNEL32.DLL_OpenProcess
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x401843
call sub.KERNEL32.DLL_GetLastError
cmp eax, 5
je 0x4016fb
xor eax, eax
jmp 0x40187a
mov dword [ebp - 0xa4], 0x94
lea edx, [ebp - 0xa4]
push edx
call sub.KERNEL32.DLL_GetVersionExA
cmp dword [ebp - 0x94], 2
je 0x401728
push 5
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x40187a
mov dword [ebp - 0xc], 0x10
lea edx, [ebp - 0x10]
push edx
push 0
push 0x28
call sub.KERNEL32.DLL_GetCurrentThread
push eax
call sub.ADVAPI32.DLL_OpenThreadToken
test eax, eax
jne 0x401775
call sub.KERNEL32.DLL_GetLastError
cmp eax, 0x3f0
je 0x401759
xor eax, eax
jmp 0x40187a
lea edx, [ebp - 0x10]
push edx
push 0x28
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call sub.ADVAPI32.DLL_OpenProcessToken
test eax, eax
jne 0x401775
xor eax, eax
jmp 0x40187a
mov dword [ebp - 0xb4], 1
mov dword [ebp - 0xa8], 2
lea edx, [ebp - 0xb0]
push edx
push str.SeDebugPrivilege
push 0
call sub.ADVAPI32.DLL_LookupPrivilegeValueA
lea ecx, [ebp - 0xc]
push ecx
lea eax, [ebp - 0xc4]
push eax
push 0x10
lea edx, [ebp - 0xb4]
push edx
push 0
push dword [ebp - 0x10]
call sub.ADVAPI32.DLL_AdjustTokenPrivileges
test eax, eax
jne 0x4017dd
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 8], eax
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 8]
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x40187a
call sub.KERNEL32.DLL_GetLastError
cmp eax, 0x514
jne 0x4017fc
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_CloseHandle
push 5
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x40187a
push dword [ebp + 8]
push 0
push 1
call sub.KERNEL32.DLL_OpenProcess
mov dword [ebp - 4], eax
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 8], eax
push 0
push 0
push 0x10
lea edx, [ebp - 0xc4]
push edx
push 0
push dword [ebp - 0x10]
call sub.ADVAPI32.DLL_AdjustTokenPrivileges
push dword [ebp - 0x10]
call sub.KERNEL32.DLL_CloseHandle
cmp dword [ebp - 4], 0
jne 0x401843
push 0
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x40187a
push 0xffffffffffffffff
push dword [ebp - 4]
call sub.KERNEL32.DLL_TerminateProcess
test eax, eax
jne 0x40186d
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 8], eax
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 8]
call sub.KERNEL32.DLL_SetLastError
xor eax, eax
jmp 0x40187a
push dword [ebp - 4]
call sub.KERNEL32.DLL_CloseHandle
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x401880
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe9c
push ebx
push esi
push edi
mov eax, 0x5c051c
call fcn.00496b84
mov word [ebp - 0x24], 8
push 0
push 2
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov dword [ebp - 0x38], eax
mov word [ebp - 0x24], 0
jmp 0x4018bb
cmp dword [ebp - 0x38], 0xffffffff
jne 0x4018d2
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x401aab
mov word [ebp - 0x24], 0x14
mov dword [ebp - 0x164], 0x128
mov word [ebp - 0x24], 0
jmp 0x4018f5
mov word [ebp - 0x24], 0x20
lea ecx, [ebp - 0x164]
push ecx
push dword [ebp - 0x38]
call sub.KERNEL32.DLL_Process32First
mov dword [ebp - 0x3c], eax
mov word [ebp - 0x24], 0
jmp 0x401920
cmp dword [ebp - 0x3c], 0
je 0x401a7e
mov word [ebp - 0x24], 0x2c
mov word [ebp - 0x24], 0x38
lea eax, [ebp - 8]
call fcn.00401ab4
push eax
inc dword [ebp - 0x18]
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
call fcn.004a448c
inc dword [ebp - 0x18]
mov eax, dword [eax]
pop edx
call fcn.0048b798
lea eax, [ebp - 8]
call fcn.00401ae4
push eax
call sub.USER32.DLL_CharLowerA
push eax
lea eax, [ebp - 0x10]
call fcn.00401ab4
push eax
inc dword [ebp - 0x18]
lea edx, [ebp - 0x140]
lea eax, [ebp - 0xc]
call fcn.004a448c
inc dword [ebp - 0x18]
mov eax, dword [eax]
pop edx
call fcn.0048b798
lea eax, [ebp - 0x10]
call fcn.00401ae4
push eax
call sub.USER32.DLL_CharLowerA
push eax
call sub.KERNEL32.DLL_lstrcmpA
test eax, eax
sete dl
and edx, 1
push edx
dec dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x18]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x18]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x18]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004a4630
pop ecx
test cl, cl
je 0x401a13
mov word [ebp - 0x24], 0x44
push dword [ebp - 0x15c]
call fcn.004016c8
pop ecx
mov word [ebp - 0x24], 0x2c
jmp 0x401a13
mov word [ebp - 0x24], 0
jmp 0x401a26
mov word [ebp - 0x24], 0x50
mov dword [ebp - 0x164], 0x128
mov word [ebp - 0x24], 0
jmp 0x401a49
mov word [ebp - 0x24], 0x5c
lea eax, [ebp - 0x164]
push eax
push dword [ebp - 0x38]
call sub.KERNEL32.DLL_Process32Next
mov dword [ebp - 0x3c], eax
mov word [ebp - 0x24], 0
jmp 0x401a74
cmp dword [ebp - 0x3c], 0
jne 0x40192a
mov word [ebp - 0x24], 0x68
push dword [ebp - 0x38]
call sub.KERNEL32.DLL_CloseHandle
mov word [ebp - 0x24], 0
jmp 0x401a9f
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401b04
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe98
push ebx
push esi
push edi
mov eax, 0x5c06e4
call fcn.00496b84
mov word [ebp - 0x24], 8
push 0
push 2
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov dword [ebp - 0x38], eax
mov word [ebp - 0x24], 0
jmp 0x401b3f
cmp dword [ebp - 0x38], 0xffffffff
jne 0x401b56
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x401d61
mov word [ebp - 0x24], 0x14
mov dword [ebp - 0x168], 0x128
mov word [ebp - 0x24], 0
jmp 0x401b79
mov word [ebp - 0x24], 0x20
lea ecx, [ebp - 0x168]
push ecx
push dword [ebp - 0x38]
call sub.KERNEL32.DLL_Process32First
mov dword [ebp - 0x40], eax
mov word [ebp - 0x24], 0
jmp 0x401ba4
cmp dword [ebp - 0x40], 0
je 0x401d34
mov word [ebp - 0x24], 0x2c
mov word [ebp - 0x24], 0x38
lea eax, [ebp - 8]
call fcn.00401ab4
push eax
inc dword [ebp - 0x18]
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
call fcn.004a448c
inc dword [ebp - 0x18]
mov eax, dword [eax]
pop edx
call fcn.0048b798
lea eax, [ebp - 8]
call fcn.00401ae4
push eax
call sub.USER32.DLL_CharLowerA
push eax
lea eax, [ebp - 0x10]
call fcn.00401ab4
push eax
inc dword [ebp - 0x18]
lea edx, [ebp - 0x144]
lea eax, [ebp - 0xc]
call fcn.004a448c
inc dword [ebp - 0x18]
mov eax, dword [eax]
pop edx
call fcn.0048b798
lea eax, [ebp - 0x10]
call fcn.00401ae4
push eax
call sub.USER32.DLL_CharLowerA
push eax
call sub.KERNEL32.DLL_lstrcmpA
test eax, eax
sete dl
and edx, 1
push edx
dec dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x18]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x18]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004a4630
dec dword [ebp - 0x18]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004a4630
pop ecx
test cl, cl
je 0x401cc9
mov word [ebp - 0x24], 0x44
push dword [ebp - 0x160]
push 0
push 0x1f0fff
call sub.KERNEL32.DLL_OpenProcess
mov dword [ebp - 0x3c], eax
mov word [ebp - 0x24], 0x2c
jmp 0x401ca0
cmp dword [ebp - 0x3c], 0
je 0x401cc9
mov word [ebp - 0x24], 0x50
push 0
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_TerminateProcess
mov word [ebp - 0x24], 0x2c
jmp 0x401cc9
mov word [ebp - 0x24], 0
jmp 0x401cdc
mov word [ebp - 0x24], 0x5c
mov dword [ebp - 0x168], 0x128
mov word [ebp - 0x24], 0
jmp 0x401cff
mov word [ebp - 0x24], 0x68
lea eax, [ebp - 0x168]
push eax
push dword [ebp - 0x38]
call sub.KERNEL32.DLL_Process32Next
mov dword [ebp - 0x40], eax
mov word [ebp - 0x24], 0
jmp 0x401d2a
cmp dword [ebp - 0x40], 0
jne 0x401bae
mov word [ebp - 0x24], 0x74
push dword [ebp - 0x38]
call sub.KERNEL32.DLL_CloseHandle
mov word [ebp - 0x24], 0
jmp 0x401d55
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401dc4
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe34
push ebx
push esi
push edi
mov eax, 0x5c0794
call fcn.00496b84
mov dword [ebp - 8], 1
lea edx, [ebp + 8]
lea eax, [ebp + 8]
call fcn.004a44c4
inc dword [ebp - 8]
mov word [ebp - 0x14], 8
mov word [ebp - 0x14], 0x14
lea edx, [ebp - 0x1bc]
push edx
push 0x101
call sub.WSOCK32.DLL_WSAStartup
test eax, eax
je 0x401e33
xor eax, eax
push eax
dec dword [ebp - 8]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004a4630
pop eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x401f5f
lea eax, [ebp + 8]
call fcn.00401ae4
push eax
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x401e6d
xor eax, eax
push eax
dec dword [ebp - 8]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004a4630
pop eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x401f5f
push 0
push 1
push 2
call sub.WSOCK32.DLL_socket
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x401ea4
xor eax, eax
push eax
dec dword [ebp - 8]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004a4630
pop eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x401f5f
mov word [ebp - 0x1cc], 2
push 0x35
call sub.WSOCK32.DLL_htons
mov word [ebp - 0x1ca], ax
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0xc]
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [ebp - 0x1c8], ecx
push 0x10
lea eax, [ebp - 0x1cc]
push eax
push dword [ebp - 0x2c]
call sub.WSOCK32.DLL_connect
test eax, eax
je 0x401f00
xor eax, eax
push eax
dec dword [ebp - 8]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004a4630
pop eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x401f5f
push dword [ebp - 0x2c]
call sub.WSOCK32.DLL_closesocket
call sub.WSOCK32.DLL_WSACleanup
mov al, 1
push eax
dec dword [ebp - 8]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004a4630
pop eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x401f5f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402534
Capabilities:
Create udp socket
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe6c
lea eax, [ebp - 0x194]
push eax
push 0x202
call sub.WSOCK32.DLL_WSAStartup
cmp dword [ebp + 8], 0
jne 0x40255e
mov eax, 7
jmp 0x402618
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x1c], ecx
push 0x11
push 2
push 2
call sub.WSOCK32.DLL_socket
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], eax
test eax, eax
jge 0x40258f
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x18], 3
mov eax, 3
jmp 0x402618
push dword [ebp + 0xc]
call sub.WSOCK32.DLL_inet_addr
test eax, eax
je 0x4025a8
push dword [ebp + 0xc]
call sub.WSOCK32.DLL_inet_addr
cmp eax, 0xffffffff
jne 0x4025e6
push dword [ebp + 0xc]
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 4], eax
test eax, eax
jne 0x4025c8
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], 1
mov eax, 1
jmp 0x402618
mov edx, dword [ebp - 4]
movsx ecx, word [edx + 0xa]
push ecx
mov eax, dword [ebp + 8]
add eax, 0x24
push eax
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xc]
push dword [ecx]
call sub.KERNEL32.DLL_lstrcpynA
jmp 0x4025f4
push dword [ebp + 0xc]
call sub.WSOCK32.DLL_inet_addr
mov edx, dword [ebp + 8]
mov dword [edx + 0x24], eax
mov eax, dword [ebp + 8]
mov word [eax + 0x20], 2
mov cx, word [ebp + 0x10]
push ecx
call sub.WSOCK32.DLL_htons
mov edx, dword [ebp + 8]
mov word [edx + 0x22], ax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [eax + 0x18], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x40261c
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 8], 0
jne 0x40262e
mov eax, 7
pop ecx
pop ebp
ret
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x1c], ecx
call fcn.0049f254
xor edx, edx
mov dword [eax], edx
push 0x10
mov eax, dword [ebp + 8]
add eax, 0x20
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ecx + 0x14]
call sub.WSOCK32.DLL_sendto
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x1c], eax
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x18], eax
xor eax, eax
pop ecx
pop ebp
ret

Function at 0x402674
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
cmp dword [ebp + 8], 0
jne 0x402687
mov eax, 7
jmp 0x4026da
mov dword [ebp - 8], 0x10
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [edx + 0x1c], ecx
push 0x30
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.004965fc
add esp, 0xc
lea eax, [ebp - 8]
push eax
mov edx, dword [ebp + 0xc]
add edx, 0x20
push edx
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push dword [ecx + 0x14]
call sub.WSOCK32.DLL_recvfrom
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x1c], eax
mov ecx, dword [ebp + 8]
xor eax, eax
mov dword [ecx + 0x18], eax
xor eax, eax
pop ecx
pop ecx
pop ebp
ret
Function at 0x408428
Capabilities:
Enumerate services
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdbc
xor eax, eax
mov dword [ebp - 0x18], eax
push 0xf003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 4], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
push dword [ebp - 0x10]
call fcn.0049618c
pop ecx
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
xor edx, edx
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jae 0x40855b
push 0x100
push 0
lea eax, [ebp - 0x144]
push eax
call fcn.0049666c
add esp, 0xc
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*8]
mov ecx, dword [ebp - 0xc]
push dword [ecx + edx*4]
lea eax, [ebp - 0x244]
push eax
call fcn.004967ec
add esp, 8
xor edx, edx
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp - 0x24]
movsx eax, byte [ebp + ecx - 0x244]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
call fcn.0049cac8
pop ecx
mov edx, dword [ebp - 0x24]
mov byte [ebp + edx - 0x144], al
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], 0x100
jb 0x4084d4
lea ecx, [ebp - 0x144]
push ecx
push dword [ebp + 8]
call sub.USER32.DLL_CharLowerA
push eax
call fcn.004967a0
add esp, 8
test eax, eax
jne 0x40854c
push 0x20
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0xc]
push dword [edx + eax*4]
push dword [ebp - 4]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x44]
push ecx
push 1
push dword [ebp - 8]
call sub.ADVAPI32.DLL_ControlService
push dword [ebp - 8]
call sub.ADVAPI32.DLL_CloseServiceHandle
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x14]
jb 0x40849e
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x40856c
Capabilities:
Enumerate services
Start service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdbc
push 2
push dword [ebp + 8]
call fcn.004086b8
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], eax
push 0xf003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 4], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
push dword [ebp - 0x10]
call fcn.0049618c
pop ecx
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
xor edx, edx
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jae 0x4086aa
push 0x100
push 0
lea eax, [ebp - 0x144]
push eax
call fcn.0049666c
add esp, 0xc
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*8]
mov ecx, dword [ebp - 0xc]
push dword [ecx + edx*4]
lea eax, [ebp - 0x244]
push eax
call fcn.004967ec
add esp, 8
xor edx, edx
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp - 0x24]
movsx eax, byte [ebp + ecx - 0x244]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
call fcn.0049cac8
pop ecx
mov edx, dword [ebp - 0x24]
mov byte [ebp + edx - 0x144], al
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], 0x100
jb 0x408625
lea ecx, [ebp - 0x144]
push ecx
push dword [ebp + 8]
call sub.USER32.DLL_CharLowerA
push eax
call fcn.004967a0
add esp, 8
test eax, eax
jne 0x40869b
push 0x10
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0xc]
push dword [edx + eax*4]
push dword [ebp - 4]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 8], eax
push 0
push 0
push dword [ebp - 8]
call sub.ADVAPI32.DLL_StartServiceA
push dword [ebp - 8]
call sub.ADVAPI32.DLL_CloseServiceHandle
inc dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jb 0x4085ef
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4086b8
Capabilities:
Enumerate services
Modify service
Query service configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdb4
xor eax, eax
mov dword [ebp - 0x18], eax
push 0x400f003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 4], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
push dword [ebp - 0x10]
call fcn.0049618c
pop ecx
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
xor edx, edx
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jae 0x408868
push 0x100
push 0
lea eax, [ebp - 0x14c]
push eax
call fcn.0049666c
add esp, 0xc
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*8]
mov ecx, dword [ebp - 0xc]
push dword [ecx + edx*4]
lea eax, [ebp - 0x24c]
push eax
call fcn.004967ec
add esp, 8
xor edx, edx
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp - 0x24]
movsx eax, byte [ebp + ecx - 0x24c]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
call fcn.0049cac8
pop ecx
mov edx, dword [ebp - 0x24]
mov byte [ebp + edx - 0x14c], al
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], 0x100
jb 0x408764
lea ecx, [ebp - 0x14c]
push ecx
push dword [ebp + 8]
call sub.USER32.DLL_CharLowerA
push eax
call fcn.004967a0
add esp, 8
test eax, eax
jne 0x408859
push 1
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0xc]
push dword [edx + eax*4]
push dword [ebp - 4]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0
push dword [ebp - 8]
call sub.ADVAPI32.DLL_QueryServiceConfigA
push dword [ebp - 0x2c]
call fcn.0049618c
pop ecx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [ebp - 8]
call sub.ADVAPI32.DLL_QueryServiceConfigA
push dword [ebp - 8]
call sub.ADVAPI32.DLL_CloseServiceHandle
push 2
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*8]
mov ecx, dword [ebp - 0xc]
push dword [ecx + edx*4]
push dword [ebp - 4]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x30]
push dword [eax + 0x20]
push 0
mov edx, dword [ebp - 0x30]
push dword [edx + 0x1c]
mov ecx, dword [ebp - 0x30]
push dword [ecx + 0x18]
push 0
mov eax, dword [ebp - 0x30]
push dword [eax + 0x10]
mov edx, dword [ebp - 0x30]
push dword [edx + 0xc]
mov ecx, dword [ebp - 0x30]
push dword [ecx + 8]
push dword [ebp + 0xc]
mov eax, dword [ebp - 0x30]
push dword [eax]
push dword [ebp - 8]
call sub.ADVAPI32.DLL_ChangeServiceConfigA
push dword [ebp - 8]
call sub.ADVAPI32.DLL_CloseServiceHandle
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x14]
jb 0x40872e
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov esp, ebp
pop ebp
ret
Function at 0x408874
Capabilities:
Delete service
Enumerate services
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdbc
xor eax, eax
mov dword [ebp - 0x18], eax
push 0xf003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 4], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
push dword [ebp - 0x10]
call fcn.0049618c
pop ecx
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 3
push 0x30
push dword [ebp - 4]
call sub.ADVAPI32.DLL_EnumServicesStatusA
xor edx, edx
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jae 0x4089d3
push 0x100
push 0
lea eax, [ebp - 0x144]
push eax
call fcn.0049666c
add esp, 0xc
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*8]
mov ecx, dword [ebp - 0xc]
push dword [ecx + edx*4]
lea eax, [ebp - 0x244]
push eax
call fcn.004967ec
add esp, 8
xor edx, edx
mov dword [ebp - 0x24], edx
mov ecx, dword [ebp - 0x24]
movsx eax, byte [ebp + ecx - 0x244]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
call fcn.0049cac8
pop ecx
mov edx, dword [ebp - 0x24]
mov byte [ebp + edx - 0x144], al
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], 0x100
jb 0x408920
lea ecx, [ebp - 0x144]
push ecx
push dword [ebp + 8]
call sub.USER32.DLL_CharLowerA
push eax
call fcn.004967a0
add esp, 8
test eax, eax
jne 0x4089c4
push 0x20
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0xc]
push dword [edx + eax*4]
push dword [ebp - 4]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x44]
push ecx
push 1
push dword [ebp - 8]
call sub.ADVAPI32.DLL_ControlService
push dword [ebp - 8]
call sub.ADVAPI32.DLL_CloseServiceHandle
push 0x10000
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0xc]
push dword [edx + eax*4]
push dword [ebp - 4]
call sub.ADVAPI32.DLL_OpenServiceA
mov dword [ebp - 8], eax
push dword [ebp - 8]
call sub.ADVAPI32.DLL_DeleteService
push dword [ebp - 8]
call sub.ADVAPI32.DLL_CloseServiceHandle
inc dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jb 0x4088ea
push dword [ebp - 4]
call sub.ADVAPI32.DLL_CloseServiceHandle
mov esp, ebp
pop ebp
ret