Function at 0x4051f0
Capabilities:
Create service
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
push ebx
push esi
push edi
push 0xf003f
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x405253
push 1
push 0x41fe10
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
je 0x405231
push eax
mov edi, 1
call ebx
push esi
call ebx
test edi, edi
je 0x405253
push 0x41fe10
push str.The__s_service_is_already_installed_n
call fcn.004139f4
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x405286
push 0x41fe10
push str.Could_not_open_the_service_manager._Failed_to_install_the__s_service_n
call fcn.004139f4
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push 0x104
lea eax, [ebp - 0x210]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x210]
push ecx
push 1
push 2
push 0x10
push 0xf01ff
push 0x41fe10
push 0x41fe10
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x4052ee
push edi
call ebx
push 0x41fe10
push str.Couldnt_create_service._Failed_to_install_the__s_service_n
call fcn.004139f4
add esp, 8
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret
push str.Network_address_translation_for_virtual_networks
push esi
call fcn.00404ee0
add esp, 8
push esi
call ebx
push edi
call ebx
lea edx, [ebp - 4]
push edx
push 0x20019
push 0
push str.SOFTWAREVMware__Inc.VMware_Workstation
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40533f
push 0x41fe10
push str.Could_not_detect_install_path._Failed_to_install_the__s_service.__n
call fcn.004139f4
add esp, 8
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
push 0
push 0
push str.InstallPath
push edx
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x405386
push 0x41fe10
push str.Could_not_detect_install_path._Failed_to_install_the__s_service.__n
call fcn.004139f4
add esp, 8
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
jmp 0x4053a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4053a0
sub eax, edx
mov ecx, 0x103
sub ecx, eax
push ecx
push str.vmeventmsg.dll
lea edx, [ebp - 0x10c]
push 0x104
push edx
call fcn.00417ad0
push 0x41fe10
push str.SYSTEMCurrentControlSetServicesEventLogApplication_s
lea eax, [ebp - 0x314]
push 0x104
push eax
call fcn.00417b50
add esp, 0x20
push 0
lea ecx, [ebp - 4]
push ecx
push 0
push 2
push 0
push 0
push 0
lea edx, [ebp - 0x314]
push edx
push reloc.WS2_32.dll_bind
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea eax, [ebp - 0x10c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405417
sub eax, ecx
mov ecx, dword [ebp - 4]
push eax
lea eax, [ebp - 0x10c]
push eax
push 1
push 0
push str.EventMessageFile
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 4]
push edx
call esi
push 0x41fe10
push str.Successfully_installed_the__s_service_n
call fcn.004139f4
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret