Function at 0x4212a0
Capabilities:
Check if file exists
Copy file
Create process on windows
Create service
Delete file
Delete service
Get common file path
Get file attributes
Modify service
Move file
Persist via run registry key
Persist via windows service
Query service configuration
Set registry value
Start service
Stop service

Disassembly:
mov eax, 0x1284
call fcn.00442090
push ebx
push ebp
push esi
push edi
push str.softwareTECOcular.3_agentdebug
push str.Systec
mov ecx, 0x664688
call fcn.00406cc0
mov eax, str.softwareTECOcular.3ShareDataPrivilegeValue
test eax, eax
je 0x4212fc
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4212fc
mov ecx, 0x40
mov edi, str.SOFTWARETECOcular.3ShareDataPrivilegeValue
push 0xff
push str.softwareTECOcular.3ShareDataPrivilegeValue
rep stosd dword es:[edi], eax
push str.SOFTWARETECOcular.3ShareDataPrivilegeValue
call fcn.00441500
add esp, 0xc
mov eax, dword [0x6646f8]
xor ebx, ebx
cmp eax, ebx
je 0x421320
push 0x634ce4
push str.Systec
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x10
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x161]
mov byte [esp + 0x160], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x12a0]
cmp eax, ebx
je 0x42135c
push 0x103
lea ecx, [esp + 0x164]
push eax
push ecx
call fcn.004423e0
add esp, 0xc
lea edx, [esp + 0x160]
push edx
call fcn.005999f1
lea eax, [esp + 0x164]
push str._cleardata
push eax
call fcn.004425e0
add esp, 0xc
test eax, eax
jne 0x421415
lea ecx, [esp + 0x160]
push 0x634ccc
push ecx
call fcn.004425e0
add esp, 8
test eax, eax
jne 0x421415
lea edx, [esp + 0x160]
push 0x634cc0
push edx
call fcn.004425e0
add esp, 8
test eax, eax
je 0x42141a
mov ecx, 0x6653c0
call fcn.0042def0
mov ecx, 0x6653c0
call fcn.0042dd90
test eax, eax
je 0x4213e1
mov eax, dword [0x6653d8]
push 0xea60
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x6646f8], ebx
je 0x421c42
push str.Stop
push str.Systec
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1284
ret 0x10
call fcn.00420970
call fcn.00478130
test eax, eax
je 0x421492
push 0x20000000
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
je 0x4214d7
push 0x20010000
push str.Winhlpsvr
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
je 0x421489
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x3c]
mov dword [esp + 0x38], ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x38]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
cmp eax, ebx
jne 0x42147b
cmp dword [esp + 0x3c], 1
jne 0x421482
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4214d7
lea ecx, [esp + 0x18]
call fcn.00469b00
push 0x2001f
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x24]
call fcn.00469c20
test eax, eax
je 0x4214ce
push str.Winhlpsvr
lea ecx, [esp + 0x1c]
call fcn.0046bf60
lea ecx, [esp + 0x18]
call fcn.00469c70
lea ecx, [esp + 0x18]
call fcn.00469ba0
call fcn.00404990
call fcn.00404e80
call fcn.00420d50
cmp eax, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
je 0x421507
lea edx, [esp + 0x20]
push edx
call fcn.004210f0
mov eax, dword [esp + 0x24]
add esp, 4
cmp eax, ebx
jne 0x42150c
call fcn.00420690
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x675]
mov byte [esp + 0x674], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x571]
mov byte [esp + 0x570], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x5d]
mov byte [esp + 0x5c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x5c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x5c]
push str.bakrdgv3.sys
push ecx
lea edx, [esp + 0x67c]
push 0x628274
push edx
call fcn.00441992
add esp, 0x10
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x570]
push str.bakwdgsvr.sys
push eax
push 0x628274
push ecx
call fcn.00441992
lea edx, [esp + 0xc9c]
push 0x104
push edx
call fcn.00420510
add esp, 0x18
test eax, eax
je 0x421c42
lea eax, [esp + 0xc8c]
push str.winrdgv3.exe
push eax
lea ecx, [esp + 0x780]
push 0x628274
push ecx
call fcn.00441992
add esp, 0x10
lea edx, [esp + 0x778]
lea eax, [esp + 0x674]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
push edx
push eax
call ebx
lea ecx, [esp + 0xc8c]
push str.winwdgsvr.exe
push ecx
lea edx, [esp + 0xd98]
push 0x628274
push edx
call fcn.00441992
add esp, 0x10
lea eax, [esp + 0xd90]
lea ecx, [esp + 0x570]
push 0
push eax
push ecx
call ebx
lea edx, [esp + 0x778]
lea eax, [esp + 0x368]
push edx
push str.__s_
push eax
call fcn.00441992
add esp, 0xc
lea ecx, [esp + 0x38]
xor esi, esi
call fcn.00424600
push 1
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x5edc28
call fcn.0045a830
lea ecx, [esp + 0x44]
call fcn.004247f0
cmp dword [esp + 0x58], 0xf0000001
jne 0x42168a
lea ecx, [esp + 0x38]
call fcn.00424c20
mov esi, eax
lea ecx, [esp + 0x38]
call fcn.00424750
test esi, esi
je 0x4217c1
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x265]
mov byte [esp + 0x264], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x5c]
push str.bakowv3.sys
stosw word es:[edi], ax
push ecx
lea edx, [esp + 0x26c]
push 0x628274
push edx
stosb byte es:[edi], al
call fcn.00441992
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x10
lea eax, [esp + 0x264]
push eax
call ebp
mov ecx, dword [0x6646f8]
test ecx, ecx
je 0x421709
push eax
push str.WinMain_1___lu_
push str.SXDebug
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x14
lea ecx, [esp + 0x5c]
push str.msowcnv3.dll
push ecx
lea edx, [esp + 0x26c]
push str._s_system32_s
push edx
call fcn.00441992
add esp, 0x10
lea eax, [esp + 0x264]
push eax
call ebp
mov ebx, eax
xor eax, eax
xor esi, esi
test ebx, ebx
jne 0x421795
mov ecx, 0x40
lea edi, [esp + 0x46d]
mov byte [esp + 0x46c], bl
push str.remowv3.dll
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x60]
lea edx, [esp + 0x470]
stosw word es:[edi], ax
push ecx
push str._s_system32_s
push edx
stosb byte es:[edi], al
call fcn.00441992
add esp, 0x10
lea eax, [esp + 0x46c]
push eax
call ebp
lea ecx, [esp + 0x46c]
lea edx, [esp + 0x264]
push ecx
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [0x6646f8]
test ecx, ecx
je 0x4217bb
push esi
push eax
push ebx
push str.WinMain_2___lu____lu____lu_
push str.SXDebug
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x1c
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 6
call fcn.00401e80
push eax
call fcn.00420020
add esp, 8
call fcn.00402360
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4217f4
push 6
call fcn.00402360
push eax
call fcn.00420020
add esp, 8
jmp 0x42180a
call fcn.004dd210
push eax
push 4
call fcn.00402360
push eax
call fcn.0040f770
add esp, 0xc
mov dword [esp + 0x24], str.Agt3Tool.exe
mov dword [esp + 0x28], str.bakstec3.sys
mov dword [esp + 0x2c], str.bakdevctrl64.sys
mov dword [esp + 0x30], str.bakrdgv3.sys
xor edi, edi
lea ebp, [esp + 0x24]
mov esi, dword [ebp]
test esi, esi
je 0x4218e3
lea eax, [esp + 0x5c]
push esi
push eax
lea ecx, [esp + 0xb90]
push 0x628274
push ecx
call fcn.00441992
add esp, 0x10
push esi
call fcn.00401da0
push eax
lea edx, [esp + 0x884]
push 0x628274
push edx
call fcn.00441992
add esp, 0x10
lea eax, [esp + 0x87c]
lea ecx, [esp + 0xb88]
push 0
push eax
push ecx
call ebx
mov eax, dword [0x6646f8]
test eax, eax
je 0x4218e3
lea edx, [esp + 0x87c]
lea ecx, [esp + 0x14]
push edx
call fcn.0045a720
mov eax, dword [eax]
lea ecx, [esp + 0xb88]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.0045a720
mov edx, dword [eax]
push edx
push edi
push str.WinMain_3__i_d__Src_s__Dst_s_
push str.systec
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x1c
lea ecx, [esp + 0x10]
call fcn.0045b0a0
lea ecx, [esp + 0x14]
call fcn.0045b0a0
inc edi
add ebp, 4
cmp edi, 4
jb 0x421830
lea eax, [esp + 0x5c]
push str.baksdoeav.sys
push eax
lea ecx, [esp + 0xa8c]
push 0x628274
push ecx
call fcn.00441992
add esp, 0x10
push str.oeaviewer.e32
call fcn.00401e80
push eax
lea edx, [esp + 0x988]
push 0x628274
push edx
call fcn.00441992
add esp, 0x10
xor esi, esi
lea eax, [esp + 0x980]
lea ecx, [esp + 0xa84]
push esi
push eax
push ecx
call ebx
cmp dword [0x6646f8], esi
je 0x42199f
lea edx, [esp + 0x980]
lea ecx, [esp + 0x10]
push edx
call fcn.0045a720
mov eax, dword [eax]
lea ecx, [esp + 0xa84]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0045a720
mov edx, dword [eax]
push edx
push str.WinMain_4___s___s_
push str.systec
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x18
lea ecx, [esp + 0x14]
call fcn.0045b0a0
lea ecx, [esp + 0x10]
call fcn.0045b0a0
mov ebx, 1
push esi
push ebx
push ebx
push esi
call fcn.0043ba50
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp eax, esi
je 0x4219c6
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.00439490
add esp, 8
call fcn.00478130
test eax, eax
je 0x421bba
xor ecx, ecx
push 0xf003f
mov dword [esp + 0x2c], ecx
lea edx, [esp + 0x3c]
mov dword [esp + 0x30], ecx
push esi
mov dword [esp + 0x38], ecx
push esi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], 0x3f480
mov dword [esp + 0x48], 0xea60
mov dword [esp + 0x44], ebx
mov dword [esp + 0x50], 0x1d4c0
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x3c], 3
mov dword [esp + 0x40], edx
mov dword [esp + 0x38], esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, esi
je 0x421c22
push 0xf01ff
push str..Winhlpsvr
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x421aa7
push eax
push eax
push eax
push eax
lea eax, [esp + 0x378]
push str..OcularServices
push eax
push ebx
push 2
push 0x110
push 0xf01ff
push str.Windows_Helper_Service
push str..Winhlpsvr
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
je 0x421b71
lea ecx, [esp + 0x24]
push ecx
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov dword [esp + 0x10], eax
jmp 0x421b71
push esi
call fcn.00420bf0
add esp, 4
test eax, eax
jne 0x421ac6
lea edx, [esp + 0x24]
push edx
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov dword [esp + 0x10], eax
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xe95]
mov byte [esp + 0xe94], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x18]
lea ecx, [esp + 0xe94]
push eax
push 0x400
push ecx
push esi
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x421b71
cmp dword [esp + 0xe98], 2
jne 0x421b4d
mov eax, dword [esp + 0xea0]
test eax, eax
je 0x421b4d
lea edx, [esp + 0x368]
push edx
push eax
call fcn.004420bf
add esp, 8
test eax, eax
jne 0x421b4d
mov eax, dword [esp + 0xea4]
test eax, eax
je 0x421b4d
push str..OcularServices
push eax
call fcn.004420bf
add esp, 8
test eax, eax
je 0x421b71
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x37c]
push str..OcularServices
push eax
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov eax, dword [0x6646f8]
test eax, eax
je 0x421b98
mov ecx, dword [esp + 0x10]
push ecx
push str.WinMain_3___d_
push str.ServConf
push 0xf
push 0x66468c
call fcn.00427530
add esp, 0x14
call fcn.00420b30
test esi, esi
je 0x421bac
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
jmp 0x421c22
lea edx, [esp + 0x10]
mov dword [esp + 0x10], esi
push edx
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x421c0b
lea edi, [esp + 0x368]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x368]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push ebx
push esi
push str..Winhlpsvr
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
push esi
lea eax, [esp + 0x780]
push esi
push eax
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, 0x6653c0
call fcn.0042dd90
test eax, eax
je 0x421c42
mov ecx, dword [0x6653d8]
push 0xea60
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1284
ret 0x10