Function at 0x4031e0
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58464f
mov eax, dword fs:[0]
push eax
sub esp, 0x514
mov eax, dword [0x615000]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x34], 0
xor eax, eax
mov word [ebp - 0x44c], ax
push 0x40e
push 0
lea ecx, [ebp - 0x44a]
push ecx
call fcn.00562540
add esp, 0xc
push 0x207
lea edx, [ebp - 0x44c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40327c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5fc614
push str.Err:_Unable_to_install__s___GetModuleFileName_code_d_n
push 0x5fc69c
call fcn.0040c050
add esp, 0x10
xor eax, eax
jmp 0x403503
push str.__AutoRun1
lea ecx, [ebp - 0x484]
call fcn.004060b0
mov dword [ebp - 0x4fc], eax
mov eax, dword [ebp - 0x4fc]
mov dword [ebp - 0x500], eax
mov dword [ebp - 4], 0
push 0x5fc6c4
lea ecx, [ebp - 0x4a0]
call fcn.004060b0
mov dword [ebp - 0x504], eax
mov ecx, dword [ebp - 0x504]
mov dword [ebp - 0x508], ecx
mov byte [ebp - 4], 1
push 0x5fc6c8
lea ecx, [ebp - 0x4bc]
call fcn.004060b0
mov dword [ebp - 0x50c], eax
mov edx, dword [ebp - 0x50c]
mov dword [ebp - 0x510], edx
mov byte [ebp - 4], 2
lea eax, [ebp - 0x44c]
push eax
mov ecx, dword [ebp - 0x510]
push ecx
lea edx, [ebp - 0x4d8]
push edx
call fcn.00407980
add esp, 0xc
mov dword [ebp - 0x514], eax
mov eax, dword [ebp - 0x514]
mov dword [ebp - 0x518], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x508]
push ecx
mov edx, dword [ebp - 0x518]
push edx
lea eax, [ebp - 0x4f4]
push eax
call fcn.00407a10
add esp, 0xc
mov dword [ebp - 0x51c], eax
mov ecx, dword [ebp - 0x51c]
mov dword [ebp - 0x520], ecx
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x500]
push edx
mov eax, dword [ebp - 0x520]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00407a10
add esp, 0xc
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4f4]
call fcn.004060f0
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x4d8]
call fcn.004060f0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x4bc]
call fcn.004060f0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x4a0]
call fcn.004060f0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x484]
call fcn.004060f0
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x403430
push 0
push 0
push 0x5fc6cc
push 0
push 0
lea ecx, [ebp - 0x30]
call fcn.00406110
push eax
push 1
push 2
push 0x10
push 0x16
push str.AD_ESS_Terminal_Security_Info_Monitor_Service
push 0x5fc744
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x403415
mov dword [ebp - 0x38], 1
jmp 0x40342e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err:_CreateService_failed___code_d_n
push 0x5fc7a8
call fcn.0040c050
add esp, 0xc
jmp 0x403449
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err:_OpenSCManager_failed___code_d_n
push 0x5fc808
call fcn.0040c050
add esp, 0xc
cmp dword [ebp - 0x10], 0
je 0x4034d5
mov dword [ebp - 0x464], 0x3e8
mov dword [ebp - 0x468], 1
mov dword [ebp - 0x460], 0
mov dword [ebp - 0x45c], 0x5fc818
mov dword [ebp - 0x458], 0x5fc81c
mov dword [ebp - 0x454], 1
lea eax, [ebp - 0x468]
mov dword [ebp - 0x450], eax
lea ecx, [ebp - 0x460]
push ecx
push 2
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x4034cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err:_ChangeServiceConfig2_failed___code_d_n
push str.install_service
call fcn.0040c050
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x34], 0
je 0x4034e5
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x4f8], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.004060f0
mov eax, dword [ebp - 0x4f8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0055abea
mov esp, ebp
pop ebp
ret