joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bf90
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.00402f80
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x40c05b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x40c05b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x40c00e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x40c019
or bh, 8
and edi, 0x8000000
je 0x40c034
mov eax, dword [0x42413c]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x40c05b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c430
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40c45b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x40c47f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x40c49a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x40e07e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x4175d8
call fcn.004024b0
push ecx
sub esp, 0x14
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x14], eax
call fcn.004165d8
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x40e0cc
call fcn.004165d8
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40e0da
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40e0e8
or eax, 0xffffffff
jmp 0x40e1d4
mov ecx, esi
call fcn.0040e009
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.0040ee27
push edi
call fcn.0040e8ca
and dword [ebp - 0x1c], 0
test edi, edi
je 0x40e122
push edi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x40e122
push 0
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x1c], 1
and dword [ebp - 4], 0
push esi
call fcn.0040eddb
push edi
call fcn.0040e8ca
push ebx
push eax
push dword [ebp - 0x14]
mov ecx, esi
call fcn.0040dda0
xor ebx, ebx
cmp eax, ebx
je 0x40e19b
test byte [esi + 0x24], 0x10
je 0x40e166
push 4
mov ecx, esi
pop ebx
call fcn.004111f7
test ah, 1
je 0x40e15c
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00410e58
xor ebx, ebx
cmp dword [esi + 0x1c], ebx
je 0x40e19b
push 0x97
push ebx
push ebx
push ebx
push ebx
push ebx
mov ecx, esi
call fcn.00411286
jmp 0x40e19b
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], ebx
je 0x40e1ad
push 1
push edi
call dword [sym.imp.USER32.dll_EnableWindow]
cmp edi, ebx
je 0x40e1c3
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x40e1c3
push edi
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov ecx, esi
call fcn.0040e040
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x410d4e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x410d90
call fcn.004165d8
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x410d90
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x410d87
xor eax, eax
jmp 0x410d98
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00410d9e
pop edi
pop esi
pop ebx
ret 4

Function at 0x412bcd
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push edi
xor edi, edi
cmp dword [ebp + 8], edi
jne 0x412bea
cmp dword [0x422a94], edi
jne 0x412d3c
cmp word [0x422aa0], di
mov dword [0x422a94], 1
jne 0x412c1c
push str.MSH_SCROLL_LINES_MSG
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
xor ecx, ecx
cmp eax, edi
setne cl
inc ecx
mov dword [0x422a9c], eax
mov word [0x422aa0], cx
cmp word [0x422aa0], 2
jne 0x412c58
push str.Magellan_MSWHEEL
push str.MouseZ
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, edi
je 0x412c58
mov ecx, dword [0x422a9c]
cmp ecx, edi
je 0x412c58
push edi
push edi
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [0x422a98], eax
jmp 0x412d41
push 0x94
lea eax, [ebp - 0x9c]
push edi
push eax
call fcn.00402700
add esp, 0xc
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x94
mov dword [0x422a98], 3
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x412d3c
cmp dword [ebp - 0x8c], 1
je 0x412cac
cmp dword [ebp - 0x8c], 2
jne 0x412d3c
cmp dword [ebp - 0x98], 4
jae 0x412d1b
lea eax, [ebp + 8]
push eax
push 1
push edi
push str.Control_PanelDesktop
push 0x80000001
call dword [0x425528]
test eax, eax
jne 0x412d3c
lea eax, [ebp - 4]
mov dword [ebp - 4], pe_nt_image_headers32
push eax
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 8]
push eax
push edi
push str.WheelScrollLines
push dword [ebp + 8]
call dword [0x425534]
test eax, eax
jne 0x412d10
push 0xa
lea eax, [ebp - 0x11c]
push edi
push eax
call fcn.004038b0
add esp, 0xc
mov dword [0x422a98], eax
push dword [ebp + 8]
call dword [0x42552c]
jmp 0x412d3c
cmp dword [ebp - 0x8c], 2
jne 0x412d3c
cmp dword [ebp - 0x98], 4
jb 0x412d3c
push edi
push 0x422a98
push edi
push 0x68
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
mov eax, dword [0x422a98]
pop edi
leave
ret
Function at 0x413a29
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x7c], 0
je 0x413a6d
push dword [ebp + 8]
call fcn.00416d1d
mov esi, eax
test esi, esi
je 0x413a98
lea eax, [ebp + 0x10]
push 4
push eax
push 4
push 0
push dword [ebp + 0xc]
push esi
call dword [0x425540]
push esi
mov edi, eax
call dword [0x42552c]
xor eax, eax
test edi, edi
sete al
jmp 0x413a98
push dword [ebp + 0x10]
lea eax, [ebp - 0x10]
push 0x41911c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10]
push dword [esi + 0x90]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
pop edi
pop esi
leave
ret 0xc

