joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405747
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0040d5c0
push esi
push 0x2001f
lea eax, [ebp - 4]
push eax
xor esi, esi
call fcn.00405585
test eax, eax
jne 0x405802
push edi
mov edi, 0x7fe
push edi
lea eax, [ebp - 0x802]
push esi
push eax
mov word [ebp - 0x804], si
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x1002]
push esi
push eax
mov word [ebp - 0x1004], si
call sub.msvcrt.dll_memset
lea edi, [ebx + 0x20a]
push edi
push ebx
push str._s_shell_scommand
mov esi, 0x3ff
lea eax, [ebp - 0x804]
push esi
push eax
call sub.msvcrt.dll__snwprintf
push edi
push ebx
push str._s_shell_s
lea eax, [ebp - 0x1004]
push esi
push eax
call sub.msvcrt.dll__snwprintf
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
add esp, 0x40
lea eax, [ebp - 0x804]
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x1004]
push eax
push dword [ebp - 4]
call esi
push dword [ebp - 4]
mov esi, eax
neg esi
sbb esi, esi
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
leave
ret

Function at 0x405932
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call sub.msvcrt.dll_wcslen
pop ecx
add eax, eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
leave
ret

Function at 0x405c51
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret

Function at 0x405dbf
Capabilities:
Get common file path

Disassembly:
cmp word [0x420350], 0
push esi
mov esi, 0x420350
jne 0x405de0
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [0x42055c], eax
push esi
push dword [esp + 0xc]
call sub.msvcrt.dll_wcscpy
mov eax, dword [0x42055c]
pop ecx
pop ecx
pop esi
ret

Function at 0x405df3
Capabilities:
Get common file path

Disassembly:
cmp word [0x420560], 0
push esi
mov esi, 0x420560
jne 0x405e14
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [0x42076c], eax
push esi
push dword [esp + 0xc]
call sub.msvcrt.dll_wcscpy
mov eax, dword [0x42076c]
pop ecx
pop ecx
pop esi
ret

Function at 0x406135
Capabilities:
Create process on windows

Disassembly:
push 5
mov eax, 0x40e548
push eax
push eax
push dword [esp + 0x14]
push str.open
push dword [esp + 0x18]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x20
pop ecx
cmp ecx, eax
sbb eax, eax
neg eax
ret

Function at 0x4070ed
Capabilities:
Read .ini file

Disassembly:
and word [esi], 0
push 0x4131e8
push dword [esp + 0xc]
push esi
push 0x40e548
push dword [esp + 0x14]
push 0x4133f8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, esi
ret
Function at 0x407112
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2004
call fcn.0040d5c0
and word [ebp - 0x2004], 0
push 0x2000
lea eax, [ebp - 0x2002]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4131e8
push 0x1000
lea eax, [ebp - 0x2004]
push eax
push 0x40e548
push dword [ebp + 8]
push 0x4133f8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x2004], 0
je 0x407181
lea eax, [ebp - 0x2004]
push eax
push dword [ebp + 0xc]
call sub.msvcrt.dll_wcscpy
pop ecx
xor eax, eax
pop ecx
inc eax
leave
ret
xor eax, eax
leave
ret

Function at 0x407185
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2004
call fcn.0040d5c0
and word [ebp - 0x2004], 0
push esi
push edi
push 0x2000
lea eax, [ebp - 0x2002]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov edi, 0x4131e8
push edi
push 0x1000
lea eax, [ebp - 0x2004]
push eax
push 0x40e548
push dword [ebp + 8]
mov esi, 0x4133f8
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x2004], 0
je 0x4071ec
cmp dword [ebp + 0x10], 0
jne 0x4071ec
xor eax, eax
jmp 0x4071fa
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
pop edi
pop esi
leave
ret

Function at 0x407571
Capabilities:
Read .ini file

Disassembly:
push dword [esp + 4]
call fcn.00405c51
test eax, eax
pop ecx
je 0x4075f8
push esi
push edi
push dword [esp + 0xc]
mov edi, 0x4131e8
push edi
call sub.msvcrt.dll_wcscpy
push str.general
mov esi, 0x4133f8
push esi
call sub.msvcrt.dll_wcscpy
add esp, 0x10
push edi
push 0
push 0x40f260
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
dec eax
neg eax
sbb eax, eax
inc eax
push 0x3f
push str.charset
mov esi, 0x413480
mov dword [0x41347c], eax
call fcn.004070ed
push 0x3f
push str.TranslatorName
mov esi, 0x413500
call fcn.004070ed
push 0xff
push str.TranslatorURL
mov esi, 0x413580
call fcn.004070ed
add esp, 0x18
pop edi
pop esi
ret

Function at 0x4084af
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2004
call fcn.0040d5c0
push ebx
push esi
mov esi, 0x1fff
xor ebx, ebx
push esi
lea eax, [ebp - 0x2003]
push ebx
push eax
mov byte [ebp - 0x2004], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
push ebx
push esi
lea eax, [ebp - 0x2004]
push eax
push 0xffffffffffffffff
push dword [ebp + 0xc]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2004]
push eax
call sub.msvcrt.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x2004]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop ebx
leave
ret
Function at 0x409164
Capabilities:
Get common file path
Get file system object information

Disassembly:
sub esp, 0x4cc
push ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push ebp
mov ebp, dword [sym.imp.COMCTL32.dll_ImageList_Create]
push esi
push edi
mov esi, eax
xor edi, edi
cmp dword [esi + 0x2b4], edi
je 0x40922a
cmp dword [esi + 0x2bc], edi
je 0x4091fb
push 0x2b0
lea eax, [esp + 0x230]
push edi
push eax
mov dword [esp + 0x234], edi
call sub.msvcrt.dll_memset
push 0x208
lea eax, [esp + 0x2e]
push edi
push eax
mov word [esp + 0x34], di
call sub.msvcrt.dll_memset
add esp, 0x18
push 0x104
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x4001
push 0x2b4
lea eax, [esp + 0x230]
push eax
push edi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
mov dword [esi + 0x2a8], eax
push eax
jmp 0x40921b
push 1
push 1
push 0x19
push 0x10
push 0x10
call ebp
push edi
push eax
mov dword [esi + 0x2a8], eax
call dword [sym.imp.COMCTL32.dll_ImageList_SetImageCount]
push dword [esi + 0x2a8]
push 1
push 0x1003
push dword [esi + 0x2a0]
call ebx
cmp dword [esi + 0x2b8], edi
je 0x409260
push 1
push 1
push 0x19
push 0x20
push 0x20
call ebp
push edi
push eax
mov dword [esi + 0x2ac], eax
call dword [sym.imp.COMCTL32.dll_ImageList_SetImageCount]
push dword [esi + 0x2ac]
push edi
push 0x1003
push dword [esi + 0x2a0]
call ebx
push 1
push 1
push 0x19
push 0x10
push 0x10
call ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push edi
mov dword [esi + 0x2a4], eax
call ebp
push 0x1000
push 0x10
push 0x10
push edi
push 0x85
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
push edi
mov dword [esp + 0x14], eax
call ebp
push 0x1000
push 0x10
push 0x10
push edi
push 0x86
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
push edi
push dword [esi + 0x2a4]
mov dword [esp + 0x1c], eax
call dword [sym.imp.COMCTL32.dll_ImageList_SetImageCount]
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
mov ebp, dword [sym.imp.COMCTL32.dll_ImageList_AddMasked]
push eax
push dword [esp + 0x14]
mov dword [esp + 0x20], eax
push dword [esi + 0x2a4]
call ebp
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esi + 0x2a4]
call ebp
push dword [esp + 0x10]
mov ebp, dword [sym.imp.GDI32.dll_DeleteObject]
call ebp
push dword [esp + 0x14]
call ebp
mov eax, dword [esi + 0x2a4]
mov esi, dword [esi + 0x2a0]
push eax
push edi
push 0x1208
push esi
call fcn.004041cf
pop ecx
push eax
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4cc
ret
Function at 0x40aaec
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x678
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [edi + 0x28]
call fcn.0040af41
xor ebx, ebx
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
push 0x228
mov dword [ebp - 8], eax
lea eax, [ebp - 0x468]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x46c]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x46c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
jmp 0x40ac6f
lea eax, [ebp - 0x240]
call fcn.0040a59e
mov eax, dword [ebp - 0x464]
mov ecx, dword [ebp - 0x454]
mov esi, dword [sym.imp.KERNEL32.dll_OpenProcess]
push eax
push ebx
push 0x410
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x30], ecx
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40ab9f
call fcn.00405d8b
test eax, eax
je 0x40ac60
push dword [ebp - 0x240]
push ebx
push 0x1000
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40ac60
push 0x208
lea eax, [ebp - 0x676]
push ebx
push eax
mov word [ebp - 0x678], bx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x678]
push eax
push dword [ebp - 4]
mov eax, edi
call fcn.0040ade6
cmp word [ebp - 0x678], bx
jne 0x40ac28
cmp dword [0x420770], ebx
mov dword [ebp - 0xc], 0x104
jne 0x40ac0e
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
je 0x40ac0e
push str.QueryFullProcessImageNameW
push eax
mov dword [0x420770], 1
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x420774], eax
mov eax, dword [0x420774]
cmp eax, ebx
je 0x40ac28
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x678]
push ecx
push ebx
push dword [ebp - 4]
call eax
lea esi, [ebp - 0x678]
lea edi, [ebp - 0x23c]
call fcn.0040a6f9
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call fcn.0040aa44
add esp, 0x14
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x240]
push eax
lea eax, [edi + 0x28]
call fcn.0040af5a
lea eax, [ebp - 0x46c]
push eax
push dword [ebp - 8]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40ab43
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x40ae0e
Capabilities:
Link many functions at runtime

