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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x210719fa
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 0x21049e8f
push 0x104
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea edx, [ebp - 0x224]
push edx
call fcn.210134f1
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.21013097
test eax, eax
je 0x21049e8f
lea ecx, [ebp - 0x224]
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x120]
call fcn.21026498
mov dword [ebp - 4], 0
push 0x14
call fcn.210636c3
add esp, 4
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x22c], 0
je 0x21049ed7
push 1
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x22c]
call fcn.21009710
mov dword [ebp - 0x26c], eax
jmp 0x21049ee1
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 0x21049f21
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 0x21049f26
jmp 0x2104a11c
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.2104a43e
test eax, eax
jne 0x2104a0a0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x120], 0x21073c68
lea ecx, [ebp - 0x120]
call fcn.21014c04
jmp 0x2104a18b
mov eax, dword [ebp - 0x268]
cmp dword [eax + 8], 0
je 0x2104a0c4
mov ecx, dword [ebp - 0x268]
cmp dword [ecx + 0x10], 0
je 0x2104a0c4
mov edx, dword [ebp - 0x268]
cmp dword [edx + 0x18], 0
jne 0x2104a0c6
jmp 0x2104a11c
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 0x2104a0e3
jmp 0x2104a11c
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], 0x21073c68
lea ecx, [ebp - 0x120]
call fcn.21014c04
jmp 0x2104a18b
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 0x2104a159
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 0x2104a163
mov dword [ebp - 0x270], 0
mov ecx, dword [ebp - 0x268]
mov dword [ecx], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x120], 0x21073c68
lea ecx, [ebp - 0x120]
call fcn.21014c04
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret