Function at 0x401d00
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x407008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
xor esi, esi
push edi
mov edi, ecx
test edx, edx
jne 0x401d9b
call fcn.004019a0
test eax, eax
je 0x401d9b
push str._s__r
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp edi, 1
jne 0x401d42
lea eax, [ebx + 0x61]
jmp 0x401d4b
test edi, edi
jne 0x401d4f
mov eax, 0x6d
mov word [ebp - 0x3e], ax
push ecx
lea eax, [ebp - 0x48]
xor edx, edx
push eax
call fcn.00401b00
add esp, 8
test eax, eax
je 0x401d85
push ecx
mov edx, eax
mov ecx, 0x801
call fcn.00401c00
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c2c
mov esp, ebp
pop ebp
ret
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c2c
mov esp, ebp
pop ebp
ret
mov eax, 3
cmp edi, 1
jne 0x401daa
lea esi, [eax - 1]
jmp 0x401daf
test edi, edi
cmove esi, eax
push 0x2000b
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x401f5b
push edi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x25c], eax
test eax, eax
jne 0x401e09
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, 0x801
call fcn.00401c00
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c2c
mov esp, ebp
pop ebp
ret
push 0x104
lea eax, [ebp - 0x250]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x405470
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 3
push str.ZuluServer_Agent
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x254], eax
test eax, eax
je 0x401ef2
test esi, esi
jne 0x401ea4
push 0x1000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x258], eax
lea ecx, [ebp - 0x260]
push ecx
push 0x1000
push eax
mov eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
mov eax, dword [ebp - 0x258]
je 0x401e8a
mov esi, dword [eax + 4]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, 3
test esi, esi
cmove esi, eax
mov eax, dword [ebp - 0x254]
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x250]
push ecx
push 0xffffffffffffffff
push esi
push 0xffffffffffffffff
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x401edb
mov eax, dword [ebp - 0x254]
xor esi, esi
push eax
lea ebx, [esi + 1]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401f42
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401f42
push 0
push 0
push 0
push 0
push 0
test esi, esi
mov eax, 3
cmove esi, eax
lea eax, [ebp - 0x250]
push eax
push 1
push esi
push 0x10
push 0xf01ff
push str.ZuluServer_Agent
push str.ZuluServer_Agent
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
je 0x401f3a
xor esi, esi
push eax
lea ebx, [esi + 1]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401f42
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x25c]
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
jne 0x401f73
jmp 0x401f63
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ecx
mov edx, esi
mov ecx, 0x801
call fcn.00401c00
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403c2c
mov esp, ebp
pop ebp
ret