joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10019c20
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x10045018]
xor eax, ebp
mov dword [ebp - 4], eax
cmp word [0x10049390], 0
push esi
push edi
mov esi, edx
mov edi, ecx
jne 0x10019c6d
push 0x10049c30
push 0x208
push 0x10049390
call dword [sym.imp.MSVCR110.dll_wcscpy_s]
push str.schdl
push 0x208
push 0x10049390
call dword [sym.imp.MSVCR110.dll_wcscat_s]
add esp, 0x18
test edi, edi
je 0x10019cfd
test esi, esi
je 0x10019cfd
lea eax, [ebp - 0x14]
push eax
mov eax, esi
imul eax, eax, 0x5c4
push eax
push edi
push 0x10049390
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 1
call dword [sym.imp.iImportLib.dll_public:_static_bool___cdecl_elex::safe::CiSafeUtilities::AKL_WriteFileW_wchar_t___void___unsigned_long_int__unsigned_long_int__]
add esp, 0x10
push 0x10049390
test al, al
je 0x10019cde
push esi
push str.SD:Wrote__d_tasks_to_file__s
call fcn.1000ccf0
add esp, 0xc
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
push str.SD:Write_task_to_file:_s
call fcn.1000cd50
add esp, 8
xor al, al
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
push 0x80
push 0x10049390
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x10049390
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov al, 1
pop esi
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
Function at 0x1001d330
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x1001d368
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x1001d368
push 3
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1001d36e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push str.MyReplaceFile_MoveFileEx_lpSrcPath_s_lpDstPath_s_LastError_u
call dword [sym.imp.isafepxy.dll_ISAFE_WriteProgramLogNoMask]
add esp, 0x10
pop edi
xor eax, eax
pop esi
pop ebp
ret
pop edi
mov eax, 1
pop esi
pop ebp
ret

Function at 0x10020410
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10033078
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x10045018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x24]
mov edx, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x28]
mov dword [esi + 0x7c], edx
mov dword [esi + 8], eax
mov dword [esi], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x18], 0
test edx, edx
je 0x1002049a
add edx, 4
cmp dword [edx + 0x14], 8
jb 0x10020472
mov edx, dword [edx]
cmp word [edx], 0
jne 0x1002047c
xor ecx, ecx
jmp 0x10020490
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10020481
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x34]
call fcn.100094d0
cmp dword [ebp + 0x20], 8
lea edx, [ebp + 0xc]
cmovae edx, dword [ebp + 0xc]
cmp word [edx], 0
jne 0x100204af
xor ecx, ecx
jmp 0x100204c3
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100204b4
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x4c]
call fcn.100094d0
lea eax, [esi + 0x1c]
xorps xmm0, xmm0
movq qword [eax], xmm0
movq qword [eax + 8], xmm0
push eax
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp dword [esi + 0xc], 0
jne 0x10020518
push 0
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push esi
push 0x10022f50
push 0
push 0
mov dword [esi], eax
call dword [sym.imp.MSVCR110.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0xc], eax
cmp dword [ebp + 0x20], 8
jb 0x1002052a
push dword [ebp + 0xc]
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x24
Function at 0x10020540
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi]
test eax, eax
je 0x1002059b
cmp dword [esi + 0xc], 0
je 0x1002058d
push eax
mov dword [esi + 0x18], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xea60
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1002057d
push 0
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
pop esi
ret

