Function at 0x40c5ea
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
lea eax, [ebp + 8]
push ebx
push esi
push edi
test eax, eax
mov dword [ebp - 0x14], ecx
jne 0x40c821
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0xc]
push eax
push 3
pop ebx
push ebx
call esi
test eax, eax
je 0x40c62d
cmp byte [ebp - 0xb], 0x3a
jne 0x40c62d
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40c649
cmp byte [ebp - 3], 0x3a
jne 0x40c649
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40c665
cmp byte [ebp - 3], 0x3a
jne 0x40c665
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 4]
push eax
call edi
test eax, eax
je 0x40c686
cmp byte [ebp - 3], 0x3a
jne 0x40c686
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp + 8]
cmp eax, 0x37
jne 0x40c6f9
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40c6aa
cmp byte [ebp - 3], 0x3a
jne 0x40c6aa
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40c6c6
cmp byte [ebp - 3], 0x3a
jne 0x40c6c6
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40c6e2
cmp byte [ebp - 3], 0x3a
jne 0x40c6e2
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
and byte [ebp - 6], 0
lea eax, [ebp - 8]
push eax
mov byte [ebp - 8], 0x42
mov byte [ebp - 7], 0x3a
call edi
jmp 0x40c7b7
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x40c715
cmp byte [ebp - 7], 0x3a
jne 0x40c715
movzx eax, byte [ebp - 8]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 8]
push eax
call edi
test eax, eax
je 0x40c730
cmp byte [ebp - 7], 0x3a
jne 0x40c730
movzx eax, byte [ebp - 8]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp + 8]
cmp eax, 0x37
jne 0x40c768
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x40c754
cmp byte [ebp - 7], 0x3a
jne 0x40c754
movzx eax, byte [ebp - 8]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
and byte [ebp - 0xe], 0
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 0x10], 0x42
mov byte [ebp - 0xf], 0x3a
call edi
jmp 0x40c78c
push 0
call dword [sym.imp.KERNEL32.dll_PulseEvent]
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x40c78c
cmp byte [ebp - 7], 0x3a
jne 0x40c78c
movzx eax, byte [ebp - 8]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40c7a8
cmp byte [ebp - 3], 0x3a
jne 0x40c7a8
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
push 0
push 1
push 0xc8d
call dword [sym.imp.KERNEL32.dll_OpenEventA]
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x40c7d2
cmp byte [ebp - 0xb], 0x3a
jne 0x40c7d2
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp + 8]
cmp eax, 0x37
lea eax, [ebp - 0xc]
push eax
push ebx
jne 0x40c80a
call esi
test eax, eax
je 0x40c7f6
cmp byte [ebp - 0xb], 0x3a
jne 0x40c7f6
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
and byte [ebp - 0xe], 0
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 0x10], 0x42
mov byte [ebp - 0xf], 0x3a
call edi
jmp 0x40c821
call esi
test eax, eax
je 0x40c821
cmp byte [ebp - 0xb], 0x3a
jne 0x40c821
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov eax, dword [ebp + 8]
pop edi
dec eax
pop esi
pop ebx
je 0x40c835
dec eax
jne 0x40c843
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
jmp 0x40c83b
mov eax, dword [ebp - 0x14]
push dword [eax + 0xc]
mov eax, dword [0x4293d0]
call dword [eax + 0x48]
leave
ret 4