Function at 0x402d12
Capabilities:
Check if file exists
Create service
Get file attributes
Read file on windows
Start service
Terminate process
Write file on windows

Disassembly:
mov eax, 0x41de8b
call fcn.0040b998
sub esp, 0x5ec
push ebx
push esi
push edi
xor ebx, ebx
mov edi, ecx
push str.__bCheckDeviceNT
mov dword [ebp - 0x1c], ebx
call fcn.004013fd
lea eax, [ebp - 0x148]
mov dword [esp], 0x42a150
push eax
call fcn.0040bb30
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
pop ecx
pop ecx
lea eax, [edi + 0x110]
mov dword [ebp + 0xc], eax
push eax
lea eax, [ebp - 0x148]
push eax
call esi
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x402ded
lea eax, [ebp - 0x148]
push 0x42a150
push eax
call fcn.0040bb30
push dword [ebp + 0xc]
lea eax, [ebp - 0x24c]
push str.Winsetup_s
push eax
call fcn.0040becd
add esp, 0x14
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x148]
push eax
call esi
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x402ded
push dword [ebp + 0xc]
lea eax, [ebp - 0x148]
push str._s_ERROR_FILE_NOT_FOUND
push eax
call fcn.0040becd
add esp, 0xc
lea eax, [ebp - 0x148]
push 0x40
push 0x425048
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.0040be8d
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
call esi
cmp dword [ebp - 0x18], ebx
push eax
jne 0x402e1e
push str.OpenSCManager_failed____u
call fcn.004013fd
pop ecx
xor eax, eax
pop ecx
jmp 0x4031df
push str.OpenSCManager____u
call fcn.004013fd
pop ecx
lea eax, [edi + 0xc]
pop ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
push 1
push 3
push 1
push 0xf01ff
push eax
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [edi + 4], eax
call esi
push dword [ebp + 8]
mov dword [ebp + 0xc], eax
call esi
push eax
push str.CreateService____u____s
call fcn.004013fd
add esp, 0xc
cmp dword [ebp + 0xc], 0x431
jne 0x402e96
lea eax, [edi + 0xc]
push 0xf01ff
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [edi + 4], eax
call esi
push eax
push str.OpenService____u
mov dword [ebp + 0xc], eax
call fcn.004013fd
pop ecx
pop ecx
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x402ebb
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov dword [ebp + 8], eax
call esi
push eax
push str.StartService____u
mov dword [ebp + 0xc], eax
call fcn.004013fd
pop ecx
pop ecx
lea eax, [edi + 0xc]
push eax
lea eax, [ebp - 0x24c]
push str.._s
push eax
call fcn.0040becd
add esp, 0xc
cmp dword [ebp + 8], ebx
jne 0x402eeb
cmp dword [ebp + 0xc], 0x420
je 0x402eeb
push str.bSvc__0
jmp 0x4031cb
push ebx
push ebx
push 3
push ebx
push 1
lea eax, [ebp - 0x24c]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [edi + 8], eax
jne 0x402f1b
call esi
push eax
push str.CreateFile_failed____d_n
call fcn.004013fd
pop ecx
pop ecx
cmp dword [edi + 8], 0xffffffff
je 0x4031c6
mov eax, dword [ebp + 0x10]
mov esi, 0x100
and eax, 7
mov word [ebp - 0x40], 1
mov dword [ebp - 0x34], esi
mov word [ebp - 0x36], bx
mov dword [ebp + 8], ebx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
mov dword [ebp + 0xc], ebx
shl eax, 5
mov dword [ebp - 0x2c], eax
mov al, byte [ebp + 0xc]
push ebx
and eax, 0x1f
or eax, dword [ebp - 0x2c]
shl eax, 3
or eax, dword [ebp - 0x28]
mov word [ebp - 0x3e], ax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x40]
push 0x14
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x24]
push ebx
push eax
lea eax, [ebp - 0x5f8]
push esi
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x24], esi
jne 0x4031a0
mov eax, dword [0x427530]
mov dword [ebp - 0x10], eax
movzx eax, word [ebp - 0x5f6]
push eax
mov dword [ebp - 4], ebx
movzx eax, word [ebp - 0x5f8]
push eax
lea eax, [ebp - 0x10]
push str.PCIVEN__XDEV__X
push eax
call fcn.0041509d
add esp, 0x10
xor eax, eax
cmp dword [0x42a0ec], ebx
mov dword [ebp + 0x10], eax
jle 0x403194
jmp 0x402fd7
mov eax, dword [ebp + 0x10]
cmp byte [0x42a141], bl
je 0x402ffd
mov ecx, dword [0x42a0dc]
push dword [ecx + eax*4]
lea ecx, [ebp - 0x10]
call fcn.00414d5c
test eax, eax
jge 0x403150
jmp 0x40313c
mov ecx, dword [0x42a0dc]
push dword [ebp - 0x10]
lea ecx, [ecx + eax*4]
call fcn.00414d5c
test eax, eax
jl 0x40313c
cmp byte [0x42a141], bl
jne 0x403187
lea ecx, [ebp - 0x4f8]
call fcn.00401548
mov eax, dword [0x427530]
mov dword [ebp - 0x14], eax
mov eax, dword [0x42a0dc]
mov ecx, dword [ebp + 0x10]
mov byte [ebp - 4], 2
push dword [eax + ecx*4]
push dword [ebp - 0x10]
push str.bCheckDeviceNT:_match_found___n_s_n_s
call fcn.004013fd
add esp, 0xc
cmp dword [0x428e90], ebx
je 0x40307f
mov eax, dword [0x42a0c4]
mov ecx, dword [ebp + 0x10]
push str.NTAMD64
push dword [eax + ecx*4]
lea eax, [ebp - 0x14]
push str._s._s
push eax
call fcn.0041509d
add esp, 0x10
jmp 0x40309b
mov eax, dword [0x42a0c4]
mov ecx, dword [ebp + 0x10]
push dword [eax + ecx*4]
lea eax, [ebp - 0x14]
push 0x425404
push eax
call fcn.0041509d
add esp, 0xc
lea eax, [ebp - 0x350]
push 0x42a254
push eax
call fcn.0040bb30
lea eax, [ebp - 0x350]
push 0x42a560
push eax
call fcn.0040bb40
lea eax, [ebp - 0x350]
push eax
push str.INF_Name_:__s
call fcn.004013fd
push dword [ebp - 0x14]
push str.Section_Name_:__s
call fcn.004013fd
add esp, 0x20
lea eax, [ebp - 0x350]
lea ecx, [ebp - 0x4f8]
push ebx
push eax
call fcn.00402337
cmp eax, ebx
jne 0x403122
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.00415987
lea ecx, [ebp - 0x4f8]
call fcn.0040269a
lea ecx, [ebp - 0x4f8]
mov dword [ebp - 0x20], eax
call fcn.004024fa
cmp dword [ebp - 0x20], ebx
je 0x40316d
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00415c12
lea ecx, [ebp - 0x4f8]
mov byte [ebp - 4], bl
call fcn.0040171d
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
cmp eax, dword [0x42a0ec]
jl 0x402fd4
jmp 0x403194
mov eax, dword [0x42a0dc]
mov ecx, dword [ebp + 0x10]
push dword [eax + ecx*4]
push dword [ebp - 0x10]
push str.bCheckDeviceNT:_Find_match:__n_s_n_s
call fcn.004013fd
add esp, 0xc
jmp 0x403187
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00415c12
lea ecx, [ebp - 0x4f8]
mov byte [ebp - 4], bl
call fcn.0040171d
inc dword [0x42a134]
mov dword [ebp - 0x1c], 1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00415c12
inc dword [ebp + 0xc]
cmp word [ebp + 0xc], 0x20
jb 0x402f4f
inc dword [ebp + 8]
cmp word [ebp + 8], si
jb 0x402f43
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4031d1
push str.h__INVALID_HANDLE_VALUE
call fcn.004013fd
pop ecx
push 0x425440
call fcn.004013fd
mov eax, dword [ebp - 0x1c]
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc