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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x898
mov eax, dword [0x4bca50]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, 0x4ca960
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 0x415ed4
inc dword [esi + 0x60]
xor ebx, ebx
inc ebx
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x41615f
push dword [ebp - 0x848]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x415ec6
cmp dword [esi + 0x50], ebx
jne 0x415f28
xor eax, eax
push 0x7fe
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push ebx
push eax
call fcn.00470920
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.00402de9
cmp dword [ebp - 0x810], 8
mov eax, dword [ebp - 0x824]
pop ecx
jae 0x415f60
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 0x415fb0
cmp dword [esi + 0x54], 8
jb 0x415f93
mov esi, dword [esi + 0x40]
jmp 0x415f96
add esi, 0x40
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
push 1
lea ecx, [ebp - 0x828]
call fcn.00401a58
jmp 0x415ec6
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], 0x4ad0c2
mov dword [ebp - 0x848], ebx
cmp ecx, ebx
je 0x4160a5
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 0x4160f8
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 0x416069
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x4160c5
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call fcn.004161d2
jmp 0x416148
push ebx
call eax
push edi
mov dword [ebp - 0x84c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x84c], ebx
jne 0x4160ba
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 0x415ec3
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 0x416120
sub eax, ecx
lea ecx, [ebp - 0x844]
push ecx
push eax
push esi
call fcn.0040b3bc
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.0047099a
leave
ret 4