Disassembly:
cmp dword [esi], 0
jne 0x40ae64
push edi
push str.psapi.dll
call fcn.004065eb
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp], str.GetModuleBaseNameW
push eax
mov dword [esi], eax
call edi
push str.EnumProcessModules
push dword [esi]
mov dword [esi + 4], eax
call edi
push str.GetModuleFileNameExW
push dword [esi]
mov dword [esi + 8], eax
call edi
push str.EnumProcesses
push dword [esi]
mov dword [esi + 0x10], eax
call edi
push str.GetModuleInformation
push dword [esi]
mov dword [esi + 0x14], eax
call edi
mov dword [esi + 0xc], eax
pop edi
ret
Function at 0x40b2c6
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20000
call fcn.0040d5c0
cmp dword [ebp + 8], 0
je 0x40b32b
test esi, esi
je 0x40b319
push 0x22
push esi
call sub.msvcrt.dll_wcschr
test eax, eax
pop ecx
pop ecx
je 0x40b319
and word [ebp - 0x20000], 0
push esi
push 0x40ff08
lea eax, [ebp - 0x20000]
push 0xfffe
push eax
call sub.msvcrt.dll__snwprintf
add esp, 0x10
push dword [ebp + 0x1c]
lea eax, [ebp - 0x20000]
push eax
jmp 0x40b31d
push dword [ebp + 0x1c]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
leave
ret
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
leave
ret

Function at 0x40b343
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4004
call fcn.0040d5c0
push esi
push edi
xor eax, eax
cmp dword [ebp + 8], eax
push 0x4000
push eax
mov word [ebp - 0x4004], ax
lea eax, [ebp - 0x4002]
mov edi, ecx
push eax
je 0x40b3a2
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x4004]
push eax
push dword [edi]
push dword [ebp + 0x14]
call fcn.004062e4
add esp, 0x18
push dword [ebp + 0x18]
lea eax, [ebp - 0x4004]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, eax
jmp 0x40b3e3
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [ebp + 0x18]
lea eax, [ebp - 0x4004]
push 0x2000
push eax
push 0x40e548
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [ebp + 0x14]
xor ecx, ecx
cmp ecx, eax
sbb esi, esi
push edi
lea edi, [ebp - 0x4004]
neg esi
call fcn.0040636d
pop ecx
pop ecx
pop edi
mov eax, esi
pop esi
leave
ret

