Function at 0x401080
Capabilities:
Check if file exists
Create process on windows
Delete service
Get file attributes
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x45c
mov eax, dword [0x407008]
xor eax, esp
mov dword [esp + 0x458], eax
mov eax, dword [ebp + 8]
movaps xmm0, xmmword [0x405560]
mov dword [0x407538], eax
xor eax, eax
push ebx
push esi
push edi
mov dword [esp + 0x30], vtable.CCustomCommandLineInfo.0
lea edi, [eax + 1]
movups xmmword [esp + 0x34], xmm0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov word [esp + 0x50], ax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
cmp dword [eax], edi
jle 0x40112c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___wargv]
xor ebx, ebx
mov eax, dword [eax]
mov esi, dword [eax + edi*4]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
inc edi
xor ecx, ecx
cmp edi, dword [eax]
movzx eax, word [esi]
sete cl
cmp eax, 0x2d
je 0x40110d
cmp eax, 0x2f
jne 0x401115
mov ebx, 1
add esi, 2
mov eax, dword [esp + 0x30]
push ecx
push ebx
push esi
lea ecx, [esp + 0x3c]
call dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argc]
cmp edi, dword [eax]
jl 0x4010e5
cmp word [esp + 0x50], 0
je 0x401148
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401582
mov eax, dword [esp + 0x48]
test eax, eax
jns 0x401232
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x25c]
push eax
call ebx
cmp word [esp + 0x258], 0
jne 0x40118d
push 0x104
lea eax, [esp + 0x25c]
push eax
push dword [0x407538]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ecx
push 0x405438
lea edx, [esp + 0x260]
call fcn.00401b00
add esp, 8
test eax, eax
jne 0x4011bb
push ecx
push 0x405440
lea edx, [esp + 0x260]
call fcn.00401b00
add esp, 8
mov esi, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
lea eax, [esp + 0x258]
push 0x5c
push eax
call esi
mov edi, eax
lea eax, [esp + 0x260]
push 0x2f
push eax
call esi
add esp, 0x10
cmp edi, eax
cmova eax, edi
test eax, eax
je 0x4011ec
add eax, 2
jmp 0x4011f3
lea eax, [esp + 0x258]
push str.ZuluServ.exe
push eax
call ebx
push ecx
push 0x405438
lea edx, [esp + 0x260]
call fcn.00401b00
add esp, 8
test eax, eax
jne 0x401582
push ecx
push 0x405440
lea edx, [esp + 0x260]
call fcn.00401b00
add esp, 8
jmp 0x401582
jle 0x40127e
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ecx
push 0x405428
lea edx, [esp + 0x260]
call fcn.00401b00
add esp, 8
test eax, eax
jne 0x401582
push ecx
push 0x405430
lea edx, [esp + 0x260]
call fcn.00401b00
add esp, 8
jmp 0x401582
call fcn.00401770
mov eax, dword [esp + 0x38]
cmp eax, 1
jne 0x40129e
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x3c]
call fcn.00401d00
jmp 0x401582
cmp eax, 0xffffffff
jne 0x4013c4
xor edi, edi
mov dword [esp + 0xc], 0
cmp dword [esp + 0x34], edi
jne 0x4012ed
call fcn.004019a0
test eax, eax
je 0x4012ed
push ecx
push str._s__u
xor edx, edx
call fcn.00401b00
add esp, 8
test eax, eax
je 0x401582
push ecx
mov edx, eax
mov ecx, 0x802
call fcn.00401c00
add esp, 4
jmp 0x401582
push 0x2000b
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x4013a7
push esi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x401337
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, 0x802
call fcn.00401c00
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401582
push 0x10000
push str.ZuluServer_Agent
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x40137f
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x40136c
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [esp + 0x10], 1
call ebx
jmp 0x40138d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call ebx
jmp 0x40138d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
push esi
call ebx
cmp dword [esp + 0xc], 0
jne 0x401582
jmp 0x4013af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ecx
mov edx, edi
mov ecx, 0x802
call fcn.00401c00
add esp, 4
jmp 0x401582
mov eax, dword [esp + 0x44]
test eax, eax
je 0x401527
cmp eax, 0xffffffff
jne 0x40147a
cmp dword [esp + 0x34], 0
jne 0x401416
call fcn.004019a0
test eax, eax
je 0x401416
push ecx
push str._s__t_
xor edx, edx
call fcn.00401b00
add esp, 8
test eax, eax
je 0x401582
push ecx
mov edx, eax
mov ecx, 0x804
call fcn.00401c00
add esp, 4
jmp 0x401582
push 0x20009
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x40151f
push 0x20
push str.ZuluServer_Agent
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x40146c
lea eax, [esp + 0x14]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401461
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call ebx
push esi
call ebx
jmp 0x401582
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call ebx
jmp 0x401582
cmp eax, 0x2a
jne 0x401492
mov edx, dword [esp + 0x34]
mov ecx, str.ZuluServer_Agent
call fcn.00401f90
jmp 0x401582
cmp dword [esp + 0x34], 0
jne 0x4014cf
call fcn.004019a0
test eax, eax
je 0x4014cf
push ecx
push 0x405484
xor edx, edx
call fcn.00401b00
add esp, 8
test eax, eax
je 0x401582
push ecx
mov edx, eax
mov ecx, 0x803
call fcn.00401c00
add esp, 4
jmp 0x401582
push 0x2000b
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x40151f
push 0x10
push str.ZuluServer_Agent
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x40146c
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x401517
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call ebx
push esi
call ebx
jmp 0x401582
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401582
cmp dword [esp + 0x34], 0
jne 0x401557
cmp dword [esp + 0x40], 0
jne 0x401550
push 5
push str.ZuluSrvm.exe__f
call dword [sym.imp.KERNEL32.dll_WinExec]
cmp dword [esp + 0x34], 0
jne 0x401557
cmp dword [esp + 0x40], 0
je 0x401582
call fcn.004026b0
jmp 0x401582
lea eax, [esp + 0x14]
mov dword [esp + 0x14], str.ZuluServer_Agent
push eax
mov dword [esp + 0x1c], 0x402120
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
mov ecx, dword [esp + 0x464]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00403c2c
mov esp, ebp
pop ebp
ret 0x10