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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x898
mov eax, dword [0x4b7f60]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, 0x4c5c84
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 0x413cbf
inc dword [esi + 0x60]
xor ebx, ebx
inc ebx
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x413f4a
push dword [ebp - 0x848]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413cb1
cmp dword [esi + 0x50], ebx
jne 0x413d13
xor eax, eax
push 0x7fe
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push ebx
push eax
call fcn.0046d720
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.004019f8
push ebx
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x810], 7
call fcn.00401ca3
lea eax, [ebp - 0x828]
push eax
call fcn.0040312b
cmp dword [ebp - 0x810], 8
mov eax, dword [ebp - 0x824]
pop ecx
jae 0x413d4b
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push dword [ebp - 0x848]
lea ecx, [esi + 0x20]
call fcn.004019f8
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x58], eax
cmp eax, ebx
jne 0x413d9b
cmp dword [esi + 0x54], 8
jb 0x413d7e
mov esi, dword [esi + 0x40]
jmp 0x413d81
add esi, 0x40
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a1c
jmp 0x413cb1
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], 0x4a8186
mov dword [ebp - 0x848], ebx
cmp ecx, ebx
je 0x413e90
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 0x413ee3
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 0x413e54
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x413eb0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call fcn.00413fbd
jmp 0x413f33
push ebx
call eax
push edi
mov dword [ebp - 0x84c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x84c], ebx
jne 0x413ea5
xor eax, eax
inc eax
inc dword [esi + 0x60]
push ebx
push eax
lea ecx, [ebp - 0x828]
mov dword [esi + 0x5c], eax
call fcn.00401a1c
jmp 0x413cae
push ebx
lea ecx, [ebp - 0x844]
mov dword [ebp - 0x82c], 7
call fcn.00401ca3
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 0x413f0b
sub eax, ecx
lea ecx, [ebp - 0x844]
push ecx
push eax
push esi
call fcn.0040986c
add esp, 0xc
push ebx
push 1
lea ecx, [ebp - 0x844]
call fcn.00401a1c
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a1c
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.0046d79a
leave
ret 4