Function at 0x403075
Capabilities:
Check for foreground window switch
Check os version
Create process on windows
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd88
push ebx
push esi
lea eax, [ebp - 0x168]
push edi
xor esi, esi
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x168], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4033b9
cmp dword [ebp - 0x158], 2
jne 0x4033b9
cmp dword [ebp - 0x164], 6
jb 0x4030c2
mov dword [ebp - 8], 1
lea eax, [ebp - 0xc]
push esi
push eax
mov edi, 0xf003f
push esi
push edi
push esi
push 0x41afe4
push esi
mov ebx, 0x80000002
push str.SOFTWAREInternet_Download_Manager
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x403113
cmp dword [ebp + 8], esi
push 4
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 4
push esi
push str.AdvIntDriverEnabled2
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.00403037
neg eax
sbb eax, eax
mov ecx, str.SYSTEMCurrentControlSetServicesIDMWFP
and eax, 0x100
add eax, edi
cmp dword [ebp - 8], esi
jne 0x403132
mov ecx, str.SYSTEMCurrentControlSetServicesIDMTDI
lea edx, [ebp - 0xc]
push edx
push eax
push esi
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40317c
cmp dword [ebp + 8], esi
je 0x403155
cmp dword [ebp - 8], esi
setne al
inc eax
mov dword [ebp - 4], eax
jmp 0x40315c
mov dword [ebp - 4], 3
lea eax, [ebp - 4]
push 4
push eax
push 4
push esi
push str.Start
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
cmp dword [ebp + 8], esi
jne 0x403194
cmp dword [0x41c940], esi
je 0x4033b3
cmp dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov ecx, str.IDMWFP
jne 0x4031a9
mov ecx, str.IDMTDI
cmp dword [ebp + 8], esi
mov eax, str.start
jne 0x4031b8
mov eax, str.stop
push ecx
push eax
lea eax, [ebp - 0x370]
push str._s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, dword [sym.imp.SHELL32.dll_ShellExecuteExW]
add esp, 0x10
push 0x3c
lea eax, [ebp - 0x54]
push esi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x54], 0x3c
mov dword [ebp - 0x50], 0x40
mov dword [ebp - 0x48], str.open
mov dword [ebp - 0x44], 0x415410
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
call ebx
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x370]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
call edi
test eax, eax
je 0x40325c
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
or dword [ebp - 0x18], 0xffffffff
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x403253
cmp dword [ebp - 0x18], esi
jne 0x403253
mov dword [ebp - 0x14], 1
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], esi
je 0x4033b3
cmp dword [ebp - 0x14], esi
jne 0x403283
inc dword [ebp - 4]
cmp dword [ebp - 4], 5
jg 0x4032b2
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4031db
cmp dword [ebp - 8], esi
push esi
push esi
push 3
push esi
push 3
push 0xc0000000
je 0x40329b
push str..IDMWFP
jmp 0x4032a0
push str..IDMTDI
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40326a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], esi
je 0x4033b3
lea eax, [ebp - 0xb88]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4033b9
lea eax, [ebp - 0xd88]
push eax
lea eax, [ebp - 0x368]
push eax
lea eax, [ebp - 0x570]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xb88]
push eax
call sub.MSVCRT.dll__wsplitpath
add esp, 0x14
call fcn.00403037
test eax, eax
lea eax, [ebp - 0x570]
push eax
lea eax, [ebp - 0x14]
push eax
je 0x403372
lea eax, [ebp - 0x980]
push str._s___s_sIDMShellExt64.dll_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push 0x3c
lea eax, [ebp - 0x54]
push esi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x1c
mov dword [ebp - 0x54], 0x3c
mov dword [ebp - 0x50], 0x40
mov dword [ebp - 0x48], str.open
mov dword [ebp - 0x44], str.regsvr32.exe
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], 3
mov dword [ebp - 0x34], esi
call ebx
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x980]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
call edi
jmp 0x4033b3
lea eax, [ebp - 0x778]
push str._s_sIDMShellExt.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x778]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, esi
je 0x4033b3
push str.DllRegisterServer
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x4033ac
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
pop esi
pop ebx
leave
ret