Function at 0x40ccfc
Capabilities:
Get common file path

Disassembly:
push ebp
sub esp, 0x408
lea ebp, [esp - 4]
mov eax, dword [0x4b8db8]
xor eax, ebp
mov dword [ebp + 0x408], eax
push 0x14
mov eax, 0x4891c4
call fcn.004583d2
xor ebx, ebx
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__Entry
inc ebx
push ebx
mov esi, ecx
call fcn.0040dc6a
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40cd53
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__WTSGetActiveConsoleSessionId_fail._dwCurSessId__0xFFFFFFFF
push ebx
call fcn.0040dc6a
pop ecx
pop ecx
xor eax, eax
jmp 0x40d07f
push edi
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__WTSGetActiveConsoleSessionId:_dwCurSessId__0x_x
push ebx
call fcn.0040dc6a
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push edi
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
jne 0x40cdce
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x522
jne 0x40cdc1
lea eax, [ebp - 0x10]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40cdce
push dword [ebp - 0x10]
call edi
push eax
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__OpenProcessToken_fail__0x_x_and_hToken___x
push ebx
call fcn.0040dc6a
add esp, 0x10
push 0
push 0
push 0x7f0
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x40d07d
push dword [ebp - 0x10]
call edi
push eax
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__WTSQueryUserToken_fail__0x_x_and_hToken___x
jmp 0x40cda1
call fcn.00420c18
push eax
lea ecx, [ebp - 0x14]
call fcn.00401832
push 0x30
pop eax
xor edi, edi
push 0x206
mov word [ebp], ax
lea eax, [ebp + 2]
push edi
push eax
mov dword [ebp - 4], edi
call fcn.0045b7f0
add esp, 0xc
lea eax, [ebp]
push eax
push edi
push dword [ebp - 0x10]
push 0x1c
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp]
push eax
lea eax, [ebp - 0x14]
push 0x4930ac
push eax
call fcn.00406358
push 0x30
pop eax
push 0x1fe
mov word [ebp + 0x208], ax
lea eax, [ebp + 0x20a]
push edi
push eax
call fcn.0045b7f0
add esp, 0x18
lea eax, [ebp + 0x208]
push eax
push dword [ebp - 0x10]
mov ecx, esi
call fcn.004089ba
lea eax, [ebp + 0x208]
push 0x4930a8
push eax
call fcn.0045c247
pop ecx
pop ecx
test eax, eax
je 0x40d039
lea eax, [ebp + 0x208]
push 0x490570
push eax
call fcn.0045c247
pop ecx
pop ecx
test eax, eax
je 0x40d039
lea eax, [ebp + 0x208]
push 0x4930a4
push eax
call fcn.0045c247
pop ecx
pop ecx
test eax, eax
je 0x40d039
mov ebx, dword [ebp - 0x14]
lea eax, [ebp + 0x208]
push eax
push dword [ebp - 0x10]
push ebx
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__GetLogonUserName_succeed._path___s__token_0x_x__szUser__s
push 1
call fcn.0040dc6a
add esp, 0x14
call fcn.00420c18
push eax
lea ecx, [ebp - 0x18]
call fcn.00401832
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp - 0x18]
push 0x492b70
push eax
mov byte [ebp - 4], 1
call fcn.00406358
add esp, 0xc
lea edi, [esi + 0xa4]
push dword [edi]
lea ecx, [ebp - 0x18]
call fcn.00409a3e
test eax, eax
jne 0x40cf24
cmp dword [ebp - 0x10], eax
je 0x40cf07
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00401548
lea ecx, [ebx - 0x10]
call fcn.00401548
mov eax, esi
jmp 0x40d07f
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.0040ad54
call fcn.00420c18
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401832
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp - 0x1c]
push str._s.xml
push eax
mov byte [ebp - 4], 2
call fcn.00406358
mov edi, dword [ebp - 0x1c]
add esp, 0xc
push dword [edi - 0xc]
lea ecx, [ebp - 0x14]
push edi
call fcn.0040ab2f
lea eax, [ebp - 0x14]
lea ecx, [esi + 0x68]
push eax
call fcn.0040ad54
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx - 0xc]
test eax, eax
je 0x40d00a
push eax
lea ecx, [ebp - 0x14]
call fcn.00401c8a
push eax
mov ecx, esi
call fcn.0040ca07
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x40cfa4
mov eax, dword [ecx]
push 1
call dword [eax]
and dword [esi + 0x54], 0
push 0x64
call fcn.0041642e
pop ecx
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 4], 3
test eax, eax
je 0x40cfc8
push ebx
lea ecx, [esi + 0x20]
push ecx
mov ecx, eax
call fcn.004137bb
jmp 0x40cfca
xor eax, eax
mov byte [ebp - 4], 2
mov dword [esi + 0x54], eax
test eax, eax
jne 0x40d000
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__new_ScheduleMonitor_fail.
push 1
call fcn.0040dc6a
xor esi, esi
pop ecx
pop ecx
cmp dword [ebp - 0x10], esi
je 0x40cff3
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [edi - 0x10]
call fcn.00401548
jmp 0x40cf0a
push dword [esi + 0x20]
mov ecx, eax
call fcn.00410c33
cmp dword [ebp - 0x10], 0
je 0x40d019
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [edi - 0x10]
call fcn.00401548
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00401548
lea ecx, [ebx - 0x10]
call fcn.00401548
xor eax, eax
inc eax
jmp 0x40d07f
lea eax, [ebp + 0x208]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push str._ScheduleService__CScheduleWnd__LoadScheduleProgram__GetLogonUserName_fail.PostMessage_to_reload.__path___s__token_0x_x__szUser__s
push ebx
call fcn.0040dc6a
add esp, 0x14
cmp dword [ebp - 0x10], edi
je 0x40d062
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push edi
push 0x7f0
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00401548
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x408]
xor ecx, ebp
call fcn.004583c3
add ebp, 0x40c
leave
ret