Function at 0x4998d0
Capabilities:
Create service
Start service

Disassembly:
push 0xffffffffffffffff
push 0x4ff158
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov eax, dword [0x531d28]
push edi
mov dword [esp + 0x14], eax
call fcn.004e5159
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 4], eax
mov eax, dword [str.SunwardDisk]
mov ecx, dword [0x5125c0]
mov edx, dword [0x5125c4]
mov dword [esp + 0x20], 0
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
call fcn.0047dff0
push eax
lea eax, [esp + 8]
push str._sNetDiskNetDisk.sys
push eax
call fcn.00401c40
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x4999b0
push 0x140
push str.WorkNbms_bar_trunkCommFileNetDiskApi.cpp
call fcn.00407270
mov ecx, eax
call fcn.0040a520
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_Failed_Code0x_08x.
push 0x20
call fcn.0047fc80
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
add esp, 0xc
mov dword [esp + 0x20], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4999a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x499ad6
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push 0
push 0
push 0
push 0
push 0
push ebp
push 1
push 3
push 1
push 0xf01ff
lea eax, [esp + 0x3c]
push eax
mov ecx, eax
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x499a5d
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x431
jne 0x499a08
push 0xf01ff
lea edx, [esp + 0x18]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x499a5d
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x158
push str.WorkNbms_bar_trunkCommFileNetDiskApi.cpp
call fcn.00407270
mov ecx, eax
call fcn.0040a520
call ebx
push eax
push str.CreateService_or_OpenService_Failed_Code0x_08x.
push 0x20
call fcn.0047fc80
lea eax, [ebp - 0x10]
add esp, 0xc
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x499a59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
jmp 0x499ad3
mov edi, dword [sym.imp.ADVAPI32.dll_StartServiceA]
xor ebx, ebx
mov dword [esp + 0x10], ebx
lea esp, [esp]
push 0
push 0
push esi
call edi
test eax, eax
jne 0x499a88
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x499a9d
mov eax, ebx
inc ebx
cmp eax, 3
ja 0x499aa4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x499a70
mov edi, 1
jmp 0x499aa8
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp - 0x10]
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x499ad1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x14]
pop edi
call fcn.004d40be
add esp, 0x20
ret