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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x898
mov eax, dword [0x4b7f10]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, 0x4c5c18
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 0x413dbd
inc dword [esi + 0x60]
xor ebx, ebx
inc ebx
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x414048
push dword [ebp - 0x848]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413daf
cmp dword [esi + 0x50], ebx
jne 0x413e11
xor eax, eax
push 0x7fe
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push ebx
push eax
call fcn.0046cbb0
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.00401a34
push ebx
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x810], 7
call fcn.00401cdf
lea eax, [ebp - 0x828]
push eax
call fcn.00403135
cmp dword [ebp - 0x810], 8
mov eax, dword [ebp - 0x824]
pop ecx
jae 0x413e49
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push dword [ebp - 0x848]
lea ecx, [esi + 0x20]
call fcn.00401a34
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x58], eax
cmp eax, ebx
jne 0x413e99
cmp dword [esi + 0x54], 8
jb 0x413e7c
mov esi, dword [esi + 0x40]
jmp 0x413e7f
add esi, 0x40
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a58
jmp 0x413daf
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], 0x4a8056
mov dword [ebp - 0x848], ebx
cmp ecx, ebx
je 0x413f8e
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 0x413fe1
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 0x413f52
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x413fae
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call fcn.004140bb
jmp 0x414031
push ebx
call eax
push edi
mov dword [ebp - 0x84c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x84c], ebx
jne 0x413fa3
xor eax, eax
inc eax
inc dword [esi + 0x60]
push ebx
push eax
lea ecx, [ebp - 0x828]
mov dword [esi + 0x5c], eax
call fcn.00401a58
jmp 0x413dac
push ebx
lea ecx, [ebp - 0x844]
mov dword [ebp - 0x82c], 7
call fcn.00401cdf
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 0x414009
sub eax, ecx
lea ecx, [ebp - 0x844]
push ecx
push eax
push esi
call fcn.00409844
add esp, 0xc
push ebx
push 1
lea ecx, [ebp - 0x844]
call fcn.00401a58
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a58
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.0046cc2a
leave
ret 4