Function at 0x4163ed
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x417702
call fcn.004024b0
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi], vtable.CNoTrackObject.0
xor eax, eax
push 0xa
lea ecx, [esi + 0x30]
mov dword [ebp - 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
call fcn.0040c966
push 0xa
lea ecx, [esi + 0x4c]
mov byte [ebp - 4], 1
call fcn.0040c966
push 0xa
lea ecx, [esi + 0x68]
mov byte [ebp - 4], 2
call fcn.0040c7e3
mov ecx, dword [ebp - 0xc]
mov dword [esi], vtable.AFX_MODULE_THREAD_STATE.0
mov dword [esi + 0xc], 0x54
mov dword [esi + 0x28], 0x40db85
mov eax, esi
mov dword fs:[0], ecx
pop esi
leave
ret

Function at 0x416979
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x4169a9
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 8]
jl 0x416a33
cmp dword [esp + 0x14], ebx
je 0x416a33
cmp esi, ebx
jne 0x4169cf
push 0x10
call fcn.00416796
cmp eax, ebx
je 0x4169be
mov dword [eax], vtable.CThreadData.0
mov esi, eax
jmp 0x4169c0
xor esi, esi
push esi
lea ecx, [edi + 0x14]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
call fcn.00416738
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x4169e6
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x4169f6
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
mov dword [esi + 0xc], eax
jne 0x416a02
call fcn.0040c7c8
mov eax, dword [esi + 8]
mov ecx, eax
imul ecx, ecx, 0x3fffffff
add ecx, dword [edi + 0xc]
shl ecx, 2
push ecx
mov ecx, dword [esi + 0xc]
push ebx
lea eax, [ecx + eax*4]
push eax
call fcn.00402700
mov eax, dword [edi + 0xc]
add esp, 0xc
mov dword [esi + 8], eax
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
pop edi
pop esi
mov dword [eax + edx*4], ecx
pop ebx
ret 8
Function at 0x416a69
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 1
mov ebx, ecx
pop edi
cmp dword [esi + 8], edi
mov dword [ebp - 4], edi
jle 0x416abc
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x416a9f
mov ecx, dword [ebx + 0x10]
cmp dword [ecx + edi*8 + 4], eax
je 0x416a9f
mov eax, dword [esi + 0xc]
cmp dword [eax + edi*4], 0
je 0x416ab6
and dword [ebp - 4], 0
jmp 0x416ab6
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + edi*4]
test ecx, ecx
je 0x416aaf
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [esi + 0xc]
and dword [eax + edi*4], 0
inc edi
cmp edi, dword [esi + 8]
jl 0x416a80
cmp dword [ebp - 4], 0
je 0x416aea
push esi
lea ecx, [ebx + 0x14]
call fcn.0041674b
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x416ae0
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4069d5
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x14], 0xfeff
push 4
lea eax, [ebp - 0x10]
mov byte [ebp - 0x10], bl
push 1
push eax
mov word [ebp - 0xf], bx
mov esi, ebx
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x18], 0xfffe0000
mov word [ebp - 4], 0xfeff
mov word [ebp - 8], 0xfffe
mov word [ebp - 0xc], 0xbbef
mov byte [ebp - 0xa], 0xbf
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov edi, eax
push 3
pop eax
cmp edi, 4
jne 0x406adf
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x406a4e
push 0xfffffffffffffffd
jmp 0x406adc
push 4
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
test eax, eax
je 0x406a47
push 3
pop eax
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
test eax, eax
push 3
pop eax
cmove esi, eax
cmp edi, 2
jb 0x406ab1
push 2
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
test eax, eax
je 0x406a47
push 2
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
test eax, eax
je 0x406a47
push ebx
push esi
push dword [ebp + 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov esi, eax
add esp, 0xc
test esi, esi
js 0x406af5
push dword [ebp + 0xc]
push 0x4067d0
call fcn.00406660
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x406ae5
push 0xfffffffffffffff4
pop esi
jmp 0x406af5
cmp edi, eax
jb 0x406a80
jmp 0x406a67
push ebx
push 0x406036
push dword [ebp + 8]
call fcn.0040624b
mov esi, eax
push ebx
call fcn.00406640
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407c20
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45cf30
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
xor ebx, ebx
push eax
push ebx
push ebx
push 2
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
jne 0x407d35
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xea
jne 0x407d5e
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], ebx
test esi, esi
je 0x407d48
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 2
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x407d16
xor edi, edi
nop dword [eax]
cmp edi, dword [ebp - 0x18]
jae 0x407d27
lea eax, [edi + edi*8]
mov byte [ebp - 4], 1
movups xmm0, xmmword [esi + eax*4]
lea ecx, [ebp - 0x2c]
movups xmmword [ebp - 0x50], xmm0
movups xmm0, xmmword [esi + eax*4 + 0x10]
push dword [ebp - 0x50]
movups xmmword [ebp - 0x40], xmm0
call fcn.0040d5a0
push dword [ebp + 0xc]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push 0
push 0
push eax
call fcn.00409240
add esp, 0x10
lea ecx, [ebp - 0x2c]
call fcn.0040d860
mov dword [ebp - 4], 0
inc edi
jmp 0x407cb0
call edi
mov ebx, eax
test ebx, ebx
jle 0x407d27
movzx ebx, bx
or ebx, 0x80070000
test esi, esi
je 0x407d35
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x8007000e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edi
test eax, eax
jle 0x407d37
mov ecx, dword [ebp - 0xc]
pop edi
movzx eax, ax
pop esi
or eax, 0x80070000
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407d80
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45cf50
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
xor ebx, ebx
push eax
push ebx
push ebx
push 1
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
jne 0x407e94
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xea
jne 0x407ebd
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], ebx
test esi, esi
je 0x407ea7
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 1
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x407e75
xor edi, edi
nop dword [eax]
cmp edi, dword [ebp - 0x18]
jae 0x407e86
lea eax, [edi + edi*8]
mov byte [ebp - 4], 1
movups xmm0, xmmword [esi + eax*4]
lea ecx, [ebp - 0x2c]
movups xmmword [ebp - 0x50], xmm0
movups xmm0, xmmword [esi + eax*4 + 0x10]
push dword [ebp - 0x50]
movups xmmword [ebp - 0x40], xmm0
call fcn.0040d5a0
push dword [ebp + 0x10]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push dword [ebp + 0xc]
push eax
call fcn.004094b0
add esp, 0xc
lea ecx, [ebp - 0x2c]
call fcn.0040d860
mov dword [ebp - 4], 0
inc edi
jmp 0x407e10
call edi
mov ebx, eax
test ebx, ebx
jle 0x407e86
movzx ebx, bx
or ebx, 0x80070000
test esi, esi
je 0x407e94
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x8007000e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edi
test eax, eax
jle 0x407e96
mov ecx, dword [ebp - 0xc]
pop edi
movzx eax, ax
pop esi
or eax, 0x80070000
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x407ee0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
cmp byte [ebp + 8], 0
je 0x407f16
push esi
push dword [ebp + 0xc]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
or eax, 0xffffffff
test esi, esi
cmove esi, eax
cmp esi, eax
je 0x407f15
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
ret
Function at 0x409b30
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45d2f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x234
push ebx
push esi
push edi
mov ebx, ecx
push 0
push 0
lea esi, [ebx + 0x28]
push esi
call fcn.004094b0
add esp, 0xc
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x30], edi
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
call fcn.0040d0e0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov byte [ebp - 4], 1
test edi, edi
je 0x409c40
push 0x10004
lea ecx, [ebp - 0x40]
call fcn.0040e0a0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
mov dword [ebp - 0x34], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x409c16
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x409c16
lea ecx, [ebx + 0x40]
call fcn.0040e0a0
push eax
push str.Successfully_removed
lea eax, [ebp - 0x240]
push str._s__s
push eax
call fcn.00409a90
add esp, 0x10
lea eax, [ebp - 0x240]
lea ecx, [ebp - 0x1c]
push eax
call fcn.0040d5a0
push 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 3
push eax
mov ecx, ebx
call fcn.004086e0
lea ecx, [ebp - 0x1c]
call fcn.0040d860
jmp 0x409c1d
mov dword [ebp - 0x10], 1
mov byte [ebp - 4], 1
test esi, esi
je 0x409c30
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x409c36
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x10], 0
je 0x409cdb
lea ecx, [ebx + 0x40]
call fcn.0040e0a0
push eax
push str.Could_not_remove
lea eax, [ebp - 0x240]
push str._s__s
push eax
call fcn.00409a90
add esp, 0x10
lea eax, [ebp - 0x240]
lea ecx, [ebp - 0x1c]
push eax
call fcn.0040d5a0
cmp byte [ebx + 0x70], 0
mov byte [ebp - 4], 4
jne 0x409cd3
cmp dword [ebx + 0xc], 0
je 0x409cad
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040d0e0
push 0
mov ecx, eax
mov byte [ebp - 4], 5
call fcn.0040e0a0
push eax
call fcn.00407ae0
add esp, 8
lea ecx, [ebp - 0x28]
call fcn.0040d860
jmp 0x409cd3
lea eax, [ebx + 0x40]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040abb0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 6
push eax
push 2
lea ecx, [ebp - 0x2c]
call fcn.0040adc0
lea ecx, [ebp - 0x2c]
call fcn.0040ac50
lea ecx, [ebp - 0x1c]
call fcn.0040d860
lea ecx, [ebp - 0x40]
call fcn.0040d860
test edi, edi
je 0x409cea
push edi
call esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x40abb0
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45d3ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push edi
push dword [ebp + 8]
mov edi, ecx
mov dword [ebp - 0x10], edi
lea ecx, [edi + 4]
call fcn.0040d3d0
push dword [ebp + 8]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
call fcn.0040d0e0
mov ecx, eax
call fcn.0040e0a0
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_OpenEventLogA]
lea ecx, [ebp - 0x1c]
mov dword [edi], eax
call fcn.0040d860
cmp dword [edi], 0
jne 0x40ac38
push 0x2b
push str.nidscosdepEventLogger.cpp
sub esp, 0x24
mov ecx, esp
call fcn.0040a8f0
lea eax, [ebp - 0x40]
push eax
call fcn.004074a0
add esp, 0x30
lea eax, [ebp - 0x40]
push 0x4739cc
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov ecx, dword [ebp - 0xc]
mov eax, edi
mov dword fs:[0], ecx
pop edi
mov esp, ebp
pop ebp
ret 4

Function at 0x40adc0
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45d3f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 0
push eax
mov byte [ebp - 4], 1
call fcn.0040ac90
mov esi, dword [ebp - 0x14]
add esp, 4
mov ebx, esi
jmp 0x40ae21
push dword [ebp + 0xc]
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0
call fcn.0040d0e0
push eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 3
push 0x4632a0
push eax
call fcn.0040ab50
add esp, 0xc
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 5
call fcn.0040d860
lea ecx, [ebp - 0x2c]
call fcn.0040e0a0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
sub eax, 0
je 0x40ae7e
sub eax, 1
je 0x40ae77
sub eax, 1
mov eax, 1
jmp 0x40ae83
mov eax, 2
jmp 0x40ae83
mov eax, 4
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0
push 1
push dword [ebx]
push 0
push 0
push eax
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
test eax, eax
jne 0x40aece
push 0xa7
push str.nidscosdepEventLogger.cpp
sub esp, 0x24
mov ecx, esp
call fcn.0040a8f0
lea eax, [ebp - 0x5c]
push eax
call fcn.004074a0
add esp, 0x30
lea eax, [ebp - 0x5c]
push 0x4739cc
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
lea ecx, [ebp - 0x2c]
call fcn.0040d860
push esi
call fcn.0041fe99
mov ecx, dword [ebp - 0xc]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8