Function at 0x405f10
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x75fb18
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x88bba0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
test ebx, ebx
je 0x406383
cmp byte [ebx], 0
je 0x406383
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x405fe5
push str.SCM_has_not_been_opened_for__s_service_installation
lea ecx, [ebp - 0x28]
call fcn.00404f70
mov dword [ebp - 4], 3
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 4
mov ecx, esi
push 0x799de0
call fcn.00483720
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 5
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 4
cmp dword [ebp - 0x2c], 0x10
jb 0x405fca
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 3
jmp 0x40641a
test edi, edi
je 0x405ff4
cmp byte [edi], 0
jne 0x405ff4
xor edi, edi
xor esi, esi
jmp 0x405fff
test esi, esi
je 0x405fff
xor eax, eax
cmp byte [esi], al
cmove esi, eax
push esi
push edi
push 0
push 0
push 0
push ebx
mov ebx, dword [ebp - 0x60]
push 1
push 2
push 0x10
push 0xf01ff
push 0x799df0
push 0x799de0
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jne 0x4061e1
call esi
mov edi, eax
lea ecx, [ebp - 0x40]
cmp edi, 0x431
je 0x4060cc
push str._s_service_has_not_been_created_GLE_lu
call fcn.00404f70
mov dword [ebp - 4], 6
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 7
mov ecx, esi
push 0x799de0
call fcn.00483720
push edi
mov ecx, esi
call fcn.00483710
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 8
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x28]
call fcn.00404fd0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x5c]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00404fd0
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40644c
push str._s_service_already_exist
call fcn.00404f70
mov dword [ebp - 4], 9
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 0xa
mov ecx, esi
push 0x799de0
call fcn.00483720
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 0xb
push eax
call fcn.00480c90
add esp, 4
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x28]
call fcn.00404fd0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x5c]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00404fd0
push 0xf01ff
push 0x799de0
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x4061c0
push str._s_service_cant_be_opened_GLE_lu
lea ecx, [ebp - 0x40]
call fcn.00404f70
mov dword [ebp - 4], 0xc
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov edi, eax
mov byte [ebp - 4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x799de0
mov ecx, edi
mov esi, eax
call fcn.00483720
push esi
mov ecx, edi
call fcn.00483710
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00483750
mov byte [ebp - 4], 0xe
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x28]
call fcn.00404fd0
mov byte [ebp - 4], 0xc
jmp 0x4060a9
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 1
push 6
call fcn.00406470
add esp, 0xc
test al, al
je 0x406207
lea eax, [ebp - 0x60]
mov dword [ebp - 0x60], 1
push eax
push 3
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x4062ad
call esi
mov dword [ebp - 0x64], eax
cmp eax, 0x420
je 0x4062a6
push str._s_service_has_not_been_started_GLE_d
lea ecx, [ebp - 0x40]
call fcn.00404f70
mov dword [ebp - 4], 0xf
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 0x10
mov ecx, esi
push 0x799de0
call fcn.00483720
push dword [ebp - 0x64]
mov ecx, esi
call fcn.004836e0
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 0x11
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x28]
call fcn.00404fd0
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x5c]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00404fd0
jmp 0x4062ad
mov dword [ebp - 0x60], 1
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
push str.__s_service_has__s_been_installed
lea ecx, [ebp - 0x28]
call fcn.00404f70
mov dword [ebp - 4], 0x12
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 0x13
mov ecx, esi
push 0x799de0
call fcn.00483720
cmp dword [ebp - 0x60], 0
mov eax, 0x79a02c
mov ecx, 0x799e88
cmove ecx, eax
push ecx
mov ecx, esi
call fcn.00483720
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 0x14
push eax
call fcn.00480c90
add esp, 4
mov byte [ebp - 4], 0x13
cmp dword [ebp - 0x2c], 0x10
jb 0x406331
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x5c]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0x10
jb 0x406367
push dword [ebp - 0x28]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x14], 0xf
mov eax, 1
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jmp 0x40644e
push 0x32
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0
push str.Binary_path_is_invalid_for__s_service_installation
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.0042fb60
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00483380
mov esi, eax
mov byte [ebp - 4], 1
mov ecx, esi
push 0x799de0
call fcn.00483720
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.00483750
mov byte [ebp - 4], 2
push eax
call fcn.00481260
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0x2c], 0x10
jb 0x406404
push dword [ebp - 0x40]
call fcn.00489b60
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5c]
call fcn.00483470
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0x10
jb 0x40643a
push dword [ebp - 0x28]
call fcn.00489b60
add esp, 4
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00722035
mov esp, ebp
pop ebp
ret