Function at 0x421530
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.00442300
push ebx
push ebp
push esi
push edi
push str.softwareTECOcular.3_agentdebug
push str.Systec
mov ecx, 0x66fcd8
call fcn.00406f50
mov eax, str.softwareTECOcular.3ShareDataPrivilegeValue
test eax, eax
je 0x42158c
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x42158c
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.00441770
add esp, 0xc
mov eax, dword [0x66fd48]
xor ebx, ebx
cmp eax, ebx
je 0x4215b0
push 0x63fd50
push str.Systec
push 0xf
push 0x66fcdc
call fcn.004277c0
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 0x4215ec
push 0x103
lea ecx, [esp + 0x164]
push eax
push ecx
call fcn.00442650
add esp, 0xc
lea edx, [esp + 0x160]
push edx
call fcn.005a2131
lea eax, [esp + 0x164]
push str._cleardata
push eax
call fcn.00442850
add esp, 0xc
test eax, eax
jne 0x4216a5
lea ecx, [esp + 0x160]
push 0x63fd38
push ecx
call fcn.00442850
add esp, 8
test eax, eax
jne 0x4216a5
lea edx, [esp + 0x160]
push 0x63fd2c
push edx
call fcn.00442850
add esp, 8
test eax, eax
je 0x4216aa
mov ecx, 0x670a10
call fcn.0042e180
mov ecx, 0x670a10
call fcn.0042e020
test eax, eax
je 0x421671
mov eax, dword [0x670a28]
push 0xea60
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x66fd48], ebx
je 0x421ed2
push str.Stop
push str.Systec
push 0xf
push 0x66fcdc
call fcn.004277c0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1284
ret 0x10
call fcn.00420c00
call fcn.004783a0
test eax, eax
je 0x421722
push 0x20000000
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
je 0x421767
push 0x20010000
push str.Winhlpsvr
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
je 0x421719
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 0x42170b
cmp dword [esp + 0x3c], 1
jne 0x421712
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 0x421767
lea ecx, [esp + 0x18]
call fcn.00469d70
push 0x2001f
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x24]
call fcn.00469e90
test eax, eax
je 0x42175e
push str.Winhlpsvr
lea ecx, [esp + 0x1c]
call fcn.0046c1d0
lea ecx, [esp + 0x18]
call fcn.00469ee0
lea ecx, [esp + 0x18]
call fcn.00469e10
call fcn.00404c20
call fcn.00405110
call fcn.00420fe0
cmp eax, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
je 0x421797
lea edx, [esp + 0x20]
push edx
call fcn.00421380
mov eax, dword [esp + 0x24]
add esp, 4
cmp eax, ebx
jne 0x42179c
call fcn.00420920
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 0x633274
push edx
call fcn.00441c02
add esp, 0x10
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x570]
push str.bakwdgsvr.sys
push eax
push 0x633274
push ecx
call fcn.00441c02
lea edx, [esp + 0xc9c]
push 0x104
push edx
call fcn.004207a0
add esp, 0x18
test eax, eax
je 0x421ed2
lea eax, [esp + 0xc8c]
push str.winrdgv3.exe
push eax
lea ecx, [esp + 0x780]
push 0x633274
push ecx
call fcn.00441c02
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 0x633274
push edx
call fcn.00441c02
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.00441c02
add esp, 0xc
lea ecx, [esp + 0x38]
xor esi, esi
call fcn.00424890
push 1
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x5f6c28
call fcn.0045aaa0
lea ecx, [esp + 0x44]
call fcn.00424a80
cmp dword [esp + 0x58], 0xf0000001
jne 0x42191a
lea ecx, [esp + 0x38]
call fcn.00424eb0
mov esi, eax
lea ecx, [esp + 0x38]
call fcn.004249e0
test esi, esi
je 0x421a51
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 0x633274
push edx
stosb byte es:[edi], al
call fcn.00441c02
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x10
lea eax, [esp + 0x264]
push eax
call ebp
mov ecx, dword [0x66fd48]
test ecx, ecx
je 0x421999
push eax
push str.WinMain_1___lu_
push str.SXDebug
push 0xf
push 0x66fcdc
call fcn.004277c0
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.00441c02
add esp, 0x10
lea eax, [esp + 0x264]
push eax
call ebp
mov ebx, eax
xor eax, eax
xor esi, esi
test ebx, ebx
jne 0x421a25
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.00441c02
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 [0x66fd48]
test ecx, ecx
je 0x421a4b
push esi
push eax
push ebx
push str.WinMain_2___lu____lu____lu_
push str.SXDebug
push 0xf
push 0x66fcdc
call fcn.004277c0
add esp, 0x1c
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 6
call fcn.00401e80
push eax
call fcn.004202b0
add esp, 8
call fcn.00402360
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x421a84
push 6
call fcn.00402360
push eax
call fcn.004202b0
add esp, 8
jmp 0x421a9a
call fcn.004dd690
push eax
push 4
call fcn.00402360
push eax
call fcn.0040fa00
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 0x421b73
lea eax, [esp + 0x5c]
push esi
push eax
lea ecx, [esp + 0xb90]
push 0x633274
push ecx
call fcn.00441c02
add esp, 0x10
push esi
call fcn.00401da0
push eax
lea edx, [esp + 0x884]
push 0x633274
push edx
call fcn.00441c02
add esp, 0x10
lea eax, [esp + 0x87c]
lea ecx, [esp + 0xb88]
push 0
push eax
push ecx
call ebx
mov eax, dword [0x66fd48]
test eax, eax
je 0x421b73
lea edx, [esp + 0x87c]
lea ecx, [esp + 0x14]
push edx
call fcn.0045a990
mov eax, dword [eax]
lea ecx, [esp + 0xb88]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.0045a990
mov edx, dword [eax]
push edx
push edi
push str.WinMain_3__i_d__Src_s__Dst_s_
push str.systec
push 0xf
push 0x66fcdc
call fcn.004277c0
add esp, 0x1c
lea ecx, [esp + 0x10]
call fcn.0045b310
lea ecx, [esp + 0x14]
call fcn.0045b310
inc edi
add ebp, 4
cmp edi, 4
jb 0x421ac0
lea eax, [esp + 0x5c]
push str.baksdoeav.sys
push eax
lea ecx, [esp + 0xa8c]
push 0x633274
push ecx
call fcn.00441c02
add esp, 0x10
push str.oeaviewer.e32
call fcn.00401e80
push eax
lea edx, [esp + 0x988]
push 0x633274
push edx
call fcn.00441c02
add esp, 0x10
xor esi, esi
lea eax, [esp + 0x980]
lea ecx, [esp + 0xa84]
push esi
push eax
push ecx
call ebx
cmp dword [0x66fd48], esi
je 0x421c2f
lea edx, [esp + 0x980]
lea ecx, [esp + 0x10]
push edx
call fcn.0045a990
mov eax, dword [eax]
lea ecx, [esp + 0xa84]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0045a990
mov edx, dword [eax]
push edx
push str.WinMain_4___s___s_
push str.systec
push 0xf
push 0x66fcdc
call fcn.004277c0
add esp, 0x18
lea ecx, [esp + 0x14]
call fcn.0045b310
lea ecx, [esp + 0x10]
call fcn.0045b310
mov ebx, 1
push esi
push ebx
push ebx
push esi
call fcn.0043bcc0
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp eax, esi
je 0x421c56
mov eax, dword [esp + 0x20]
push eax
push ebx
call fcn.00439700
add esp, 8
call fcn.004783a0
test eax, eax
je 0x421e4a
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 0x421eb2
push 0xf01ff
push str..Winhlpsvr
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x421d37
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 0x421e01
lea ecx, [esp + 0x24]
push ecx
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov dword [esp + 0x10], eax
jmp 0x421e01
push esi
call fcn.00420e80
add esp, 4
test eax, eax
jne 0x421d56
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 0x421e01
cmp dword [esp + 0xe98], 2
jne 0x421ddd
mov eax, dword [esp + 0xea0]
test eax, eax
je 0x421ddd
lea edx, [esp + 0x368]
push edx
push eax
call fcn.0044232f
add esp, 8
test eax, eax
jne 0x421ddd
mov eax, dword [esp + 0xea4]
test eax, eax
je 0x421ddd
push str..OcularServices
push eax
call fcn.0044232f
add esp, 8
test eax, eax
je 0x421e01
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 [0x66fd48]
test eax, eax
je 0x421e28
mov ecx, dword [esp + 0x10]
push ecx
push str.WinMain_3___d_
push str.ServConf
push 0xf
push 0x66fcdc
call fcn.004277c0
add esp, 0x14
call fcn.00420dc0
test esi, esi
je 0x421e3c
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 0x421eb2
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 0x421e9b
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, 0x670a10
call fcn.0042e020
test eax, eax
je 0x421ed2
mov ecx, dword [0x670a28]
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