Function at 0x40ee90
Capabilities:
Enumerate services
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], ebx
cmp edi, ebx
jne 0x40eed3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x430220
call fcn.0040e350
mov ebx, dword [ebp - 0x20]
add esp, 8
jmp 0x40f0d1
push edi
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x40eefd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LockServiceDatabase_failed_w_err_0x_08lx_n
call fcn.0040e350
mov ebx, dword [ebp - 0x20]
add esp, 8
jmp 0x40f0d1
push 0x10000
push 0x40
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x14]
push edx
push 0x10000
push eax
push 3
push 0x30
push edi
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov esi, eax
test esi, esi
jne 0x40ef84
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40ef7c
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x14]
test eax, eax
je 0x40ef51
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x14]
push edx
push esi
push eax
push 3
push 0x30
push edi
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov esi, eax
test esi, esi
je 0x40ef33
jmp 0x40ef84
test esi, esi
je 0x40f0d1
mov dword [ebp - 0x18], ebx
cmp dword [ebp - 8], ebx
jbe 0x40f0d1
mov esi, dword [ebp - 0xc]
mov eax, dword [esi]
push eax
push str.FoxitCloudUpdateService
call fcn.00413ad3
add esp, 8
test eax, eax
jne 0x40efca
push str.find_destination_service_name
call fcn.0040e350
mov ecx, dword [esi]
add esp, 4
push 3
push ecx
push edi
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40efde
mov eax, dword [ebp - 0x18]
inc eax
add esi, 0x24
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 8]
jb 0x40ef93
jmp 0x40f0d1
mov edi, 0x1000
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea edx, [ebp - 0x1c]
push edx
mov ebx, eax
mov eax, dword [ebp - 4]
push edi
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov esi, eax
test esi, esi
jne 0x40f047
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40f03f
add edi, edi
test ebx, ebx
je 0x40f01c
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [ebp - 4]
lea ecx, [ebp - 0x1c]
push ecx
push edi
mov ebx, eax
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov esi, eax
test esi, esi
je 0x40f004
jmp 0x40f047
test esi, esi
je 0x40f0ce
mov esi, dword [ebp + 8]
mov eax, dword [ebx + 0xc]
push esi
push eax
push str.sc_config_binary_path:_s_parameter_path:_s
call fcn.0040e350
mov ecx, dword [ebx + 0xc]
add esp, 0xc
push ecx
push esi
call fcn.00413ad3
add esp, 8
test eax, eax
je 0x40f0b1
mov edx, dword [ebp - 4]
push 0
push 0
push 0
push 0
push 0
push 0
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40f0a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ChangeServiceConfig2_failed_w_err_0x_08lx_n
call fcn.0040e350
add esp, 8
push str.the_foxit_cloud_service_binary_path_change_successfully
call fcn.0040e350
jmp 0x40f0c2
push str.the_foxit_cloud_service_binary_path_is_the_same_not_change
call fcn.0040e350
mov dword [ebp - 0x10], 1
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor ebx, ebx
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40f0df
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x40f0ea
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
cmp dword [ebp - 4], 0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x40f106
mov ecx, dword [ebp - 4]
push ecx
call esi
test edi, edi
je 0x40f10d
push edi
call esi
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret