Function at 0x46a170
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x68893b
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x7851cc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x234], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x240], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x238], eax
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x46a219
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.004648e0
add esp, 8
jmp 0x46a367
push 1
push 0x6d2b40
lea ecx, [ebp - 0x230]
call fcn.0045e220
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46a234
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.0046a530
push 1
push 0x6d2b40
lea ecx, [ebp - 0x230]
call fcn.0046a530
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x46a293
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.004648e0
add esp, 8
jmp 0x46a367
push dword [ebp - 0x238]
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push dword [ebp - 0x23c]
cmovae eax, dword [ebp - 0x230]
push dword [ebp - 0x240]
push 0
push 0
push eax
push 1
push dword [ebp - 0x234]
push 0x10
push 0xf01ff
push esi
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x46a314
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed_w_err_0x_08lx_n
call fcn.004648e0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AGMSerice_Service_Install_Failed_...08lx
push esi
push 4
push str.AGCDirectoryWatcher
push dword [0x78b310]
call fcn.0047e390
add esp, 0x18
jmp 0x46a355
lea eax, [ebp - 0x234]
mov dword [ebp - 0x234], 0x6d49d8
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push ebx
push str._s_is_installed._n
call fcn.004648e0
push str.AGMSerice_Service_Installed_...
push 0
push 4
push str.AGCDirectoryWatcher
push dword [0x78b310]
call fcn.0047e390
add esp, 0x1c
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x46a367
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x46a3a3
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46a399
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46a3bf
push edx
push ecx
call fcn.0062706d
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0062702c
mov esp, ebp
pop ebp
ret
call fcn.00646804
int3