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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x4158c3
lea ecx, [esi + 8]
push ebx
push edi
cmp dword [ecx], eax
jne 0x415480
lea edi, [esi + 0xc]
cmp dword [edi], eax
jne 0x415480
cmp dword [esi + 0x10], eax
jne 0x415480
lea ebx, [esi + 0x14]
cmp dword [ebx], eax
jne 0x415480
cmp dword [esi + 0x18], eax
je 0x4154f2
test ecx, ecx
je 0x415495
cmp dword [ecx], 0
je 0x415495
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [esi + 8], 0
lea edi, [esi + 0xc]
test edi, edi
je 0x4154ac
cmp dword [edi], 0
je 0x4154ac
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [edi], 0
lea ebx, [esi + 0x10]
test ebx, ebx
je 0x4154c3
cmp dword [ebx], 0
je 0x4154c3
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [ebx], 0
lea ebx, [esi + 0x14]
test ebx, ebx
je 0x4154da
cmp dword [ebx], 0
je 0x4154da
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [ebx], 0
lea eax, [esi + 0x18]
test eax, eax
je 0x4154f2
cmp dword [eax], 0
je 0x4154f2
push dword [eax]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
and dword [esi + 0x18], 0
lea ecx, [esi + 0x10]
test ecx, ecx
je 0x415556
push 0x104
lea eax, [ebp - 0x108]
mov byte [ebp - 0x108], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [esi + 0x10], 0
jne 0x415556
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp - 0x314]
push eax
call fcn.00416bd4
push 0x495484
push 0x209
lea eax, [ebp - 0x314]
push eax
call fcn.0040e304
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 0x10], eax
lea eax, [esi + 8]
test eax, eax
je 0x4155ba
push 0x104
lea eax, [ebp - 0x108]
mov byte [ebp - 0x108], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [esi + 8], 0
jne 0x4155ba
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp - 0x314]
push eax
call fcn.00416bd4
push str._advapi32.dll
push 0x209
lea eax, [ebp - 0x314]
push eax
call fcn.0040e304
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 8], eax
test edi, edi
je 0x415619
push 0x104
lea eax, [ebp - 0x108]
mov byte [ebp - 0x108], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [edi], 0
jne 0x415619
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp - 0x314]
push eax
call fcn.00416bd4
push str.wtsapi32.dll
push 0x209
lea eax, [ebp - 0x314]
push eax
call fcn.0040e304
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edi], eax
test ebx, ebx
je 0x415675
mov edi, 0x104
mov byte [ebp - 0x108], 0
push edi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [ebx], 0
jne 0x415675
lea eax, [ebp - 0x108]
push eax
push edi
lea eax, [ebp - 0x314]
push eax
call fcn.00416bd4
push str.user32.dll
push 0x209
lea eax, [ebp - 0x314]
push eax
call fcn.0040e304
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebx], eax
lea edi, [esi + 0x18]
test edi, edi
je 0x4156d7
push 0x104
lea eax, [ebp - 0x108]
mov byte [ebp - 0x108], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp dword [edi], 0
jne 0x4156d7
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp - 0x314]
push eax
call fcn.00416bd4
push str.psapi.dll
push 0x209
lea eax, [ebp - 0x314]
push eax
call fcn.0040e304
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [edi], eax
cmp dword [esi + 0x10], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x41570a
push str.RegisterServiceProcess
push dword [esi + 0x10]
call edi
push str.ProcessIdToSessionId
push dword [esi + 0x10]
mov dword [esi + 0x74], eax
call edi
push str.WTSGetActiveConsoleSessionId
push dword [esi + 0x10]
mov dword [esi + 0x70], eax
call edi
mov dword [esi + 0x64], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x4157e9
push 0x49550c
push eax
call edi
push str.RegisterServiceCtrlHandlerExA
push dword [esi + 8]
mov dword [esi + 0x20], eax
call edi
push 0x495548
push dword [esi + 8]
mov dword [esi + 0x24], eax
call edi
push 0x49555c
push dword [esi + 8]
mov dword [esi + 0x28], eax
call edi
push 0x49556c
push dword [esi + 8]
mov dword [esi + 0x2c], eax
call edi
push 0x495580
push dword [esi + 8]
mov dword [esi + 0x30], eax
call edi
push 0x495590
push dword [esi + 8]
mov dword [esi + 0x34], eax
call edi
push 0x4955a0
push dword [esi + 8]
mov dword [esi + 0x38], eax
call edi
push 0x4955b0
push dword [esi + 8]
mov dword [esi + 0x3c], eax
call edi
push 0x4955c0
push dword [esi + 8]
mov dword [esi + 0x40], eax
call edi
push str.CreateProcessAsUserA
push dword [esi + 8]
mov dword [esi + 0x44], eax
call edi
push 0x4955f0
push dword [esi + 8]
mov dword [esi + 0x48], eax
call edi
push 0x495604
push dword [esi + 8]
mov dword [esi + 0x4c], eax
call edi
push 0x49561c
push dword [esi + 8]
mov dword [esi + 0x50], eax
call edi
push 0x495634
push dword [esi + 8]
mov dword [esi + 0x54], eax
call edi
push str.StartServiceA
push dword [esi + 8]
mov dword [esi + 0x9c], eax
call edi
mov dword [esi + 0xa0], eax
cmp dword [ebx], 0
je 0x415842
push str.OpenDesktopA
push dword [ebx]
call edi
push str.GetUserObjectInformationA
push dword [ebx]
mov dword [esi + 0x78], eax
call edi
push str.GetProcessWindowStation
push dword [ebx]
mov dword [esi + 0x7c], eax
call edi
push str.SetProcessWindowStation
push dword [ebx]
mov dword [esi + 0x80], eax
call edi
push str.CloseWindowStation
push dword [ebx]
mov dword [esi + 0x84], eax
call edi
push str.OpenWindowStationA
push dword [ebx]
mov dword [esi + 0x88], eax
call edi
mov dword [esi + 0x8c], eax
lea ebx, [esi + 0x18]
mov eax, dword [ebx]
test eax, eax
je 0x415877
push str.EnumProcesses
push eax
call edi
push str.EnumProcessModules
push dword [ebx]
mov dword [esi + 0x90], eax
call edi
push str.GetModuleBaseNameA
push dword [ebx]
mov dword [esi + 0x94], eax
call edi
mov dword [esi + 0x98], eax
lea ebx, [esi + 0xc]
mov eax, dword [ebx]
test eax, eax
je 0x4158bb
push str.WTSQueryUserToken
push eax
call edi
push str.WTSQuerySessionInformation
push dword [ebx]
mov dword [esi + 0x58], eax
call edi
push str.WTSEnumerateSessionsA
push dword [ebx]
mov dword [esi + 0x5c], eax
call edi
push str.WTSFreeMemory
push dword [ebx]
mov dword [esi + 0x60], eax
call edi
push str.WTSEnumerateProcessesA
push dword [ebx]
mov dword [esi + 0x68], eax
call edi
mov dword [esi + 0x6c], eax
xor eax, eax
inc eax
pop edi
mov dword [esi + 0x1c], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret