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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x2107c46a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x46c
mov dword [ebp - 0x470], ecx
mov eax, dword [ebp - 0x470]
mov dword [eax], 0
mov ecx, dword [ebp - 0x470]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x470]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x470]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 0x470]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 0x470]
mov dword [edx + 0x14], 0
mov eax, dword [ebp - 0x470]
mov dword [eax + 0x18], 0
mov ecx, dword [ebp - 0x470]
mov dword [ecx + 0x1c], 0
mov dword [ebp - 0x18], str.wtsapi32.dll
push 0x104
lea edx, [ebp - 0x42c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x21053825
push 0x104
lea eax, [ebp - 0x42c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea edx, [ebp - 0x42c]
push edx
call fcn.210153c3
add esp, 0x10
push 0
lea eax, [ebp - 0x42c]
push eax
call fcn.21014f29
add esp, 8
test eax, eax
je 0x21053825
lea ecx, [ebp - 0x42c]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x224]
call fcn.2102cba2
mov dword [ebp - 4], 0
push 0x14
call fcn.2106e07d
add esp, 4
mov dword [ebp - 0x434], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x434], 0
je 0x2105386d
push 1
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x434]
call fcn.2100ad20
mov dword [ebp - 0x474], eax
jmp 0x21053877
mov dword [ebp - 0x474], 0
mov eax, dword [ebp - 0x474]
mov dword [ebp - 0x430], eax
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x430]
mov dword [ecx], edx
cmp dword [ebp - 0x430], 0
je 0x210538b7
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x470]
mov eax, dword [edx]
mov edx, dword [eax]
call dword [edx + 4]
test eax, eax
jne 0x210538bc
jmp 0x21053ab2
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov dword [ebp - 0x440], ecx
push str.WTSEnumerateProcessesW
mov edx, dword [ebp - 0x440]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x444], eax
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x444]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov dword [ebp - 0x448], ecx
push str.WTSEnumerateSessionsW
mov edx, dword [ebp - 0x448]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x44c], eax
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x44c]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov dword [ebp - 0x450], ecx
push str.WTSFreeMemory
mov edx, dword [ebp - 0x450]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x454], eax
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x454]
mov dword [ecx + 0x10], edx
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov dword [ebp - 0x458], ecx
push str.WTSGetActiveConsoleSessionId
mov edx, dword [ebp - 0x458]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x45c], eax
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x45c]
mov dword [ecx + 0x14], edx
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov dword [ebp - 0x460], ecx
push str.WTSQuerySessionInformationW
mov edx, dword [ebp - 0x460]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x464], eax
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x464]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp - 0x470]
mov ecx, dword [eax]
mov dword [ebp - 0x468], ecx
push str.WTSQueryUserToken
mov edx, dword [ebp - 0x468]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x46c], eax
mov ecx, dword [ebp - 0x470]
mov edx, dword [ebp - 0x46c]
mov dword [ecx + 0x1c], edx
call fcn.21053dea
test eax, eax
jne 0x21053a36
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x224], 0x2107dca8
lea ecx, [ebp - 0x224]
call fcn.21016bab
jmp 0x21053b21
mov eax, dword [ebp - 0x470]
cmp dword [eax + 8], 0
je 0x21053a5a
mov ecx, dword [ebp - 0x470]
cmp dword [ecx + 0x10], 0
je 0x21053a5a
mov edx, dword [ebp - 0x470]
cmp dword [edx + 0x18], 0
jne 0x21053a5c
jmp 0x21053ab2
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
push ecx
push 4
push 0xffffffffffffffff
push 0
mov edx, dword [ebp - 0x470]
call dword [edx + 0x18]
test eax, eax
jne 0x21053a79
jmp 0x21053ab2
mov eax, dword [ebp - 0x470]
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 - 0x470]
call dword [ecx + 0x10]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x224], 0x2107dca8
lea ecx, [ebp - 0x224]
call fcn.21016bab
jmp 0x21053b21
mov edx, dword [ebp - 0x470]
mov eax, dword [edx]
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x43c]
mov dword [ebp - 0x438], ecx
cmp dword [ebp - 0x438], 0
je 0x21053aef
push 1
mov edx, dword [ebp - 0x438]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x438]
call dword [eax]
mov dword [ebp - 0x478], eax
jmp 0x21053af9
mov dword [ebp - 0x478], 0
mov ecx, dword [ebp - 0x470]
mov dword [ecx], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x224], 0x2107dca8
lea ecx, [ebp - 0x224]
call fcn.21016bab
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret