Function at 0x409810
Capabilities:
Delete service
Get common file path
Stop service
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [0x43c08c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x43cf80], 0
push esi
mov esi, dword [ebp + 0x10]
mov dword [0x43cf84], 0
mov dword [0x43cf88], 0x10
mov dword [0x43cf8c], 1
mov dword [0x43cf90], 1
mov dword [0x43cf94], 0
mov dword [0x43cf98], 0
mov dword [0x43cf9c], 0
mov dword [0x43cfa0], 0
jne 0x40997e
lea eax, [ebp - 0x804]
push eax
push 0
push 0
push 0x8023
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x409909
push str.zonghengkelogs_
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.00413dd7
push str.YZAgentServiceShell.txt
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.00413dd7
push 0xf0
call fcn.0040af70
add esp, 0x1c
test eax, eax
je 0x4098ef
push 1
lea ecx, [ebp - 0x804]
push ecx
mov ecx, eax
call fcn.00407080
jmp 0x4098f1
xor eax, eax
mov dword [0x43cf80], eax
cmp byte [eax + 0xc8], 0
je 0x409909
mov dword [eax + 0xe4], 3
cmp dword [0x43cf80], 0
jne 0x40997e
push edi
push 0xf0
call fcn.0040af70
mov edi, eax
add esp, 4
test edi, edi
je 0x409975
push 1
lea ecx, [edi + 8]
mov dword [edi], vtable.CLog.0
call fcn.00406e90
mov byte [edi + 0xc8], 0
mov dword [edi + 0xdc], 0
mov dword [edi + 0xe0], 0xf
mov byte [edi + 0xcc], 0
mov dword [edi + 0xe4], 1
mov byte [edi + 0xe8], 1
mov dword [edi + 0xec], 0xa00000
jmp 0x409977
xor edi, edi
mov dword [0x43cf80], edi
pop edi
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409983
sub ecx, edx
sar ecx, 1
je 0x409b15
push 0x42a3fc
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
je 0x409aa5
push 0x42a410
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
jne 0x409aa5
push str._service
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
je 0x409aa5
push str._install
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
jne 0x409aa5
push 0x42a458
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
je 0x409a3c
push 0x42a470
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
je 0x409a3c
push str._uninstall
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
je 0x409a3c
push str._unreg
push esi
call fcn.00413e4c
add esp, 8
test eax, eax
jne 0x409abf
push 0x42a4a8
push 3
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
jne 0x409a7b
push str._Uninstall_
push 1
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
jmp 0x409abf
push 0x10020
push section..data
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push 0x43cf88
mov esi, eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
jmp 0x409abf
push 0x42a44c
push 3
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
call fcn.00408610
mov eax, dword [0x43cfa4]
test eax, eax
je 0x409ad9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x43cfa4], 0
mov ecx, dword [0x43cf80]
test ecx, ecx
je 0x409b02
call fcn.00407630
mov ecx, dword [0x43cf80]
test ecx, ecx
je 0x409af8
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [0x43cf80], 0
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040afb3
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x43cfa4], eax
test eax, eax
jne 0x409b8d
push 0x43cf88
push dword [0x43cf84]
mov dword [0x43cf8c], 1
mov dword [0x43cf94], eax
mov dword [0x43cfa0], eax
mov dword [0x43cf90], 1
mov dword [0x43cf9c], eax
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push str.CreateEvent
push 3
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
call fcn.00408840
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0040afb3
mov esp, ebp
pop ebp
ret 0x10
push 0x42a4c8
push 3
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
mov dword [ebp - 0x814], 0x43c000
lea eax, [ebp - 0x814]
mov dword [ebp - 0x810], 0x4089a0
mov dword [ebp - 0x80c], 0
mov dword [ebp - 0x808], 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x409bf0
push str.__tWinMain_StartServiceCtrlDispatcher
push 3
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
push str.__tWinMain_
push 3
push dword [0x43cf80]
call fcn.00407770
add esp, 0xc
call fcn.00408840
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]