Function at 0x457750
Capabilities:
Check os version
Modify service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d4a58
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2320
call fcn.004c3c90
mov eax, dword [0x5254e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor edi, edi
lea eax, [ebp - 0x21c0]
mov dword [ebp - 0x21fc], edi
push eax
lea esi, [edi + 2]
mov dword [ebp - 0x21c0], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
je 0x4577b5
cmp dword [ebp - 0x21bc], 6
ja 0x4577c7
cmp dword [ebp - 0x21bc], 6
jne 0x4577cc
cmp dword [ebp - 0x21b8], 1
jb 0x4577cc
mov esi, 3
mov eax, 3
mov dword [ebp - 0x2038], str.IKEEXT
mov dword [ebp - 0x2034], 2
mov dword [ebp - 0x2030], str.PolicyAgent
mov dword [ebp - 0x202c], esi
mov dword [ebp - 0x2028], str.RasMan
mov dword [ebp - 0x2024], eax
mov dword [ebp - 0x2020], str.TapiSrv
mov dword [ebp - 0x201c], eax
mov dword [ebp - 0x21c8], edi
jmp 0x457820
cmp dword [ebp - 0x21c8], 4
jae 0x458122
mov dword [ebp - 0x22b8], 0x4fca94
mov dword [ebp - 0x22a8], 0x4e4be8
xor esi, esi
mov dword [ebp - 4], esi
or dword [ebp - 0x21fc], 1
lea ecx, [ebp - 0x2258]
mov dword [ebp - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov dword [ebp - 0x22b0], esi
mov dword [ebp - 0x22ac], esi
call fcn.00401780
lea ecx, [ebp - 0x22a0]
lea edx, [ebp - 0x2208]
mov dword [ebp - 0x2220], ecx
push edx
lea ecx, [ebp - 0x2258]
mov dword [ebp - 0x221c], esi
call fcn.00401740
push eax
mov dword [ebp - 4], 3
call fcn.0040b6e0
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x2208]
add esp, 4
mov ebx, eax
cmp edi, esi
je 0x4578f2
push esi
lea ecx, [ebp - 0x2204]
call fcn.004983a4
mov eax, dword [edi + 4]
cmp eax, esi
jbe 0x4578ce
cmp eax, 0xffffffff
jae 0x4578ce
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [ebp - 0x2204]
not esi
call fcn.004983cc
and esi, edi
je 0x4578f0
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
xor esi, esi
mov eax, dword [ebx]
mov edx, dword [eax + 0x18]
push 0x20
mov ecx, ebx
call edx
mov byte [ebp - 0x2218], al
cmp dword [ebp - 0x2220], esi
jne 0x457921
mov eax, dword [ebp - 0x224c]
or eax, 4
push esi
push eax
lea ecx, [ebp - 0x2258]
call fcn.00401640
mov eax, dword [ebp - 0x22a8]
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov edx, dword [ebp - 0x22b8]
mov eax, dword [edx + 4]
mov dword [ebp + eax - method.std::basic_iostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov dword [ebp - 4], 6
mov ecx, dword [ebp - 0x22b8]
mov edx, dword [ecx + 4]
lea ecx, [ebp - 0x22a0]
mov dword [ebp + edx - method.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
call fcn.0040a560
mov dword [ebp - method.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov dword [ebp - 0x2264], esi
mov dword [ebp - 0x2260], esi
push SysReAllocString
push esi
mov dword [ebp - 4], 8
push esi
mov dword [ebp - 0x21cc], esi
mov byte [ebp - 4], 9
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x21f0], edi
cmp edi, esi
jne 0x457a33
lea eax, [ebp - 0x22a8]
push str.OpenSCManager_failed__
push eax
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea ecx, [ebp - 0x2054]
push ecx
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0xa
cmp dword [eax + 0x14], 0x10
jb 0x457a0a
mov edx, dword [eax]
mov dword [ebp - 0x21e8], edx
jmp 0x457a10
mov dword [ebp - 0x21e8], eax
lea eax, [ebp - 0x21e8]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.004a936f
push 0x515244
lea ecx, [ebp - 0x22e0]
push ecx
call fcn.004aba66
mov ebx, dword [ebp - 0x21c8]
mov eax, dword [ebp + ebx*8 - 0x2038]
push 5
push eax
push edi
mov dword [ebp - 0x21f4], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x21cc], esi
test esi, esi
jne 0x457b24
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call edi
cmp eax, 0x424
jne 0x457aa8
or esi, 0xffffffff
lea ecx, [ebp - 0x2258]
mov dword [ebp - 4], esi
call fcn.0041cc10
lea edx, [ebp - 0x2258]
push edx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00497fcd
add esp, 4
inc ebx
mov dword [ebp - 4], esi
mov dword [ebp - 0x21c8], ebx
jmp 0x457820
lea eax, [ebp - 0x22a8]
push str.OpenService_failed__
push eax
call fcn.0040b990
add esp, 8
mov esi, eax
call edi
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea ecx, [ebp - 0x2054]
push ecx
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0xb
cmp dword [eax + 0x14], 0x10
jb 0x457afb
mov edx, dword [eax]
mov dword [ebp - 0x21d4], edx
jmp 0x457b01
mov dword [ebp - 0x21d4], eax
lea eax, [ebp - 0x21d4]
push eax
lea ecx, [ebp - 0x2310]
call fcn.004a936f
push 0x515244
lea ecx, [ebp - 0x2310]
push ecx
call fcn.004aba66
lea edx, [ebp - 0x2200]
push edx
push 0x2000
lea eax, [ebp - 0x2018]
push eax
push esi
mov dword [ebp - 0x2200], 0x2000
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x457bc4
lea ecx, [ebp - 0x22a8]
push str.QueryServiceConfig_failed__
push ecx
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x2054]
push edx
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0xc
cmp dword [eax + 0x14], 0x10
jb 0x457b9b
mov eax, dword [eax]
lea ecx, [ebp - 0x21dc]
push ecx
lea ecx, [ebp - 0x2328]
mov dword [ebp - 0x21dc], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x2328]
push edx
call fcn.004aba66
lea eax, [ebp - 0x20a8]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x457c4e
lea ecx, [ebp - 0x22a8]
push str.QueryServiceStatus_failed__
push ecx
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x2054]
push edx
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0xd
cmp dword [eax + 0x14], 0x10
jb 0x457c25
mov eax, dword [eax]
lea ecx, [ebp - 0x21e4]
push ecx
lea ecx, [ebp - 0x2304]
mov dword [ebp - 0x21e4], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x2304]
push edx
call fcn.004aba66
mov eax, dword [ebp - 0x2014]
cmp eax, 2
je 0x457c69
mov byte [ebp - 0x21c1], 1
cmp dword [ebp + ebx*8 - 0x2034], eax
jne 0x457c70
mov byte [ebp - 0x21c1], 0
mov ebx, dword [ebp + ebx*8 - 0x2034]
mov dword [ebp - 0x220c], ebx
cmp ebx, 2
jne 0x457c92
cmp dword [ebp - 0x20a4], 4
mov byte [ebp - 0x21c2], 1
jne 0x457c99
mov byte [ebp - 0x21c2], 0
cmp byte [ebp - 0x21c1], 0
jne 0x457caf
cmp byte [ebp - 0x21c2], 0
je 0x4580c2
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x21f0], edi
test edi, edi
jne 0x457dca
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
cmp eax, 5
jne 0x457d4b
mov eax, dword [ebp - 0x21f4]
push eax
lea ecx, [ebp - 0x2070]
call fcn.0041f060
lea eax, [ebp - 0x2070]
lea esi, [ebp - 0x208c]
mov byte [ebp - 4], 0xe
call fcn.004500d0
mov esi, eax
lea ecx, [ebp - 0x22a8]
push str.insufficient_privileges_to_configure_or_start_service
push ecx
mov byte [ebp - 4], 0xf
call fcn.0040b990
add esp, 8
push esi
push eax
call fcn.0040bc40
add esp, 8
lea ecx, [ebp - 0x208c]
call fcn.00406910
lea ecx, [ebp - 0x2070]
mov byte [ebp - 4], 9
call fcn.00428ed0
jmp 0x457d78
lea edx, [ebp - 0x22a8]
push str.OpenSCManager_failed__
push edx
call fcn.0040b990
add esp, 8
mov edi, eax
call esi
push eax
push edi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea eax, [ebp - 0x2054]
push eax
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov ecx, 0x10
mov byte [ebp - 4], cl
cmp dword [eax + 0x14], ecx
jb 0x457da1
mov ecx, dword [eax]
mov dword [ebp - 0x21ec], ecx
jmp 0x457da7
mov dword [ebp - 0x21ec], eax
lea edx, [ebp - 0x21ec]
push edx
lea ecx, [ebp - 0x22c8]
call fcn.004a936f
push 0x515244
lea eax, [ebp - 0x22c8]
push eax
call fcn.004aba66
push esi
call ebx
mov ecx, dword [ebp - 0x21f4]
push 0x16
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x21cc], esi
test esi, esi
jne 0x457e6d
lea edx, [ebp - 0x22a8]
push str.OpenService_failed__
push edx
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea eax, [ebp - 0x2054]
push eax
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0x11
cmp dword [eax + 0x14], 0x10
jb 0x457e44
mov ecx, dword [eax]
mov dword [ebp - 0x21d0], ecx
jmp 0x457e4a
mov dword [ebp - 0x21d0], eax
lea edx, [ebp - 0x21d0]
push edx
lea ecx, [ebp - 0x22ec]
call fcn.004a936f
push 0x515244
lea eax, [ebp - 0x22ec]
push eax
call fcn.004aba66
cmp byte [ebp - 0x21c1], 0
je 0x457f22
mov ecx, dword [ebp - 0x220c]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ecx
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x457f22
lea edx, [ebp - 0x22a8]
push str.ChangeServiceConfig_failed__
push edx
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea eax, [ebp - 0x2054]
push eax
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0x12
cmp dword [eax + 0x14], 0x10
jb 0x457ef9
mov ecx, dword [eax]
mov dword [ebp - 0x21d8], ecx
jmp 0x457eff
mov dword [ebp - 0x21d8], eax
lea edx, [ebp - 0x21d8]
push edx
lea ecx, [ebp - 0x231c]
call fcn.004a936f
push 0x515244
lea eax, [ebp - 0x231c]
push eax
call fcn.004aba66
cmp byte [ebp - 0x21c2], 0
je 0x4580c2
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x457fb6
lea ecx, [ebp - 0x22a8]
push str.StartService_failed__
push ecx
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x2054]
push edx
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0x13
cmp dword [eax + 0x14], 0x10
jb 0x457f8d
mov eax, dword [eax]
lea ecx, [ebp - 0x21f8]
push ecx
lea ecx, [ebp - 0x22d4]
mov dword [ebp - 0x21f8], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x22d4]
push edx
call fcn.004aba66
xor ebx, ebx
jmp 0x457fc0
cmp ebx, 0x14
jge 0x4580c2
lea eax, [ebp - 0x2054]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x45810b
lea ecx, [ebp - 0x22a8]
push str.QueryServiceStatus_failed__
push ecx
call fcn.0040b990
add esp, 8
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.0041c210
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x208c]
push edx
lea ecx, [ebp - 0x22b8]
call fcn.0041cca0
mov byte [ebp - 4], 0x14
cmp dword [eax + 0x14], 0x10
jb 0x45802e
mov eax, dword [eax]
lea ecx, [ebp - 0x21e0]
push ecx
lea ecx, [ebp - 0x22f8]
mov dword [ebp - 0x21e0], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x22f8]
push edx
call fcn.004aba66
push str.Fix_VPN_Services_failed:
lea ecx, [ebp - 0x2070]
call fcn.00406870
mov esi, eax
mov byte [ebp - 4], 0x16
mov ecx, dword [ebp - 0x22bc]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
push eax
lea eax, [ebp - 0x208c]
push esi
push eax
call fcn.0040b870
add esp, 0xc
push eax
push 0
mov byte [ebp - 4], 0x17
call fcn.00432700
add esp, 8
lea ecx, [ebp - 0x208c]
call fcn.00406910
lea ecx, [ebp - 0x2070]
call fcn.00406910
mov eax, 0x4580b6
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
lea ecx, [ebp - 0x2258]
mov dword [ebp - 4], 0xffffffff
call fcn.0041cc10
lea ecx, [ebp - 0x2258]
push ecx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00497fcd
mov ebx, dword [ebp - 0x21c8]
add esp, 4
inc ebx
mov dword [ebp - 0x21c8], ebx
jmp 0x457820
cmp dword [ebp - 0x2050], 2
jne 0x4580c2
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
inc ebx
jmp 0x457fc0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a91d2
mov esp, ebp
pop ebp
ret