Function at 0x21041060
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x2106492a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x264
mov dword [ebp - 0x268], ecx
mov eax, dword [ebp - 0x268]
mov dword [eax], 0
mov ecx, dword [ebp - 0x268]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x268]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x268]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 0x268]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 0x268]
mov dword [edx + 0x14], 0
mov eax, dword [ebp - 0x268]
mov dword [eax + 0x18], 0
mov ecx, dword [ebp - 0x268]
mov dword [ecx + 0x1c], 0
mov dword [ebp - 0x18], str.wtsapi32.dll
push 0x104
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x2104113a
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea edx, [ebp - 0x224]
push edx
call fcn.21010b3d
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.2101077f
test eax, eax
je 0x2104113a
lea ecx, [ebp - 0x224]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x120]
call fcn.21020678
mov dword [ebp - 4], 0
push 0x14
call fcn.21058728
add esp, 4
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x22c], 0
je 0x21041182
push 1
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x22c]
call fcn.21007640
mov dword [ebp - 0x26c], eax
jmp 0x2104118c
mov dword [ebp - 0x26c], 0
mov eax, dword [ebp - 0x26c]
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x228]
mov dword [ecx], edx
cmp dword [ebp - 0x228], 0
je 0x210411cc
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x268]
mov eax, dword [edx]
mov edx, dword [eax]
call dword [edx + 4]
test eax, eax
jne 0x210411d1
jmp 0x210413c7
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [ebp - 0x238], ecx
push str.WTSEnumerateProcessesA
mov edx, dword [ebp - 0x238]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x23c], eax
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x23c]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [ebp - 0x240], ecx
push str.WTSEnumerateSessionsA
mov edx, dword [ebp - 0x240]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x244], eax
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x244]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [ebp - 0x248], ecx
push str.WTSFreeMemory
mov edx, dword [ebp - 0x248]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24c], eax
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x24c]
mov dword [ecx + 0x10], edx
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [ebp - 0x250], ecx
push str.WTSGetActiveConsoleSessionId
mov edx, dword [ebp - 0x250]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x254]
mov dword [ecx + 0x14], edx
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [ebp - 0x258], ecx
push str.WTSQuerySessionInformationA
mov edx, dword [ebp - 0x258]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x25c], eax
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x25c]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [ebp - 0x260], ecx
push str.WTSQueryUserToken
mov edx, dword [ebp - 0x260]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x264], eax
mov ecx, dword [ebp - 0x268]
mov edx, dword [ebp - 0x264]
mov dword [ecx + 0x1c], edx
call fcn.210416e9
test eax, eax
jne 0x2104134b
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x120], 0x21066ba0
lea ecx, [ebp - 0x120]
call fcn.21012133
jmp 0x21041436
mov eax, dword [ebp - 0x268]
cmp dword [eax + 8], 0
je 0x2104136f
mov ecx, dword [ebp - 0x268]
cmp dword [ecx + 0x10], 0
je 0x2104136f
mov edx, dword [ebp - 0x268]
cmp dword [edx + 0x18], 0
jne 0x21041371
jmp 0x210413c7
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
push ecx
push 4
push 0xffffffffffffffff
push 0
mov edx, dword [ebp - 0x268]
call dword [edx + 0x18]
test eax, eax
jne 0x2104138e
jmp 0x210413c7
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x268]
call dword [ecx + 0x10]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x120], 0x21066ba0
lea ecx, [ebp - 0x120]
call fcn.21012133
jmp 0x21041436
mov edx, dword [ebp - 0x268]
mov eax, dword [edx]
mov dword [ebp - 0x234], eax
mov ecx, dword [ebp - 0x234]
mov dword [ebp - 0x230], ecx
cmp dword [ebp - 0x230], 0
je 0x21041404
push 1
mov edx, dword [ebp - 0x230]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x230]
call dword [eax]
mov dword [ebp - 0x270], eax
jmp 0x2104140e
mov dword [ebp - 0x270], 0
mov ecx, dword [ebp - 0x268]
mov dword [ecx], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x120], 0x21066ba0
lea ecx, [ebp - 0x120]
call fcn.21012133
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret