joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403361
Capabilities:
Delete directory
Get common file path
Get file attributes
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
mov eax, dword [edi + 4]
xor ebx, ebx
cmp dword [0x249d900], 0x594
mov dword [ebp - 0x18], esi
mov dword [ebp - 8], eax
jne 0x4033ae
push 0x402e08
push 0x402e14
call dword [sym.imp.KERNEL32.dll_SetVolumeMountPointW]
push 0x402e28
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
mov eax, dword [0x4a54a8]
mov dword [ebp - 0x28], eax
mov eax, dword [0x4a54ac]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.00403357
mov eax, dword [str.z9IB]
add dword [ebp - 0x10], 0x23f
mov dword [ebp - 0x2c], eax
mov eax, dword [0x4a54b4]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0x20
jmp 0x4033ec
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0xc], 2
add dword [ebp - 0xc], 3
mov eax, esi
shl eax, 4
cmp dword [0x249d900], 0xc
mov dword [ebp - 4], eax
jne 0x403451
push ebx
lea eax, [ebp - 0x44c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor eax, eax
mov word [ebp - 0x1c], ax
lea edi, [ebp - 0x1a]
stosw word es:[edi], ax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0xc4c]
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterW]
lea eax, [ebp - 0x38]
push eax
push ebx
lea eax, [ebp - 0x4c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x2c]
add dword [ebp - 4], eax
mov eax, dword [0x249d900]
cmp eax, 0xfa9
jne 0x40346d
mov dword [0x249ce9c], 0xedeb2e40
cmp eax, 0x3eb
jne 0x40347a
mov dword [0x249c84c], ebx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add eax, esi
shr esi, cl
mov dword [ebp - 0x14], eax
mov dword [0x249ce98], 0xf4ea3dee
add esi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
xor dword [ebp - 4], eax
xor esi, dword [ebp - 4]
cmp dword [0x249d900], 0x213
mov dword [ebp - 0x14], esi
jne 0x4034b7
push 0x402e40
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov eax, dword [ebp - 0x14]
add dword [ebp - 8], 0x64
sub dword [ebp - 8], eax
sub dword [ebp - 8], 0x64
mov eax, dword [ebp - 8]
shl eax, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x28]
add dword [ebp - 4], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
lea esi, [eax + edx]
mov eax, edx
shr eax, cl
add eax, dword [ebp - 0x30]
xor eax, esi
xor dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x18]
call fcn.0040335e
add dword [ebp - 0x10], 0x61c88647
dec dword [ebp - 0x20]
jne 0x4033e9
cmp dword [0x249d900], 0xa6d
mov eax, dword [ebp - 0x18]
mov dword [edi], eax
jne 0x403523
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov edx, dword [ebp - 8]
mov dword [edi + 4], edx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40352d
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x249d900]
mov ecx, dword [0x249c850]
sub esp, 0x58c
push ebx
push esi
shr eax, 3
xor esi, esi
push edi
cmp eax, esi
jbe 0x4035ef
mov ebx, ecx
mov dword [ebp - 8], eax
cmp dword [0x249d900], 0x959
jne 0x4035dd
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_PeekConsoleInputW]
xor eax, eax
mov word [ebp - 4], ax
lea edi, [ebp - 2]
stosw word es:[edi], ax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CreateActCtxW]
push esi
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessPriorityBoost]
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
lea eax, [ebp - 0x188]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
push 0x402e54
push esi
push esi
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerA]
push esi
lea eax, [ebp - 0x588]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push ebx
call fcn.00403361
add ebx, 8
dec dword [ebp - 8]
jne 0x403556
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4039be
Capabilities:
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x424
push ebx
push esi
xor esi, esi
cmp dword [0x249d900], 0x400
push edi
jne 0x403a10
push esi
push esi
call fcn.00403ca6
push esi
push esi
call fcn.00403ca6
push esi
push esi
push esi
call fcn.0040466d
add esp, 0x14
mov dword [esp + 4], esi
mov dword [esp], esi
call fcn.00403332
fstp st(0)
push esi
call fcn.004046f2
pop ecx
push esi
call fcn.00404484
pop ecx
mov eax, dword [0x4a5b34]
mov dword [0x249d900], eax
mov eax, dword [0x4a5b0c]
mov dword [0x249d904], eax
call fcn.004036c3
mov dword [esp + 0x10], esi
mov ebx, 0x2b259d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor eax, eax
mov dword [esp + 0x1c], esi
lea edi, [esp + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
push esi
lea eax, [esp + 0x3c]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp dword [esp + 0x10], ebx
jle 0x403a77
cmp dword [esp + 0x18], 0x785074d5
jne 0x403a85
inc dword [esp + 0x10]
cmp dword [esp + 0x10], 0x1c1b
jl 0x403a32
xor edi, edi
push esi
lea eax, [esp + 0x34]
push eax
push esi
push 0x4031ac
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
push 0x4031e8
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
cmp edi, ebx
jle 0x403ab4
cmp dword [esp + 0x18], 0x785074d5
jne 0x403abd
inc edi
cmp edi, 0x11915
jl 0x403a87
mov eax, dword [0x249c850]
mov dword [0x249ce94], eax
call eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40a124
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4a4e24]
jne 0x40a12e
repz ret
jmp fcn.0040d8e4
Function at 0x40d491
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00405fe3
and dword [ebp - 4], 0
cmp dword [0x4a6458], 0
mov ebx, eax
jne 0x40d542
push 0x402cb4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40d5f3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402ca8
push edi
call esi
test eax, eax
je 0x40d5f3
push eax
call fcn.00405f71
mov dword [esp], 0x402c98
push edi
mov dword [0x4a6458], eax
call esi
push eax
call fcn.00405f71
mov dword [esp], 0x402c84
push edi
mov dword [0x4a645c], eax
call esi
push eax
call fcn.00405f71
mov dword [esp], 0x402c68
push edi
mov dword [0x4a6460], eax
call esi
push eax
call fcn.00405f71
pop ecx
mov dword [0x4a6468], eax
test eax, eax
je 0x40d542
push 0x402c50
push edi
call esi
push eax
call fcn.00405f71
pop ecx
mov dword [0x4a6464], eax
mov eax, dword [0x4a6464]
cmp eax, ebx
je 0x40d59a
cmp dword [0x4a6468], ebx
je 0x40d59a
push eax
call fcn.00405fec
push dword [0x4a6468]
mov esi, eax
call fcn.00405fec
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40d59a
test edi, edi
je 0x40d59a
call esi
test eax, eax
je 0x40d591
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40d591
test byte [ebp - 0xc], 1
jne 0x40d59a
or dword [ebp + 0x10], 0x200000
jmp 0x40d5d3
mov eax, dword [0x4a645c]
cmp eax, ebx
je 0x40d5d3
push eax
call fcn.00405fec
pop ecx
test eax, eax
je 0x40d5d3
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40d5d3
mov eax, dword [0x4a6460]
cmp eax, ebx
je 0x40d5d3
push eax
call fcn.00405fec
pop ecx
test eax, eax
je 0x40d5d3
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4a6458]
call fcn.00405fec
pop ecx
test eax, eax
je 0x40d5f3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40d5f5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4faf40
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, 0x227000
lea edi, [esi - 0xa6000]
push edi
jmp 0x4faf5a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4faf61
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4faf50
mov eax, 1
add ebx, ebx
jne 0x4faf73
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4faf84
jne 0x4fafa3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4fafa3
dec eax
add ebx, ebx
jne 0x4faf90
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x4faf68
add ebx, ebx
jne 0x4faf9f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x4faff5
xor ecx, ecx
sub eax, 3
jb 0x4fafbb
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4fb02a
sar eax, 1
mov ebp, eax
jmp 0x4fafc6
add ebx, ebx
jne 0x4fafc6
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4faf94
inc ecx
add ebx, ebx
jne 0x4fafd4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4faf94
add ebx, ebx
jne 0x4fafe1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4fafd6
jne 0x4faff2
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4fafd6
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4fb014
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4fb006
jmp 0x4faf56
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4fb014
add edi, ecx
jmp 0x4faf56
pop esi
mov edi, esi
mov ecx, 0x3ed9
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x4fb032
cmp byte [edi], 0x11
jne 0x4fb032
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x4fb037
lea edi, [esi + 0xf3000]
mov eax, dword [edi]
or eax, eax
je 0x4fb0af
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x11ce3c]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x11cfb8]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4fb064
mov ecx, edi
jns 0x4fb093
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x11cfbc]
or eax, eax
je 0x4fb0a9
mov dword [ebx], eax
add ebx, 4
jmp 0x4fb081
call dword [esi + 0x11cfcc]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x4fb0e0
cmp al, 0xef
ja 0x4fb0d3
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x4fb0b5
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x4fb0c2
mov ebp, dword [esi + 0x11cfc0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x227]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x4fb114
sub esp, 0xffffff80
jmp 0x425f74
Function at 0x40120e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
push edi
push dword [ebp + 8]
call esi
mov edi, dword [ebp + 0x10]
test eax, eax
je 0x401336
push dword [ebp + 8]
call esi
push dword [ebp + 0xc]
mov ebx, eax
call esi
cmp ebx, eax
je 0x401254
push dword [ebp + 8]
call esi
push dword [ebp + 0xc]
mov ebx, eax
add ebx, 0x12
call esi
cmp ebx, eax
jne 0x401336
cmp word [edi], 0
je 0x401336
cmp dword [0x4052a4], 0
jne 0x401298
push 0x10
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [0x4052a4], eax
xor eax, eax
mov ecx, 0x404270
mov dx, word [eax + 0x404270]
mov ebx, dword [0x4052a4]
xor dx, word [ecx]
mov word [eax + ebx], dx
inc eax
inc eax
dec ecx
dec ecx
cmp eax, 0x10
jb 0x40127b
push 3
push 2
lea eax, [ebp - 0x14]
xor ebx, ebx
push edi
push eax
mov word [ebp - 0x14], bx
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
cmp eax, ebx
jl 0x4012b6
mov edi, dword [edi + 8]
jmp 0x4012b8
mov edi, eax
push dword [ebp + 8]
call esi
and al, 0xfe
cmp eax, 0x10
jae 0x4012cf
push dword [ebp + 8]
call esi
mov ecx, eax
shr ecx, 1
jmp 0x4012d2
push 8
pop ecx
mov eax, edi
xor edx, edx
div ecx
push dword [ebp + 8]
and dword [ebp - 4], 0
mov edi, edx
call esi
test eax, 0xfffffffe
jbe 0x401332
mov eax, dword [ebp + 8]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov ax, word [eax + edi*2]
xor ax, word [ecx]
mov ecx, dword [0x4052a4]
cmp ax, word [ecx + ebx*2]
jne 0x401359
push dword [ebp + 8]
inc edi
call esi
shr eax, 1
cmp edi, eax
jb 0x401317
xor edi, edi
inc ebx
cmp ebx, 8
jb 0x40131f
xor ebx, ebx
push dword [ebp + 8]
inc dword [ebp - 4]
add dword [ebp + 0x10], 2
call esi
shr eax, 1
cmp dword [ebp - 4], eax
jb 0x4012f0
mov al, 1
jmp 0x40135b
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x401359
cmp dword [ebp + 0xc], esi
jne 0x401359
cmp word [edi], si
jne 0x401359
push dword [0x4052a4]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [0x4052a4], esi
xor al, al
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401434
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
lea eax, [ebp + 0x10]
push edi
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.MSVCRT.dll_vsprintf]
lea eax, [ebp - 0x104]
xor esi, esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [eax + 0x3a8], esi
je 0x40149c
add eax, 0x84
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov edi, eax
cmp edi, esi
je 0x4014aa
lea eax, [ebp - 4]
push esi
push eax
push esi
push 1
push esi
push esi
push esi
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x4014aa
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.MSVCRT.dll_puts]
pop ecx
pop edi
pop esi
leave
ret
Function at 0x401897
Capabilities:
Delete registry value
Set registry value

Disassembly:
mov eax, 0x4033b0
call sub.MSVCRT.dll__EH_prolog
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x18], ecx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
cmp eax, ebx
jl 0x4019b9
mov ecx, dword [ebp - 0x18]
call fcn.00401c10
push ebx
push ebx
push 1
push 0x64
push dword [ebp - 0x18]
call dword [sym.imp.ATL.DLL_AtlModuleUpdateRegistryFromResourceD]
mov dword [ebp - 0x14], ebx
mov esi, 0x20006
lea ecx, [ebp - 0x14]
push esi
push str.AppID
push 0x80000000
mov dword [ebp - 4], ebx
call fcn.004023b6
mov edi, eax
cmp edi, ebx
je 0x40190d
cmp dword [ebp - 0x14], ebx
je 0x4019b7
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4019b7
mov dword [ebp - 0x10], ebx
push esi
push str.A6495C8A_F7E6_4B60_8C8F_0342171E9E9B
push dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004023b6
mov edi, eax
cmp edi, ebx
jne 0x40199a
push str.LocalService
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp dword [ebp + 0xc], ebx
je 0x401985
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, str.s7hspsvx
push edi
call esi
inc eax
push eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push ebx
push str.LocalService
push dword [ebp - 0x10]
call edi
mov ebx, str._Service
push ebx
call esi
inc eax
push eax
push ebx
push 1
push 0
push str.ServiceParameters
push dword [ebp - 0x10]
call edi
mov ecx, dword [ebp - 0x18]
call fcn.00401acf
xor ebx, ebx
push ebx
push dword [ebp + 8]
push dword [ebp - 0x18]
call dword [sym.imp.ATL.DLL_AtlModuleRegisterServer]
mov edi, eax
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [ebp - 0x10], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x4019ad
push dword [ebp - 0x10]
call esi
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x14], ebx
je 0x4019b7
push dword [ebp - 0x14]
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x401acf
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
push ebx
push esi
push edi
mov esi, ecx
call fcn.004013f1
test eax, eax
jne 0x401c08
xor edi, edi
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x401b4a
lea eax, [ebp - 0x8c]
push 0x4051dc
push eax
call sub.MSVCRT.dll_strcpy
add esi, 0x84
lea eax, [ebp - 0x8c]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x8c]
push str.:__Couldnt_open_service_manager__
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x1c
jmp 0x401bde
lea eax, [ebp - 0x190]
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
push edi
push str.RPCSS
push edi
lea eax, [ebp - 0x190]
push edi
push eax
push 1
push 2
push 0x10
lea eax, [esi + 0x184]
lea ebx, [esi + 0x84]
push 0xf01ff
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, edi
mov dword [ebp - 8], eax
jne 0x401be2
lea eax, [ebp - 0x8c]
push 0x4051dc
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x8c]
push ebx
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x8c]
push str.:__Couldnt_create_service__
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x1c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x401c0b
lea ecx, [ebp - 0xc]
add esi, 0x284
push ecx
push 1
push eax
mov dword [ebp - 0xc], esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push dword [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 4]
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401c10
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
push ebx
push esi
push edi
mov esi, ecx
call fcn.004013f1
test eax, eax
je 0x401cdf
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x401c6e
lea eax, [ebp - 0x84]
push 0x4051dc
push eax
call sub.MSVCRT.dll_strcpy
add esi, 0x84
lea eax, [ebp - 0x84]
push esi
push eax
call sub.MSVCRT.dll_strcat
push str.:__Couldnt_open_service_manager__
jmp 0x401d07
lea edi, [esi + 0x84]
push 0x10020
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x401cb3
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp - 0x84]
push 0x4051dc
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x84]
push edi
push eax
call sub.MSVCRT.dll_strcat
push str.:__Couldnt_open_service__
jmp 0x401d07
lea eax, [ebp - 0xa0]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
call esi
push ebx
call esi
cmp dword [ebp - 4], 0
je 0x401ce4
push 1
pop eax
jmp 0x401d25
lea eax, [ebp - 0x84]
push 0x4051dc
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x84]
push edi
push eax
call sub.MSVCRT.dll_strcat
push str.:__Service_could_not_be_deleted__
lea eax, [ebp - 0x84]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401d7b
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push edi
xor edi, edi
push 0xf003f
push edi
mov esi, ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x80004005
je 0x401e72
add esi, 0x84
push 0x14
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0xc], esi
je 0x401e69
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x401e57
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401e57
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [ebp - 0x18]
call esi
mov dword [ebp - 8], eax
cmp dword [ebp - 0x28], 2
jne 0x401e4b
mov eax, dword [ebp - 0x14]
push 0xa
xor edx, edx
pop ecx
div ecx
cmp eax, 0x3e8
jae 0x401e0f
mov eax, 0x3e8
jmp 0x401e1a
mov ecx, 0x2710
cmp eax, ecx
jbe 0x401e1a
mov eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401e4b
cmp dword [ebp - 0x18], edi
jbe 0x401e41
call esi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 8], eax
jmp 0x401df1
call esi
sub eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x14]
jbe 0x401df1
cmp dword [ebp - 0x28], 4
jne 0x401e60
and dword [ebp - 4], 0
jmp 0x401e60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret
Function at 0x401e79
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push 0xf003f
push 0
mov esi, ecx
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x80004005
je 0x401f60
add esi, 0x84
push 0x24
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x401f57
lea ecx, [ebp - 0x2c]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x401f45
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
mov edi, dword [ebp - 0x18]
call esi
mov dword [ebp - 8], eax
cmp dword [ebp - 0x28], 3
jne 0x401f38
mov eax, dword [ebp - 0x14]
push 0xa
xor edx, edx
pop ecx
div ecx
cmp eax, 0x3e8
jae 0x401efc
mov eax, 0x3e8
jmp 0x401f07
mov ecx, 0x2710
cmp eax, ecx
jbe 0x401f07
mov eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401f38
cmp dword [ebp - 0x18], edi
jbe 0x401f2e
call esi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 8], eax
jmp 0x401ede
call esi
sub eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x14]
jbe 0x401ede
cmp dword [ebp - 0x28], 1
pop edi
jne 0x401f4e
and dword [ebp - 4], 0
jmp 0x401f4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
pop esi
leave
ret