joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403a60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ecx
mov eax, dword [esp + 0x10]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
add eax, eax
push eax
push 8
mov esi, ecx
mov dword [esp + 0x14], 1
mov dword [esp + 0x24], eax
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x403ab8
mov eax, dword [esi + 8]
test eax, eax
jne 0x403a9c
mov eax, dword [esi + 4]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push edi
lea edx, [esp + 0x14]
push edx
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x403ac8
mov eax, edi
pop edi
pop esi
pop ebx
pop ecx
ret 0xc
push 0xffffffffffffffff
call fcn.004024b0
add esp, 4
test edi, edi
je 0x403ae3
push 0
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
pop ecx
ret 0xc

Function at 0x403b70
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esi + 8]
shl eax, 1
test ecx, ecx
jne 0x403b8d
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0x18]
push edi
push eax
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
pop edi
mov dword [esi + 0x10], eax
pop esi
jne 0x403bb0
mov al, 1
ret 0xc
push 0xffffffffffffffff
call fcn.004024b0
add esp, 4
xor al, al
ret 0xc

Function at 0x403f00
Capabilities:
Delete file

Disassembly:
mov edi, edi
push esi
mov esi, ecx
mov eax, dword [esi + 8]
test eax, eax
je 0x403f4b
push str.SeBackupPrivilege
call fcn.00403c70
test al, al
je 0x403f41
push edi
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esi + 8]
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyW]
test eax, eax
mov dword [esi + 0x10], eax
pop edi
jne 0x403f41
mov al, 1
pop esi
ret 4
push 0xffffffffffffffff
call fcn.004024b0
add esp, 4
xor al, al
pop esi
ret 4
Function at 0x403fb0
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x41c
mov eax, dword [0x413024]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x420], eax
mov eax, dword [esi + 8]
xor edx, edx
cmp eax, edx
push edi
jne 0x403ff5
mov eax, 8
mov ecx, dword [esp + 0x424]
call fcn.0040bc27
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov word [esp + 0x10], dx
mov ecx, 0x81
lea edi, [esp + 0x12]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi + 4]
push eax
push ebx
mov ecx, esi
mov dword [esp + 0x14], edx
call fcn.00403e30
mov edi, eax
test edi, edi
jne 0x404039
mov eax, 5
mov ecx, dword [esp + 0x424]
call fcn.0040bc27
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x218]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [esp + 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40406f
push 0
lea eax, [esp + 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [esp + 0x10]
push ecx
push 0
push 0x40db0c
lea edx, [esp + 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x4040a1
push 0xffffffffffffffff
call fcn.004024b0
add esp, 4
mov dword [esp + 0xc], 1
jmp 0x404106
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00403f00
test al, al
jne 0x4040bb
mov dword [esp + 0xc], 2
jmp 0x404106
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call fcn.00403f60
test al, al
jne 0x4040d5
mov dword [esp + 0xc], 7
jmp 0x404106
push 0
push 0
mov ecx, esi
call fcn.004038f0
test al, al
jne 0x4040ee
mov dword [esp + 0xc], 3
jmp 0x404106
mov ecx, edi
call fcn.004038c0
mov edx, dword [esi + 4]
push 0xf003f
push ebx
push edx
mov ecx, esi
call fcn.00403dc0
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40412b
push 4
push eax
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [esp + 0x424]
mov eax, dword [esp + 0xc]
call fcn.0040bc27
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x404150
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Move file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x418
mov eax, dword [0x413024]
mov edx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x418], eax
mov eax, dword [esi + 8]
test eax, eax
push edi
jne 0x404191
mov eax, 8
mov ecx, dword [esp + 0x41c]
call fcn.0040bc27
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov word [esp + 8], 0
mov ecx, 0x81
lea edi, [esp + 0xa]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi + 4]
push eax
push edx
mov ecx, esi
call fcn.00403e30
mov edi, eax
test edi, edi
jne 0x4041d2
mov eax, 5
mov ecx, dword [esp + 0x41c]
call fcn.0040bc27
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x210]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [esp + 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404208
push 0
lea eax, [esp + 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [esp + 8]
push ecx
push 0
push 0x40db0c
lea edx, [esp + 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x404237
push 0xffffffffffffffff
call fcn.004024b0
add esp, 4
mov esi, 1
jmp 0x40426e
lea eax, [esp + 8]
push eax
mov ecx, esi
call fcn.00403f00
test al, al
jne 0x40424e
mov esi, 2
jmp 0x40426e
lea ecx, [esp + 8]
push ecx
mov ecx, edi
call fcn.00403f60
test al, al
jne 0x404265
mov esi, 7
jmp 0x40426e
mov ecx, edi
call fcn.004038c0
xor esi, esi
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x404293
push 4
push eax
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [esp + 0x41c]
mov eax, esi
call fcn.0040bc27
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x404700
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebx
mov ebx, dword [esp + 0xc]
test ebx, ebx
push edi
mov edi, ecx
je 0x4047e3
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x4047e3
mov eax, dword [edi + 0x20]
test eax, eax
je 0x4047e3
push ebp
push 0x5c
push ebx
call dword [sym.imp.MSVCR71.dll_wcsrchr]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x404741
pop ebp
pop edi
pop ebx
ret 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x20
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [edi + 0xc], eax
je 0x40478a
mov ecx, dword [esp + 0x14]
test ecx, ecx
jne 0x404793
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x40479b
mov edx, dword [edi + 0xc]
push edx
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
ret 8
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, ebp
sub esi, ebx
sar esi, 1
push ebx
mov ecx, edi
mov word [ebx + esi*2], 0
call fcn.00404450
test eax, eax
jne 0x4047c9
mov ecx, edi
mov word [ebx + esi*2], 0x5c
call fcn.00404620
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
ret 8
mov eax, dword [edi + 0x10]
add ebp, 2
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
pop esi
pop ebp
pop edi
mov eax, 1
pop ebx
ret 8
pop edi
xor eax, eax
pop ebx
ret 8
Function at 0x404ee0
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x40c521
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov eax, dword [esp + 0x20]
push ebx
push esi
mov esi, ecx
mov ecx, dword [esp + 0x24]
xor ebx, ebx
push edi
mov dword [esp + 0xc], esi
mov dword [esi], 0x40db6c
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], ebx
lea edi, [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov ecx, edi
call fcn.004071a0
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x24], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov dword [esp + 0x14], 8
mov dword [esp + 0x18], 1
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0xc
mov dword [0x413050], esi
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x2c], eax
cmp eax, ebx
mov byte [esp + 0x20], 1
je 0x404f7c
mov ecx, eax
call fcn.00405160
jmp 0x404f7e
xor eax, eax
cmp eax, ebx
mov byte [esp + 0x20], bl
mov dword [esi + 0x30], eax
je 0x40501e
mov eax, dword [esi + 0xc]
push 0x104
push eax
mov ecx, edi
call fcn.00407380
test eax, eax
je 0x40501e
mov edi, dword [esi + 0xc]
lea ecx, [edi + edi*4]
lea edx, [ecx*4 + 4]
push ebp
push edx
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, ebx
mov byte [esp + 0x24], 2
je 0x404fdf
push fcn.004071d0
push 0x404890
push edi
lea ebp, [eax + 4]
push 0x14
push ebp
mov dword [eax], edi
call fcn.0040bd54
jmp 0x404fe1
xor ebp, ebp
mov dword [esi + 0x2c], ebp
cmp ebp, ebx
mov byte [esp + 0x24], bl
pop ebp
je 0x40501e
mov eax, dword [esi + 0xc]
xor edi, edi
cmp eax, ebx
jbe 0x40501e
jmp 0x405000
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x2c]
push 0x104
push eax
add ecx, ebx
call fcn.00407380
mov eax, dword [esi + 0xc]
inc edi
add ebx, 0x14
cmp edi, eax
jb 0x405000
mov ecx, dword [esp + 0x18]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 8
Function at 0x4052a0
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ecx
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
mov esi, ecx
mov eax, dword [esi + 4]
xor ebx, ebx
cmp eax, ebx
push edi
mov edi, 0x4fb0
je 0x4052c8
push eax
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x4fb0
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [esi + 4], eax
je 0x4052f6
push str.ntdll.dll
push 1
call fcn.0040b3c0
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x405301
mov dword [esi + 8], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push str.NtQuerySystemInformation
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
mov ebx, eax
mov eax, dword [esi + 4]
push 0x4fb0
push eax
push 5
call ebx
cmp eax, 0xc0000004
je 0x40535e
test eax, eax
jge 0x40536d
push 0x40db90
add edi, edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [esi + 4]
push edi
push ecx
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x4052f9
push 0
push edi
mov edx, eax
push edx
push 5
mov dword [esi + 4], eax
call ebx
cmp eax, 0xc0000004
jne 0x405325
pop edi
mov dword [esi + 8], 0
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x10]
push eax
mov dword [esi + 8], 1
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret

Function at 0x405a10
Capabilities:
Get hostname

Disassembly:
sub esp, 0x28
mov eax, dword [0x413024]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
push esi
mov esi, ecx
xor ecx, ecx
mov dword [esi + 4], eax
mov eax, dword [esp + 0x34]
cmp eax, ecx
mov dword [esi], 0x40dc38
mov dword [esi + 8], eax
mov dword [esi + 0xc], 1
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], ecx
mov dword [esi + 0x34], ecx
je 0x405a9d
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jge 0x405a6e
mov dword [esi + 0xc], 1
mov eax, esi
pop esi
mov ecx, dword [esp + 0x24]
call fcn.0040bc27
add esp, 0x28
ret 8
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0xc], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov eax, dword [esi + 8]
push eax
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x28]
mov eax, esi
pop esi
call fcn.0040bc27
add esp, 0x28
ret 8
Function at 0x405c30
Capabilities:
Enumerate services

Disassembly:
mov edi, edi
push ecx
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
push esi
mov esi, ecx
mov edx, dword [esi + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push ebx
push edx
mov dword [esp + 0x24], 0
call ebp
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x405c6e
pop esi
pop ebp
pop ebx
pop ecx
ret 8
push edi
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov edi, dword [esp + 0x18]
mov dword [edi], eax
je 0x405cbc
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x20]
push edx
mov edx, dword [esi + 0x14]
push ecx
push eax
push ebx
push edx
call ebp
test eax, eax
jne 0x405cc7
mov eax, dword [edi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [edi], 0
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret 8
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
Function at 0x405ce0
Capabilities:
Copy file
Delete file
Set file attributes

Disassembly:
sub esp, 0x10
push ebx
push 0x40db30
push 1
mov dword [esp + 0x10], ecx
call fcn.0040b3c0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x405d04
pop ebx
add esp, 0x10
ret 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.NetShareGetInfo
push ebx
call esi
push str.NetApiBufferFree
mov edi, eax
push ebx
mov dword [esp + 0x1c], edi
call esi
test edi, edi
mov dword [esp + 0x18], eax
je 0x405eae
test eax, eax
je 0x405eae
push ebp
mov ebp, dword [esp + 0x24]
push 0x5c
push ebp
call dword [sym.imp.MSVCR71.dll_wcsrchr]
add esp, 8
test eax, eax
mov dword [esp + 0x24], eax
je 0x405e6e
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x208
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x405e6e
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 8]
push eax
push str.ADMIN_
push edx
push str._s_s_s
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x405dab
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
push esi
je 0x405e81
push ebp
push str._s_was_succesfully_copied_to__s_n
call fcn.004024a0
add esp, 0xc
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 8]
lea eax, [esp + 0x10]
push eax
push 2
push str.ADMIN_
push edx
mov dword [esp + 0x20], 0
call dword [esp + 0x28]
test eax, eax
jne 0x405e61
push 0x208
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov esi, dword [esp + 0x28]
mov dword [esi], eax
je 0x405e6e
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
push ecx
mov ecx, dword [edx + 0x18]
push ecx
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov edx, dword [esp + 0x20]
add esp, 0x10
push edx
call dword [esp + 0x20]
mov eax, dword [esi]
push eax
push str.CService::CopyExeToRemoteAdmin___lpszResult___s_n
call fcn.004024a0
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret 8
push str.NetShareGetInfo_failed__n
call fcn.004024a0
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret 8
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push ebp
push str.Could_not_copy__s_to__s_n
call fcn.004024a0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret 8
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret 8
Function at 0x405ed0
Capabilities:
Modify service

Disassembly:
mov eax, dword [ecx + 0x14]
test eax, eax
jne 0x405eda
ret 0x14
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push 0
push ecx
mov ecx, dword [esp + 0xc]
push edx
mov edx, dword [esp + 0x20]
push 0
push 0
push 0
push ecx
mov ecx, dword [esp + 0x2c]
push 0xffffffffffffffff
push edx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
ret 0x14

Function at 0x4060b0
Capabilities:
Check if file exists
Create service
Get file attributes

Disassembly:
mov edi, edi
push ecx
push edi
push 0xf003f
mov edi, ecx
mov eax, dword [edi + 8]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [edi + 0x10], eax
jne 0x4060d3
pop edi
pop ecx
ret 4
push ebx
push esi
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0x14]
xor ebx, ebx
push ecx
mov dword [esp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406108
mov edx, dword [esi + 0x14]
push edx
push str.CService::Create____s_was_not_found__n
call fcn.004024a0
add esp, 8
pop esi
pop ebx
xor eax, eax
pop edi
pop ecx
ret 4
cmp dword [esi], 0
jne 0x406112
mov eax, dword [edi + 4]
mov dword [esi], eax
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x40614e
mov edx, dword [esi + 0x14]
lea ecx, [esp + 0xc]
push ecx
push edx
mov ecx, edi
call fcn.00405ce0
test eax, eax
jne 0x406143
push str.CService::Create___CopyExeToRemoteAdmin_failed__n
call fcn.004024a0
add esp, 4
pop esi
pop ebx
xor eax, eax
pop edi
pop ecx
ret 4
mov eax, dword [edi + 0xc]
test eax, eax
mov ebx, dword [esp + 0xc]
je 0x406153
mov eax, dword [esi + 0x14]
jmp 0x406155
mov eax, ebx
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push ecx
mov ecx, dword [esi + 0x20]
push edx
mov edx, dword [esi + 0x1c]
push ecx
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [esi + 0x10]
push ecx
mov ecx, dword [esi + 8]
push eax
mov eax, dword [esi + 0xc]
push edx
mov edx, dword [esi + 4]
push eax
mov eax, dword [esi]
push ecx
mov ecx, dword [edi + 4]
push edx
mov edx, dword [edi + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [edi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x4061b8
mov eax, dword [edi + 4]
push eax
push str.The__s_service_already_exists._n
call fcn.004024a0
add esp, 8
pop esi
pop ebx
mov eax, 1
pop edi
pop ecx
ret 4
push eax
call fcn.004024b0
add esp, 4
test ebx, ebx
je 0x4061d5
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [edi + 0x14]
pop esi
xor eax, eax
test ecx, ecx
pop ebx
setne al
pop edi
pop ecx
ret 4
Function at 0x4061f0
Capabilities:
Query service status

Disassembly:
mov edi, edi
push esi
mov esi, ecx
mov eax, dword [esi + 0x34]
test eax, eax
push edi
mov edi, dword [esp + 0xc]
je 0x40620a
push edi
push esi
push 0
call eax
add esp, 0xc
mov eax, dword [esi + 4]
push ebx
push ebp
push eax
push 0x40e08c
call fcn.004024a0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
add esp, 8
lea esp, [esp]
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x406249
push str.The_service_hasnt_been_opened._n
call fcn.004024a0
add esp, 4
or eax, 0xffffffff
jmp 0x406269
lea ecx, [esi + 0x18]
push ecx
push eax
call ebp
test eax, eax
jne 0x406266
push str.QueryServiceStatus_failed___CService::UpdateServiceStatus__n
call fcn.004024a0
add esp, 4
or eax, 0xffffffff
jmp 0x406269
mov eax, dword [esi + 0x1c]
add eax, 0xfffffffe
cmp eax, 4
ja case.0x406271.4
jmp dword [eax*4 + 0x4062c0]
mov eax, dword [esi + 0x34]
test eax, eax
je 0x406288
push edi
push esi
push 1
call eax
add esp, 0xc
push 0x40e088
call fcn.004024a0
add esp, 4
push 0x64
call ebx
jmp 0x406230
mov eax, dword [esi + 0x34]
test eax, eax
pop ebp
pop ebx
je 0x4062ad
push edi
push esi
push 2
call eax
add esp, 0xc
push 0x40e084
call fcn.004024a0
add esp, 4
pop edi
pop esi
ret 4
Function at 0x406340
Capabilities:
Get file attributes
Get hostname
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x40c538
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
mov eax, dword [0x413024]
push ebx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x64]
xor ebx, ebx
cmp eax, ebx
push edi
mov edi, ecx
je 0x406376
push 2
call fcn.004061f0
mov eax, dword [edi + 4]
push eax
push str.MSSQLServer
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x406399
mov ecx, dword [edi + 0x1c]
xor eax, eax
cmp ecx, 4
sete al
jmp 0x406529
cmp dword [edi + 0x1c], 4
je 0x4063b3
lea ecx, [esp + 8]
push ecx
mov ecx, edi
mov dword [esp + 0xc], ebx
call fcn.00405f10
test eax, eax
jne 0x4063bd
mov eax, 1
jmp 0x406529
push esi
mov esi, dword [esp + 0xc]
cmp esi, ebx
jne 0x4063d0
mov eax, 1
jmp 0x406528
push ebp
lea ecx, [esp + 0x18]
or ebp, 0xffffffff
call fcn.004043e0
mov eax, dword [edi + 8]
cmp eax, ebx
mov dword [esp + 0x68], ebx
je 0x406462
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jl 0x406462
mov edx, dword [edi + 8]
push 0x40e088
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x406462
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x40644d
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x18]
mov dword [esp + 0x68], 0xffffffff
call fcn.004046d0
mov eax, 1
jmp 0x406527
mov eax, dword [edi + 8]
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov dword [esp + 0x10], eax
jmp 0x406466
mov dword [esp + 0x10], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call ebx
test al, 1
je 0x406482
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call ebx
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x4064c5
mov ecx, dword [edi + 8]
push esi
push ecx
lea ecx, [esp + 0x20]
call fcn.00404700
test eax, eax
je 0x4064bd
push 0xa0000000
push 3
push 3
push 0xc0000000
lea ecx, [esp + 0x28]
call fcn.004045d0
test eax, eax
je 0x4064e0
mov ebp, dword [esp + 0x1c]
jmp 0x4064e0
push esi
push 0
jmp 0x406425
push 0
push 0x80
push 3
push 0
push 3
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
xor edx, edx
cmp ebp, 0xffffffff
sete dl
test ebx, ebx
mov edi, edx
je 0x4064f9
lea ecx, [esp + 0x18]
call fcn.00404620
jmp 0x406504
test edi, edi
jne 0x406504
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x18]
mov dword [esp + 0x68], 0xffffffff
call fcn.004046d0
mov eax, edi
pop ebp
pop esi
mov ecx, dword [esp + 0x58]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x50]
pop ebx
call fcn.0040bc27
add esp, 0x5c
ret 4