Function at 0x41f640
Capabilities:
Start service

Disassembly:
push 0xffffffffffffffff
push 0x485288
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a4720]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x64]
mov ebx, ecx
call fcn.004440b8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41f687
push 0x80004005
call fcn.00401fc0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x54], 0
call fcn.004440b8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41f6b9
push 0x80004005
call fcn.00401fc0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
push 1
lea ecx, [esp + 0x20]
push ecx
push ecx
mov byte [esp + 0x60], 1
mov ecx, esp
mov dword [esp + 0x30], esp
push str.strServiceName
call fcn.00401ed0
mov esi, dword [esp + 0x68]
push esi
mov edi, ebp
call fcn.0042e350
mov dword [esp + 0x18], eax
test eax, eax
jne 0x41f79e
mov edi, 0xa0000001
lea esi, [esp + 0x24]
call fcn.00414000
mov byte [esp + 0x54], 2
push eax
mov ecx, ebp
call fcn.00407570
mov byte [esp + 0x54], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41f73e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x60]
mov byte [esp + 0x54], 0
mov eax, dword [esp + 0x20]
mov dword [ecx], 0
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41f76d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x54], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f9b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41f9b3
push 1
lea ecx, [esp + 0x24]
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str.iSystemBits
call fcn.00401ed0
push esi
mov edi, ebp
call fcn.0042e350
mov dword [esp + 0x18], eax
test eax, eax
jne 0x41f7de
mov edi, 0xa0000001
lea esi, [esp + 0x24]
call fcn.00414000
mov byte [esp + 0x54], 3
jmp 0x41f711
mov ebx, dword [esp + 0x20]
push ebx
call fcn.00461856
add esp, 4
cmp dword [0x4a657c], 0
mov edi, eax
je 0x41f83d
push str.GetNativeSystemInfo
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41f833
lea ecx, [esp + 0x28]
push ecx
call eax
mov ax, word [esp + 0x28]
cmp ax, 9
je 0x41f829
cmp ax, 6
jne 0x41f833
mov dword [0x4a99d4], 1
mov dword [0x4a657c], 0
test edi, edi
je 0x41f84f
cmp edi, 1
jne 0x41f89e
cmp dword [0x4a99d4], 0
jne 0x41f8ac
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
test eax, eax
je 0x41f93c
push 0x10
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x41f8c1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x41f8d1
cmp edi, 2
jne 0x41f8ac
cmp dword [0x4a99d4], 0
jne 0x41f84f
mov dword [esp + 0x18], 1
mov byte [esp + 0x54], 0
lea eax, [ebx - 0x10]
jmp 0x41f754
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [esp + 0x18], 0
jne 0x41f94e
mov esi, dword [esp + 0x5c]
mov edx, dword [esi + 0x10]
mov eax, dword [esp + 0x60]
lea esi, [esp + 0x24]
mov dword [eax], edx
call fcn.00414000
mov ecx, dword [esp + 0x5c]
mov byte [esp + 0x54], 4
mov edx, dword [esp + 0x24]
mov eax, dword [ecx + 0x2c]
push edx
push ebx
push eax
push ebp
call fcn.00403800
mov byte [esp + 0x64], 1
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f96a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41f96a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [esp + 0x18], 0
jmp 0x41f8e7
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
mov dword [ecx], 2
mov eax, dword [edx + 0x30]
push ebx
push eax
push ebp
call fcn.00403800
add esp, 0xc
mov byte [esp + 0x54], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f98f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 0xfffffff0
mov dword [esp + 0x54], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f9b3
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret