Function at 0x434aa0
Capabilities:
Delete service
Persist via run registry key
Query service status
Stop service

Disassembly:
sub esp, 0x24
push esi
call fcn.004211f0
push str.z2_R2PC_Server_Helper
push 0
push 0x23bb
call fcn.004261d0
push str.z2SoftwareKeyFile.Document
push 0x458ee0
call fcn.00444a90
mov eax, dword [0x468808]
add esp, 0x14
cmp eax, 1
jne 0x434b63
lea eax, [esp + 4]
push eax
push 0x457360
push 0x80000002
call dword [0x462bf0]
test eax, eax
je 0x434b17
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x434b0f
push 0x30
push str.z2_R2PC_Server
push str.The_Service_Control_Manager_could_not_be_contacted___the_Agent_service_was_not_unregistered
push 0
call dword [0x462ce0]
or eax, 0xffffffff
pop esi
add esp, 0x24
ret
mov ecx, dword [esp + 4]
push str.z2_R2PC_Server_Helper
push ecx
call dword [0x462be0]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x434b54
mov edx, dword [esp + 4]
push edx
call esi
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x434b54
push 0x30
push str.z2_R2PC_Server
push str.z2_R2PC_service_could_not_be_unregistered
push 0
call dword [0x462ce0]
mov eax, dword [esp + 4]
push eax
call esi
or eax, 0xffffffff
pop esi
add esp, 0x24
ret
cmp eax, 2
jne 0x434d3f
push ebx
push ebp
lea ecx, [esp + 0xc]
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [0x462bf0]
test eax, eax
mov ebp, dword [0x462ce0]
jne 0x434bc5
mov edx, dword [esp + 0xc]
push str.z2_R2PC_Server_Helper
push edx
call dword [0x462be0]
test eax, eax
mov ebx, dword [esp + 0x34]
je 0x434bb8
test ebx, ebx
jne 0x434bb8
push 0x30
push str.z2_R2PC_Server
push str.WARNING:The_ServiceHelper_hook_entry_could_not_be_removed_from_the_registry
push ebx
call ebp
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x434bc9
mov ebx, dword [esp + 0x34]
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
je 0x434d29
push 0xf01ff
push str.z2_R2PC_Server
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x434d05
lea ecx, [esp + 0x18]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x434c6c
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea edx, [esp + 0x18]
push edx
push esi
call edi
test eax, eax
je 0x434c4e
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
cmp dword [esp + 0x1c], 3
jne 0x434c4a
push 0x3e8
call ebx
lea eax, [esp + 0x18]
push eax
push esi
call edi
test eax, eax
jne 0x434c30
mov ebx, dword [esp + 0x38]
cmp dword [esp + 0x1c], 1
je 0x434c68
test ebx, ebx
jne 0x434c68
push 0x30
push str.z2_R2PC_Server
push str.z2_R2PC_service_could_not_be_stopped
push ebx
call ebp
mov edi, dword [esp + 0x14]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x434ca2
test ebx, ebx
jne 0x434ca2
push 0x40
push str.z2_R2PC_Server
push str.z2_R2PC_service_has_been_deleted
push ebx
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x24
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x430
jne 0x434cda
test ebx, ebx
jne 0x434ced
push 0x30
push str.z2_R2PC_Server
push str.z2_R2PC_service_is_already_marked_to_be_unregistered
push ebx
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x24
ret
test ebx, ebx
jne 0x434ced
push 0x30
push str.z2_R2PC_Server
push str.z2_R2PC_service_could_not_be_unregistered
push ebx
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x24
ret
test ebx, ebx
jne 0x434d18
push 0x30
push str.z2_R2PC_Server
push str.z2_R2PC_service_could_not_be_found
push ebx
call ebp
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x24
ret
test ebx, ebx
jne 0x434d3c
push 0x30
push str.z2_R2PC_Server
push str.The_Service_Control_Manager_could_not_be_contacted___the_Agent_service_was_not_unregistered
push ebx
call ebp
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x24
ret