Function at 0x10020900
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100333b3
mov eax, dword fs:[0]
push eax
sub esp, 0x420
mov eax, dword [0x10045018]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor eax, eax
push 0x3fe
mov dword [ebp - 4], 0
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call sub.MSVCR110.dll_memset
lea eax, [ebp - 0x414]
push 0x190
push eax
call dword [sym.imp.iImportLib.dll_int___cdecl_elex::func::GetRegInstallPath_wchar_t___unsigned_long_int_]
add esp, 0x14
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
xor eax, eax
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], 0
mov word [ebp - 0x42c], ax
cmp word [ebp - 0x414], ax
jne 0x1002099d
xor ecx, ecx
jmp 0x100209b5
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100209a6
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x42c]
call fcn.100094d0
push 4
push str.cfg_
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 1
call fcn.1000ca50
push 8
push str.user.dat
lea ecx, [ebp - 0x42c]
call fcn.1000ca50
xor eax, eax
cmp dword [ebp - 0x418], 8
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x42c]
cmovae eax, dword [ebp - 0x42c]
cmp dword [ebp + 0x20], 8
push eax
push 0x200
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp + 0xc]
cmovae ecx, dword [ebp + 0xc]
push 0x10035cec
push ecx
push 0x10039f80
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x414], 0
jne 0x10020a44
xor ecx, ecx
jmp 0x10020a5f
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10020a50
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
push eax
mov ecx, esi
call fcn.100094d0
cmp dword [ebp - 0x418], 8
mov esi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
jb 0x10020a88
push dword [ebp - 0x42c]
call esi
add esp, 4
xor eax, eax
cmp dword [ebp + 0x20], 8
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], 0
mov word [ebp - 0x42c], ax
jb 0x10020ab3
push dword [ebp + 0xc]
call esi
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret 0x1c
Function at 0x10024de0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
cmp dword [0x100497c8], 0
mov dword [ebp - 4], ecx
je 0x10024df8
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [sym.imp.iCommu.dll_ICOM_0001]
push 0
push 0
push 0x2000
mov edi, eax
call ebx
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10024eac
mov eax, dword [ebp - 4]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1003cda0]
movsd qword [ebp - 8], xmm0
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
cmovb edi, eax
sub eax, edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1003cda0]
mulsd xmm0, qword [0x1003cd88]
divsd xmm0, qword [0x1003cd88]
comisd xmm0, xmmword [ebp - 8]
ja 0x10024ea8
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0
push 0x2000
call ebx
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10024e40
pop edi
pop esi
mov dword [0x100497c8], 1
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x10024eb6
mov dword [0x100497c8], 1
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100259d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10033488
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x10045018]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
push edi
mov eax, dword [0x10045018]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov eax, dword [ecx + 4]
mov esi, dword [ecx + 0xc]
and eax, 0xff00
cmp eax, 0x100
je 0x10025b28
cmp eax, 0x200
je 0x10025b06
cmp eax, 0x300
je 0x10025a39
mov eax, 0xe0001003
jmp 0x10025b48
mov ebx, dword [sym.imp.isafepxy.dll_ISAFE_WriteProgramLogNoMask]
push str.POL_OP_GETUPDATEVERSION_begin
call ebx
mov edi, dword [esi]
add esp, 4
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0
call fcn.1001dc40
mov ecx, dword [esp + 0x20]
sub ecx, dword [esp + 0x1c]
mov esi, eax
mov eax, 0x7c97d911
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push edi
push esi
push str.POL_OP_GETUPDATEVERSION_GetUpdateModuleVersions_return__u_dwModuleID_08X_size_u
call ebx
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
sub ecx, esi
mov eax, 0x7c97d911
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x41c
push 0
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 1
push 0x46
mov dword [esp + 0x40], 0
push edi
mov dword [esp + 0x44], esi
call dword [sym.imp.iCommu.dll_ICOM_1004]
add esp, 0x2c
mov esi, eax
push esi
push str.POL_OP_GETUPDATEVERSION_end_ICOM_SendCommand_return__08X
call ebx
mov ecx, dword [esp + 0x24]
add esp, 8
test ecx, ecx
je 0x10025b02
push ecx
call dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, esi
jmp 0x10025b48
mov eax, dword [esi]
test eax, eax
je 0x10025b24
add esi, 8
cmp dword [esi - 4], 0
cmova eax, esi
test eax, eax
je 0x10025b24
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x10025b24
push eax
call ecx
xor eax, eax
jmp 0x10025b48
mov eax, dword [esi + 0xc]
mov ecx, dword [esi]
mov edx, dword [esi + 4]
test eax, eax
je 0x10025b3e
add esi, 0x14
cmp dword [esi - 4], 0
cmova eax, esi
push eax
push ecx
call fcn.10024a50
add esp, 8
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
Function at 0x10027b70
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xec
mov eax, dword [0x10045018]
xor eax, esp
mov dword [esp + 0xe8], eax
push ebx
mov eax, 0x100255b0
push esi
push edi
mov ebx, ecx
test eax, eax
je 0x10027cec
mov eax, 0x100253c0
test eax, eax
je 0x10027cec
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x10027cec
mov ecx, 0x311
mov edi, 0x10049f00
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x14], 0
test ebx, ebx
je 0x10027c5c
mov edx, ebx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10027bd5
sub edx, ecx
sar edx, 1
je 0x10027c5c
lea edx, [esp + 0x14]
mov ecx, ebx
call fcn.10026af0
test eax, eax
je 0x10027c45
test byte [esp + 0x14], 0x20
je 0x10027c45
call fcn.10027b30
test eax, eax
je 0x10027c45
lea eax, [esp + 0x14]
push eax
mov dword [0x100497f8], 0x100255b0
mov dword [0x10049ed8], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
push 1
push 0x100289e0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push esi
push dword [esp + 0x18]
call dword [0x100497f8]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe8]
xor ecx, esp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
push str.GlobalSVC_BB0D08B2_A907_45ec_A04A_8A6ADD1BEA56
push 0
push 0
push 2
call dword [sym.imp.iImportLib.dll_void____stdcall_elex::handle::MyCreateEvent_unsigned_long_int__int__int__wchar_t_const__]
lea eax, [esp + 0x18]
push eax
mov dword [0x100497f8], 0x100255b0
mov dword [0x100497fc], 0x100253c0
mov dword [esp + 0x20], 0x10027d10
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x1c], 0x10049f00
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x10027c45
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartServiceCtrlDispatcher_failed._ErrorCode_d
lea eax, [esp + 0x30]
push 0x64
push eax
call dword [sym.imp.MSVCR110.dll_swprintf_s]
add esp, 0x10
lea ecx, [esp + 0x28]
call fcn.10027e60
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe8]
xor ecx, esp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xf4]
pop edi
pop esi
pop ebx
xor ecx, esp
or eax, 0xffffffff
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
Function at 0x10027e60
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x10045018]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x10049ed8], 0
push edi
mov edi, ecx
jne 0x10027ef9
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10049f00
push 0
mov dword [0x10049efc], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
push dword [0x10049efc]
mov esi, eax
push 0x10049f00
push str._s_error:__d
lea eax, [ebp - 0x204]
push 0x100
push eax
call dword [sym.imp.MSVCR110.dll_swprintf_s]
add esp, 0x14
lea eax, [ebp - 0x204]
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x208], edi
test esi, esi
je 0x10027ef8
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.1002d28e
mov esp, ebp
pop ebp
ret

Function at 0x10027f10
Capabilities:
Delete registry value
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x10045018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.SYSTEMCurrentControlSetServices_
lea eax, [ebp - 0x20c]
push 0x104
push eax
mov esi, ecx
call dword [sym.imp.MSVCR110.dll_wcscpy_s]
push esi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.MSVCR110.dll_wcscat_s]
add esp, 0x18
lea eax, [ebp - 0x214]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x20c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10027fda
mov esi, dword [sym.imp.isafepxy.dll_ISAFE_WriteProgramLog]
push str.RepairService_DeleteFlag
push 0x10
call esi
add esp, 8
push str.DeleteFlag
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.RepairService_Start
push 0x10
call esi
add esp, 8
lea eax, [ebp - 0x210]
push 4
push eax
push 4
push 0
push str.Start
push dword [ebp - 0x214]
mov dword [ebp - 0x210], 2
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
Function at 0x10027ff0
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10045018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x1002814b
push esi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x1002803e
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
push ebx
push edi
push 0xf01ff
push 0x10049f00
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
xor ecx, ecx
mov eax, 0x1004a72c
test edi, edi
jne 0x100280d7
cmp dword [0x1004a72c], ecx
push edi
push edi
push 0x1004a730
cmove eax, ecx
push eax
push 0x1004a524
push 0x1004a31c
push dword [0x1004a318]
push dword [0x1004a314]
push dword [0x1004a310]
push 0xf01ff
push 0x1004a108
push 0x10049f00
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test edi, edi
jne 0x10028112
cmp ebx, 0x431
je 0x10028112
cmp ebx, 0x430
je 0x10028112
push ebx
push str.Failed_to_call_CreateService.__u
call dword [sym.imp.isafepxy.dll_ISAFE_WriteProgramLogNoMask]
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10028112
cmp dword [0x1004a72c], ecx
push 0x1004a108
push 0
push 0
push 0x1004a730
cmove eax, ecx
push eax
push 0x1004a524
push 0x1004a31c
push dword [0x1004a318]
push dword [0x1004a314]
push dword [0x1004a310]
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov ecx, 0x10049f00
call fcn.10027f10
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x1002813d
lea eax, [ebp - 8]
push eax
push 1
push edi
mov dword [ebp - 8], 0x1004a93c
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push edi
call ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
push esi
call ebx
pop edi
pop ebx
mov ecx, 0x10049f00
call fcn.10027f10
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
Function at 0x10028170
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10045018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x100282ef
push esi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x100281d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, str.is.lsd
call fcn.10028a20
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
push ebx
push edi
push 0xf01ff
push 0x10049f00
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
xor ecx, ecx
mov eax, 0x1004a72c
test edi, edi
jne 0x10028279
cmp dword [0x1004a72c], ecx
push edi
push edi
push 0x1004a730
cmove eax, ecx
push eax
push 0x1004a524
push 0x1004a31c
push dword [0x1004a318]
push dword [0x1004a314]
push dword [0x1004a310]
push 0xf01ff
push 0x1004a108
push 0x10049f00
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test edi, edi
jne 0x100282b4
mov edx, ebx
mov ecx, str.is.cs
call fcn.10028a20
cmp ebx, 0x431
je 0x100282b4
cmp ebx, 0x430
je 0x100282b4
push ebx
push str.Failed_to_call_CreateService.__u
call dword [sym.imp.isafepxy.dll_ISAFE_WriteProgramLogNoMask]
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100282b4
cmp dword [0x1004a72c], ecx
push 0x1004a108
push 0
push 0
push 0x1004a730
cmove eax, ecx
push eax
push 0x1004a524
push 0x1004a31c
push dword [0x1004a318]
push dword [0x1004a314]
push dword [0x1004a310]
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov ecx, 0x10049f00
call fcn.10027f10
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x100282df
lea eax, [ebp - 8]
push eax
push 1
push edi
mov dword [ebp - 8], 0x1004a93c
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push edi
call ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
push esi
call ebx
pop edi
pop ebx
jmp 0x10028301
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, str.is.oscm
call fcn.10028a20
mov ecx, 0x10049f00
call fcn.10027f10
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1002d28e
mov esp, ebp
pop ebp
ret
Function at 0x10028320
Capabilities:
Check for time delay via gettickcount
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp + 8]
push esi
add eax, 0x7530
push ebx
mov dword [ebp - 0x10], eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp eax, 0x426
je 0x10028437
mov ebx, dword [ebp + 8]
lea ebx, [ebx]
test edi, edi
je 0x10028437
mov eax, dword [ebp - 0xc]
cmp dword [esi + 4], eax
je 0x10028437
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x10], eax
jb 0x1002842c
cmp dword [ebp - 4], 0
mov eax, dword [esi + 4]
je 0x100283ab
mov ebx, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0
jmp 0x100283df
cmp dword [ebp + 8], eax
je 0x100283b8
mov ebx, dword [esi + 0x14]
mov dword [ebp + 8], eax
jmp 0x100283df
mov eax, dword [esi + 0x14]
cmp eax, ebx
jbe 0x100283c3
mov ebx, eax
jmp 0x100283df
mov eax, dword [ebp - 8]
cmp eax, 0x425
je 0x100283d4
cmp eax, 0x3e5
jne 0x10028421
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 0x18]
cmp eax, 0x3e8
mov ecx, 0x3e8
cmovb eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp eax, 0x426
jne 0x10028370
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x5b4
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x100284d0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push 0xf003f
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x1002856a
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x10028563
push 0x10049edc
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x10028555
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push 0x10049edc
push esi
call ebx
test eax, eax
je 0x10028551
cmp dword [0x10049ee0], 3
jne 0x10028551
push 0x3e8
call edi
push 0x10049edc
push esi
call ebx
test eax, eax
jne 0x10028535
mov ebx, dword [ebp - 4]
pop edi
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret