Function at 0x40e630
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended
Delete file
Delete registry key
Delete service
Get common file path
Persist via windows service
Set registry value
Start service
Terminate process

Disassembly:
mov eax, dword [0x51eb64]
sub esp, 0x45c
push ebx
push ebp
push esi
push edi
mov edi, dword [eax]
cmp edi, eax
je 0x40e750
mov eax, dword [edi + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_AttachConsole]
push eax
call esi
test eax, eax
jne 0x40e66b
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [edi + 0xc]
push ecx
call esi
test eax, eax
je 0x40e659
mov ebp, dword [sym.imp.KERNEL32.dll_GetConsoleProcessList]
lea edx, [esp + 0x24]
push 1
push edx
call ebp
mov esi, eax
cmp esi, 1
jbe 0x40e6e6
lea eax, [esi*4]
push eax
call fcn.004a2adf
add esp, 4
mov ebx, eax
mov dword [esp + 0x20], ebx
push esi
push ebx
call ebp
test esi, esi
jbe 0x40e6dd
mov ebp, esi
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp esi, eax
je 0x40e6d3
cmp esi, dword [edi + 0xc]
je 0x40e6d3
push esi
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40e6d3
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add ebx, 4
dec ebp
jne 0x40e6a1
mov ebx, dword [esp + 0x20]
push ebx
call fcn.004a2b08
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_FreeConsole]
call esi
test eax, eax
jne 0x40e700
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
test eax, eax
je 0x40e6f2
mov ecx, dword [edi + 0x10]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [edi + 8]
mov edx, dword [0x51e4c0]
cmp ecx, edx
je 0x40e72b
mov eax, dword [ecx]
cmp eax, edx
je 0x40e727
mov ecx, eax
mov eax, dword [ecx]
cmp eax, edx
jne 0x40e71f
mov edi, ecx
jmp 0x40e744
mov eax, dword [edi + 4]
cmp edi, dword [eax + 8]
jne 0x40e73d
mov edi, eax
mov eax, dword [eax + 4]
cmp edi, dword [eax + 8]
je 0x40e733
cmp dword [edi + 8], eax
je 0x40e744
mov edi, eax
cmp edi, dword [0x51eb64]
jne 0x40e649
mov eax, dword [0x51eb10]
test eax, eax
jne 0x40e7b6
mov edx, dword [0x51eb04]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
mov eax, dword [0x51eb08]
push eax
call ebx
mov eax, dword [0x50e2ec]
test eax, eax
jne 0x40e84f
mov eax, dword [0x50e2e4]
test eax, eax
je 0x40e7f1
push 0x20000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40e7b6
push 0x10
push str.Sainbox
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40e7c1
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x45c
ret
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jne 0x40e7e7
call esi
push edi
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x45c
ret
call esi
push edi
call esi
jmp 0x40e8e8
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x28]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
xor ecx, ecx
lea eax, [esp + 0x28]
mov dword [esp + 0x10], ecx
push edx
mov dword [esp + 0x18], ecx
push eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x30], 0x44
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
mov dword [esp + 0x3c], ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40e7b6
mov ecx, dword [esp + 0x14]
push ecx
call ebx
mov edx, dword [esp + 0x10]
jmp 0x40e8e5
lea eax, [esp + 0x6c]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, str.__inst
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x6c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x28]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x11
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], eax
push ecx
mov dword [esp + 0x1c], eax
push edx
push eax
push eax
push eax
push eax
push eax
mov dword [esp + 0x38], eax
push eax
lea eax, [esp + 0x8c]
push eax
push 0
mov dword [esp + 0x50], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40e7b6
mov ecx, dword [esp + 0x14]
push ecx
call ebx
mov edx, dword [esp + 0x10]
push edx
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]