Function at 0x40b3e9
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 8], 0
push dword [ebp + 0x18]
je 0x40b407
push dword [esi]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b279
add esp, 0x10
pop ebp
ret
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [esi], eax
pop ebp
ret

Function at 0x40b45b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
add eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b494
mov ecx, dword [ebp - 4]
cmp ecx, 2
jb 0x40b490
shr ecx, 1
and word [esi + ecx*2], ax
leave
ret
and word [esi], 0
leave
ret

Function at 0x40b4e1
Capabilities:
Set registry value

Disassembly:
push dword [esp + 0xc]
call sub.msvcrt.dll_wcslen
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [esp + 0x10]
push 1
push 0
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
ret
Function at 0x40bc26
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [esi], 0
jne 0x40bca4
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, eax
xor eax, eax
test ecx, ecx
mov dword [esi], ecx
je 0x40bca7
push edi
lea edi, [ebp - 0x13]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x14]
push eax
push ecx
mov byte [ebp - 0x14], 0x4e
mov byte [ebp - 0x13], 0x74
mov byte [ebp - 9], 0x65
mov byte [ebp - 8], 0x61
mov byte [ebp - 0xe], 0x74
mov byte [ebp - 0xd], 0x65
mov byte [ebp - 0x12], 0x43
mov byte [ebp - 0xa], 0x72
mov byte [ebp - 7], 0x64
mov byte [ebp - 0x11], 0x72
mov byte [ebp - 6], 0x45
mov byte [ebp - 5], 0x78
mov byte [ebp - 0x10], 0x65
mov byte [ebp - 0xf], 0x61
mov byte [ebp - 0xc], 0x54
mov byte [ebp - 0xb], 0x68
mov byte [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + 4], eax
pop edi
xor eax, eax
inc eax
leave
ret

Function at 0x40bca9
Capabilities:
Check os version
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
push esi
mov esi, eax
lea eax, [ebp - 0x144]
push eax
mov dword [ebp - 0x144], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x140], 6
jb 0x40bd54
call fcn.0040bc26
mov ebx, dword [esi + 4]
xor edx, edx
xor eax, eax
cmp ebx, edx
je 0x40bd6c
push edi
push 8
pop esi
mov ecx, esi
lea edi, [ebp - 0x28]
rep stosd dword es:[edi], eax
mov dword [ebp - 8], edx
lea edi, [ebp - 4]
stosd dword es:[edi], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x2c]
push eax
push edx
push edx
push edx
push 1
push dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push dword [ebp + 0xc]
mov dword [ebp - 0x2c], 0x24
push dword [ebp + 8]
mov dword [ebp - 0x28], 0x10003
push edx
push 0x1fffff
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x18], 0x10004
mov dword [ebp - 0x14], 4
mov dword [ebp + 0x14], edx
call ebx
neg eax
sbb eax, eax
not eax
and eax, dword [ebp + 0x14]
pop edi
jmp 0x40bd6c
push dword [ebp + 0x14]
xor edx, edx
push 4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edx
push edx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
pop esi
pop ebx
leave
ret 0x10

