Function at 0x405df0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
lea ebp, [esp - 0x2644]
mov eax, 0x2644
call fcn.00414170
push 0xffffffffffffffff
push 0x414ca0
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x41c038]
xor eax, ebp
mov dword [ebp + 0x2640], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x264c]
lea ecx, [ebp - 0x48]
mov eax, dword [ebp + 0x2650]
mov dword [ebp - 0x20], eax
mov dword [edi], 0
call fcn.00402430
call fcn.00402170
lea edx, [ebp + 0x10]
mov dword [ebp + 0x10], 0
mov ecx, eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
call fcn.00402250
mov ecx, str.Kernel32.dll
call fcn.00402220
push eax
push str.Kernel32.dll
lea ecx, [ebp - 0x48]
call fcn.004034c0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x48]
push eax
call fcn.0040cb40
mov ecx, eax
call fcn.0040cc00
mov esi, eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.00402030
test esi, esi
je 0x40634d
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSGetActiveConsoleSessionId
push esi
call ebx
test eax, eax
je 0x40634d
call eax
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
je 0x40634d
lea ecx, [ebp - 0x48]
call fcn.00402430
call fcn.00402170
lea edx, [ebp + 0x10]
mov dword [ebp + 0x10], 0
mov ecx, eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
call fcn.00402250
mov ecx, str.Psapi.dll
call fcn.00402220
push eax
push str.Psapi.dll
lea ecx, [ebp - 0x48]
call fcn.004034c0
mov dword [ebp - 4], 1
lea eax, [ebp - 0x48]
push eax
call fcn.0040cb40
mov ecx, eax
call fcn.0040cc00
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.00402030
lea ecx, [ebp - 0x60]
call fcn.00402430
call fcn.00402170
lea edx, [ebp + 0x10]
mov dword [ebp + 0x10], 0
mov ecx, eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
call fcn.00402250
mov ecx, str.Advapi32.dll
call fcn.00402220
push eax
push str.Advapi32.dll
lea ecx, [ebp - 0x60]
call fcn.004034c0
mov dword [ebp - 4], 2
lea eax, [ebp - 0x60]
push eax
call fcn.0040cb40
mov ecx, eax
call fcn.0040cc00
mov esi, eax
mov dword [ebp], esi
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00402030
lea ecx, [ebp - 0x78]
call fcn.00402430
call fcn.00402170
lea edx, [ebp + 0x10]
mov dword [ebp + 0x10], 0
mov ecx, eax
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
call fcn.00402250
mov ecx, str.Wtsapi32.dll
call fcn.00402220
push eax
push str.Wtsapi32.dll
lea ecx, [ebp - 0x78]
call fcn.004034c0
mov dword [ebp - 4], 3
lea eax, [ebp - 0x78]
push eax
call fcn.0040cb40
mov ecx, eax
call fcn.0040cc00
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x78]
call fcn.00402030
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40634d
test esi, esi
je 0x40634d
cmp dword [ebp - 0x14], 0
je 0x40634d
push str.EnumProcesses
push eax
call ebx
push str.GetModuleFileNameExA
push dword [ebp - 0x10]
mov dword [ebp + 0x10], eax
call ebx
push str.GetProcessImageFileNameA
push dword [ebp - 0x10]
mov esi, eax
mov dword [ebp - 0x24], esi
call ebx
push str.OpenProcessToken
push dword [ebp]
mov dword [ebp - 0x18], eax
call ebx
push str.GetTokenInformation
push dword [ebp]
mov dword [ebp - 0x1c], eax
call ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
test ebx, ebx
je 0x40634d
test esi, esi
jne 0x406099
cmp dword [ebp - 0x18], esi
je 0x40634d
cmp dword [ebp - 0x1c], 0
je 0x40634d
test eax, eax
je 0x40634d
push 0x2000
lea eax, [ebp + 0x14]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp + 8], 0
lea eax, [ebp + 8]
push eax
push 0x2000
lea eax, [ebp + 0x14]
push eax
call ebx
test eax, eax
je 0x40634d
mov eax, dword [ebp + 8]
mov ecx, 0x800
shr eax, 2
cmp eax, ecx
mov dword [ebp + 0xc], 0
mov dword [ebp + 4], 0
cmovae eax, ecx
xor ebx, ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], ebx
test eax, eax
je 0x406345
nop word [eax + eax]
push 0x209
lea eax, [ebp + 0x2014]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x105
lea eax, [ebp + 0x2220]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x105
lea eax, [ebp + 0x2328]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x105
lea eax, [ebp + 0x2538]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x105
lea eax, [ebp + 0x2430]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x3c
push dword [ebp + ebx*4 + 0x14]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x4061a3
push dword [ebp + ebx*4 + 0x14]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x406317
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4061bd
push 0x208
lea ecx, [ebp + 0x2014]
push ecx
push esi
call eax
test eax, eax
jne 0x4061e1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4062f9
push 0x208
lea ecx, [ebp + 0x2014]
push ecx
push 0
push esi
call eax
test eax, eax
je 0x4062f9
push 0x104
lea eax, [ebp + 0x2430]
push eax
push 0x104
lea eax, [ebp + 0x2538]
push eax
push 0x104
lea eax, [ebp + 0x2328]
push eax
push 0x104
lea eax, [ebp + 0x2220]
push eax
lea eax, [ebp + 0x2014]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__splitpath_s]
lea eax, [ebp + 0x2538]
push eax
push str.explorer
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 0x2c
test eax, eax
jne 0x4062f9
lea eax, [ebp + 0x2430]
push eax
push str..exe
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4062f9
push edi
push 0x2000e
push esi
call dword [ebp - 0x1c]
test eax, eax
je 0x4062f9
mov eax, dword [edi]
test eax, eax
je 0x40630c
lea ecx, [ebp + 4]
push ecx
push 4
lea ecx, [ebp + 0xc]
push ecx
push 0xc
push eax
call dword [ebp - 0x28]
test eax, eax
je 0x4062f9
mov eax, dword [ebp - 0x2c]
cmp dword [ebp + 0xc], eax
je 0x406336
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSQuerySessionInformationW
push dword [ebp - 0x14]
call ebx
push str.WTSFreeMemory
push dword [ebp - 0x14]
mov dword [ebp + 0x10], eax
call ebx
mov ebx, eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4062f6
test ebx, ebx
je 0x4062f6
lea ecx, [ebp + 0x10]
mov dword [ebp], 0
push ecx
lea ecx, [ebp]
mov dword [ebp + 0x10], 0
push ecx
push 8
push dword [ebp + 0xc]
push 0
call eax
test eax, eax
je 0x4062f6
mov eax, dword [ebp]
test eax, eax
je 0x4062f6
cmp dword [ebp + 0x10], 4
jne 0x4062f3
cmp dword [eax], 0
je 0x40632c
push eax
call ebx
mov ebx, dword [ebp - 0x10]
mov eax, dword [edi]
test eax, eax
je 0x40630c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
test esi, esi
je 0x406317
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
mov dword [ebp - 0x10], ebx
cmp ebx, dword [ebp - 0x30]
jb 0x406110
cmp dword [edi], 0
setne al
jmp 0x40634f
push eax
call ebx
mov dword [ebp], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
mov dword [ecx], eax
cmp dword [edi], 0
setne al
jmp 0x40634f
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2640]
xor ecx, ebp
call fcn.00412c8c
lea esp, [ebp + 0x2644]
pop ebp
ret 8