Function at 0x417f79
Capabilities:
Check if file exists
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x898
mov eax, dword [0x4c3a10]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, 0x4d1a50
push edi
mov esi, ecx
mov dword [ebp - 0x848], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
cmp dword [esi + 0x58], ebx
je 0x417fc1
inc dword [esi + 0x60]
xor ebx, ebx
inc ebx
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x41824c
push dword [ebp - 0x848]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x417fb3
cmp dword [esi + 0x50], ebx
jne 0x418015
xor eax, eax
push 0x7fe
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push ebx
push eax
call fcn.004766d0
add esp, 0xc
lea eax, [ebp - 0x80c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x80c]
push eax
lea ecx, [esi + 0x3c]
call fcn.00401a3e
push ebx
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x810], 7
call fcn.00401ce9
lea eax, [ebp - 0x828]
push eax
call fcn.00402cec
cmp dword [ebp - 0x810], 8
mov eax, dword [ebp - 0x824]
pop ecx
jae 0x41804d
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push dword [ebp - 0x848]
lea ecx, [esi + 0x20]
call fcn.00401a3e
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x58], eax
cmp eax, ebx
jne 0x41809d
cmp dword [esi + 0x54], 8
jb 0x418080
mov esi, dword [esi + 0x40]
jmp 0x418083
add esi, 0x40
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a62
jmp 0x417fb3
lea eax, [esi + 4]
mov ecx, eax
lea eax, [esi + 8]
mov dword [ebp - 0x884], eax
lea eax, [esi + 0xc]
mov dword [ebp - 0x87c], eax
lea eax, [esi + 0x10]
mov dword [ebp - 0x874], eax
lea eax, [esi + 0x14]
mov dword [ebp - 0x86c], eax
lea eax, [esi + 0x18]
mov dword [ebp - 0x864], eax
lea eax, [esi + 0x1c]
mov dword [ebp - 0x894], ecx
mov dword [ebp - 0x890], str.init
mov dword [ebp - 0x88c], esi
mov dword [ebp - 0x888], str.uninit
mov dword [ebp - 0x880], str.create_new_task
mov dword [ebp - 0x878], str.create_continued_task
mov dword [ebp - 0x870], str.query_task_info
mov dword [ebp - 0x868], str.start_task
mov dword [ebp - 0x860], str.stop_task
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x858], str.set_task_type
mov dword [ebp - 0x854], ebx
mov dword [ebp - 0x850], 0x4b37ba
mov dword [ebp - 0x848], ebx
cmp ecx, ebx
je 0x418192
xor eax, eax
mov dword [ebp - 0x84c], ecx
push dword [ebp + eax - 0x890]
push dword [esi + 0x58]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x84c]
mov dword [ecx], eax
cmp eax, ebx
je 0x4181e5
inc dword [ebp - 0x848]
mov eax, dword [ebp - 0x848]
shl eax, 3
mov ecx, dword [ebp + eax - 0x894]
mov dword [ebp - 0x84c], ecx
cmp ecx, ebx
jne 0x418156
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x4181b2
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call fcn.004182bf
jmp 0x418235
push ebx
call eax
push edi
mov dword [ebp - 0x84c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x84c], ebx
jne 0x4181a7
xor eax, eax
inc eax
inc dword [esi + 0x60]
push ebx
push eax
lea ecx, [ebp - 0x828]
mov dword [esi + 0x5c], eax
call fcn.00401a62
jmp 0x417fb0
push ebx
lea ecx, [ebp - 0x844]
mov dword [ebp - 0x82c], 7
call fcn.00401ce9
mov eax, dword [ebp - 0x848]
mov esi, dword [ebp + eax*8 - 0x890]
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x41820d
sub eax, ecx
lea ecx, [ebp - 0x844]
push ecx
push eax
push esi
call fcn.0040b6cf
add esp, 0xc
push ebx
push 1
lea ecx, [ebp - 0x844]
call fcn.00401a62
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a62
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047674a
leave
ret 4