Function at 0x40c0c4
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
call fcn.0040c094
test eax, eax
mov dword [ebp - 4], eax
je 0x40c12f
push ebx
push esi
push 0xf01ff
push 0x40ff70
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x40c128
and dword [ebp - 0x20], 0
push edi
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
push dword [ebp + 8]
call fcn.0040c256
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call ebx
pop edi
push dword [ebp - 4]
call ebx
pop esi
pop ebx
leave
ret 4
Function at 0x40c133
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0040d5c0
push ebx
push edi
mov ebx, 0x7fe
xor edi, edi
push ebx
lea eax, [ebp - 0x1002]
push edi
push eax
mov word [ebp - 0x1004], di
call sub.msvcrt.dll_memset
push ebx
lea eax, [ebp - 0x802]
push edi
push eax
mov word [ebp - 0x804], di
call sub.msvcrt.dll_memset
add esp, 0x18
push esi
xor ebx, ebx
mov dword [esi + 0x644], edi
call fcn.0040c0c4
mov eax, esi
call fcn.0040c094
cmp eax, edi
mov dword [ebp - 4], eax
je 0x40c244
cmp word [esi + 0x28], di
lea eax, [ebp - 0x804]
je 0x40c1b0
push str._systemroot_AdvancedRun.exe
push eax
call sub.msvcrt.dll_wcscpy
pop ecx
jmp 0x40c1b6
push eax
call fcn.00405c80
pop ecx
push str._RunAsService
lea eax, [ebp - 0x804]
push eax
push 0x40eb94
lea eax, [ebp - 0x1004]
push 0x3ff
push eax
call sub.msvcrt.dll__snwprintf
add esp, 0x14
cmp dword [esi + 0x228], edi
je 0x40c1ec
lea ecx, [esi + 0x42c]
jmp 0x40c1ee
xor ecx, ecx
cmp dword [esi + 0x228], edi
je 0x40c1fe
lea eax, [esi + 0x22c]
jmp 0x40c200
xor eax, eax
push ecx
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x1004]
push eax
push 1
push 3
push 0x10
push 0xf01ff
mov eax, 0x40ff70
push eax
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
cmp ebx, edi
jne 0x40c239
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x644], eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40c250
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x644], eax
pop edi
mov eax, ebx
pop ebx
leave
ret

Function at 0x40c256
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
and dword [ebp - 0x1c], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push edi
push 6
xor eax, eax
pop ecx
lea edi, [ebp - 0x18]
rep stosd dword es:[edi], eax
xor edi, edi
jmp 0x40c29d
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40c283
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x24], eax
cmp dword [ebp - 0x18], 4
je 0x40c2aa
cmp dword [ebp - 0x18], 1
je 0x40c2aa
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x64
jg 0x40c2aa
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0xc]
call esi
test eax, eax
jne 0x40c276
pop edi
pop esi
leave
ret 8
Function at 0x40c2b0
Capabilities:
Create thread
Delete file
Delete service
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x82c
push ebx
push esi
push edi
xor ebx, ebx
push 0x7fe
lea eax, [ebp - 0x82a]
push ebx
push eax
mov esi, ecx
mov word [ebp - 0x82c], bx
call sub.msvcrt.dll_memset
lea eax, [esi + 0x28]
add esp, 0xc
cmp word [eax], bx
je 0x40c37b
movzx ecx, word [eax]
cmp cx, bx
je 0x40c301
cmp cx, 0x5c
jne 0x40c303
cmp word [eax + 2], cx
jne 0x40c303
add eax, 4
jmp 0x40c303
xor eax, eax
push eax
push str._s_admin_AdvancedRun.exe
lea eax, [ebp - 0x82c]
push 0x3ff
push eax
call sub.msvcrt.dll__snwprintf
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x82c]
push eax
push 0x40be13
push ebx
push ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
push 0x1388
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0x102
jne 0x40c370
push 0x40
pop eax
jmp 0x40c432
mov eax, dword [ebp - 4]
cmp eax, ebx
jne 0x40c432
call fcn.0040c133
mov edi, eax
cmp edi, ebx
mov dword [ebp - 4], edi
je 0x40c420
lea eax, [esi + 0x62c]
call fcn.004067a1
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x40c3ea
push edi
push esi
mov dword [esi + 0x24], ebx
call fcn.0040c256
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x40c3c3
mov dword [esi + 0x644], eax
push 6
pop ecx
xor eax, eax
mov dword [ebp - 0x2c], ebx
lea edi, [ebp - 0x28]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2c]
push eax
push 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_ControlService]
push dword [ebp - 4]
push esi
call fcn.0040c256
jmp 0x40c3f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x644], eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp word [ebp - 0x82c], bx
je 0x40c42c
lea eax, [ebp - 0x82c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40c42c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x644], eax
mov eax, dword [esi + 0x644]
pop edi
pop esi
pop ebx
leave
ret