Function at 0x4013a0
Capabilities:
Create service
Start service

Disassembly:
sub esp, 0x204
mov eax, dword [0x45e7b0]
xor eax, esp
mov dword [esp + 0x200], eax
mov eax, dword [esp + 0x208]
push edi
push eax
lea eax, [esp + 8]
push 0x100
push eax
call fcn.0043227b
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x401410
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager___Faild__d____n
call fcn.004314df
add esp, 8
xor eax, eax
pop edi
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.004311a6
add esp, 0x204
ret
push ebp
push esi
push str.OpenSCManager___ok____n
call fcn.004314df
add esp, 4
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
push 3
push 1
push 0xf01ff
push 0x4521d8
push 0x4521d8
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x4014fb
call ebp
mov esi, eax
cmp esi, 0x3e5
je 0x40149d
cmp esi, 0x431
je 0x40149d
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
push str.CrateService___Faild__d____n
call fcn.004314df
add esp, 8
pop esi
pop ebp
xor eax, eax
pop edi
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.004311a6
add esp, 0x204
ret
push str.CrateService___Faild_Service_is_ERROR_IO_PENDING_or_ERROR_SERVICE_EXISTS___n
call fcn.004314df
add esp, 4
push 0xf01ff
push 0x4521d8
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4014f4
call ebp
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
push str.OpenService___Faild__d____n
call fcn.004314df
add esp, 8
pop esi
pop ebp
xor eax, eax
pop edi
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.004311a6
add esp, 0x204
ret
push str.OpenService___ok____n
jmp 0x401500
push str.CrateService___ok____n
call fcn.004314df
add esp, 4
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40156f
call ebp
cmp eax, 0x3e5
je 0x401562
cmp eax, 0x420
je 0x40155b
push eax
push str.StartService___Faild__d____n
call fcn.004314df
add esp, 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop esi
pop ebp
xor eax, eax
pop edi
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.004311a6
add esp, 0x204
ret
push str.StartService___Faild_ERROR_IO_PENDING____n
jmp 0x401567
push str.StartService___Faild_ERROR_SERVICE_ALREADY_RUNNING____n
call fcn.004314df
add esp, 4
push ebx
push 0x4521d8
push str.._s
lea edx, [esp + 0x118]
call fcn.0040a040
add esp, 8
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea edx, [esp + 0x128]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4015bc
push str.Open_Driver_Twdm_ok____n
call fcn.004314df
add esp, 4
jmp 0x4015cc
call ebp
push eax
push str.Open_Driver_Twdm_faild__d____n
call fcn.004314df
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov ecx, dword [esp + 0x210]
pop ebx
pop esi
pop ebp
pop edi
xor ecx, esp
mov eax, 1
call fcn.004311a6
add esp, 0x204
ret