Function at 0x407916
Capabilities:
Create service
Modify service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [esi + 8]
mov eax, dword [esi + 4]
neg edi
sbb edi, edi
add edi, 3
dec eax
je 0x407a57
dec eax
jne 0x407b87
lea eax, [ebp - 0x10]
push eax
push esi
call fcn.00407b8e
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
je 0x407957
mov ecx, esi
call fcn.00407cab
cmp dword [esi + 8], ebx
je 0x407b87
cmp byte [esi + 0x60c], bl
lea eax, [esi + 0x60c]
jne 0x407975
push 0x4cae14
jmp 0x407976
push eax
lea eax, [ebp - 0x2a4]
push eax
call fcn.00495810
pop ecx
lea edi, [esi + 0x20c]
pop ecx
lea eax, [ebp - 0xe0]
push edi
push eax
call fcn.00495810
lea eax, [ebp - 0xe0]
push 0x5c
push eax
call fcn.00496dd0
mov byte [eax], bl
lea eax, [ebp - 0x2a4]
push eax
lea eax, [esi + 0xc]
push eax
lea eax, [ebp - 0xe0]
push edi
push eax
lea eax, [ebp - 0x1a8]
push str.__slmgrd.exe____s___app__win__c___s___l___s_
push eax
call fcn.004956af
add esp, 0x28
lea eax, [ebp - 8]
push eax
push 1
push ebx
push 0x4c9660
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407b87
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0x20006
push ebx
push 0x4d9e68
push ebx
push str.MicrosoftWindowsCurrentVersionRunServices
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x407a4b
lea eax, [ebp - 0x1a8]
push eax
call fcn.00495790
pop ecx
inc eax
push eax
lea eax, [ebp - 0x1a8]
push eax
push 1
add esi, 0x40c
push ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call edi
push 1
pop ebx
push dword [ebp - 8]
call edi
mov eax, ebx
jmp 0x407b89
lea eax, [ebp - 0x18]
mov ecx, esi
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00407b8e
xor ebx, ebx
cmp dword [esi], ebx
jne 0x407a81
cmp dword [ebp - 0xc], ebx
je 0x407b50
mov ecx, esi
call fcn.00407cab
jmp 0x407b50
cmp dword [ebp - 0xc], ebx
jne 0x407af5
push 2
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x407ae5
push ebx
push ebx
lea eax, [esi + 0x40c]
push str.NetworkProvider
push ebx
add esi, 0x20c
push ebx
push esi
push 1
push edi
push 0x10
push 0xf01ff
push eax
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebx
jne 0x407ad6
push ebx
push str.Service_Creation_Error
push str.Failed_to_install_FLEXlm_License_Server.__Could_not_Create_Service
jmp 0x407b80
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 1
pop ebx
jmp 0x407b67
push ebx
push str.Service_Creation_Error
push str.Failed_to_install_FLEXlm_License_Server.__You_need_to_be_an_Administrator_to_perform_this_function.
jmp 0x407b80
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x407b75
lea eax, [esi + 0x40c]
push 2
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x407b55
lea eax, [esi + 0x40c]
add esi, 0x20c
push eax
push ebx
push ebx
push str.NetworkProvider
push ebx
push ebx
push esi
push 1
push edi
push 0x10
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 1
pop eax
jmp 0x407b89
push ebx
push str.Service_Creation_Error
push str.Could_not_Change_Service_to_Manual_Start
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x407a50
push ebx
push str.Service_Creation_Error
push str.Failed_to_change_FLEXlm_License_Server.__You_need_to_be_an_Administrator_to_perform_this_function.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret