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

Disassembly:
mov eax, 0x421ab3
call fcn.00420f90
mov eax, 0x3f7c8
call fcn.00420fc0
lea eax, [ebp - 0x20]
push ebx
push esi
push edi
test eax, eax
mov dword [ebp - 0x20], ecx
jne 0x40ccd1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x18]
push eax
push 3
pop ebx
push ebx
call esi
test eax, eax
je 0x40cadd
cmp byte [ebp - 0x17], 0x3a
jne 0x40cadd
movzx eax, byte [ebp - 0x18]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
test eax, eax
je 0x40caf9
cmp byte [ebp - 0xf], 0x3a
jne 0x40caf9
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
test eax, eax
je 0x40cb15
cmp byte [ebp - 0xf], 0x3a
jne 0x40cb15
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x10]
push eax
call edi
test eax, eax
je 0x40cb36
cmp byte [ebp - 0xf], 0x3a
jne 0x40cb36
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x20]
cmp eax, 0x37
jne 0x40cba9
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
test eax, eax
je 0x40cb5a
cmp byte [ebp - 0xf], 0x3a
jne 0x40cb5a
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
test eax, eax
je 0x40cb76
cmp byte [ebp - 0xf], 0x3a
jne 0x40cb76
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
test eax, eax
je 0x40cb92
cmp byte [ebp - 0xf], 0x3a
jne 0x40cb92
movzx eax, byte [ebp - 0x10]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
and byte [ebp - 0x12], 0
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 0x14], 0x42
mov byte [ebp - 0x13], 0x3a
call edi
jmp 0x40cc67
lea eax, [ebp - 0x14]
push eax
push ebx
call esi
test eax, eax
je 0x40cbc5
cmp byte [ebp - 0x13], 0x3a
jne 0x40cbc5
movzx eax, byte [ebp - 0x14]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
push eax
call edi
test eax, eax
je 0x40cbe0
cmp byte [ebp - 0x13], 0x3a
jne 0x40cbe0
movzx eax, byte [ebp - 0x14]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x20]
cmp eax, 0x37
jne 0x40cc18
lea eax, [ebp - 0x14]
push eax
push ebx
call esi
test eax, eax
je 0x40cc04
cmp byte [ebp - 0x13], 0x3a
jne 0x40cc04
movzx eax, byte [ebp - 0x14]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
and byte [ebp - 0x1a], 0
lea eax, [ebp - 0x1c]
push eax
mov byte [ebp - 0x1c], 0x42
mov byte [ebp - 0x1b], 0x3a
call edi
jmp 0x40cc3c
push 0
call dword [sym.imp.KERNEL32.dll_PulseEvent]
lea eax, [ebp - 0x14]
push eax
push ebx
call esi
test eax, eax
je 0x40cc3c
cmp byte [ebp - 0x13], 0x3a
jne 0x40cc3c
movzx eax, byte [ebp - 0x14]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
test eax, eax
je 0x40cc58
cmp byte [ebp - 0xf], 0x3a
jne 0x40cc58
movzx eax, byte [ebp - 0x10]
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 - 0x18]
push eax
call edi
test eax, eax
je 0x40cc82
cmp byte [ebp - 0x17], 0x3a
jne 0x40cc82
movzx eax, byte [ebp - 0x18]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x20]
cmp eax, 0x37
lea eax, [ebp - 0x18]
push eax
push ebx
jne 0x40ccba
call esi
test eax, eax
je 0x40cca6
cmp byte [ebp - 0x17], 0x3a
jne 0x40cca6
movzx eax, byte [ebp - 0x18]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
and byte [ebp - 0x1a], 0
lea eax, [ebp - 0x1c]
push eax
mov byte [ebp - 0x1c], 0x42
mov byte [ebp - 0x1b], 0x3a
call edi
jmp 0x40ccd1
call esi
test eax, eax
je 0x40ccd1
cmp byte [ebp - 0x17], 0x3a
jne 0x40ccd1
movzx eax, byte [ebp - 0x18]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov esi, dword [ebp - 0x20]
mov eax, dword [0x4293d0]
push 0x7530
push dword [esi + 0x18]
call dword [eax + 0x70]
test eax, eax
je 0x40cddf
cmp eax, 0xffffffff
je 0x40cddf
push 0x1fbd0
call sub.MFC42.DLL_operatornew
and dword [ebp - 0x24], 0
pop ecx
mov edi, eax
lea ecx, [ebp - 0x3f7d4]
mov dword [ebp - 0x14], edi
call fcn.004084c8
and dword [ebp - 4], 0
lea eax, [ebp - 0x24]
push eax
push edi
lea ecx, [ebp - 0x3f7d4]
call fcn.00408980
cmp dword [ebp - 0x24], 0
mov ebx, 0x104
je 0x40cd68
mov eax, dword [0x4293d0]
push 0xbb8
push dword [esi + 0x18]
call dword [eax + 0x70]
xor esi, esi
cmp eax, esi
je 0x40cdd0
cmp eax, 0xffffffff
je 0x40cdd0
cmp dword [ebp - 0x24], esi
jle 0x40cd68
mov ecx, dword [ebp - 0x20]
push edi
call fcn.0040cdee
inc esi
add edi, ebx
cmp esi, dword [ebp - 0x24]
jl 0x40cd57
mov esi, dword [ebp - 0x20]
mov eax, dword [0x4293d0]
push 0x1388
push dword [esi + 0x18]
call dword [eax + 0x70]
test eax, eax
je 0x40cdd0
cmp eax, 0xffffffff
je 0x40cdd0
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push eax
push edi
lea ecx, [ebp - 0x3f7d4]
call fcn.00408c92
cmp dword [ebp - 0x24], 0
je 0x40cd68
mov eax, dword [0x4293d0]
push 0xbb8
push dword [esi + 0x18]
call dword [eax + 0x70]
xor esi, esi
cmp eax, esi
je 0x40cdd0
cmp eax, 0xffffffff
je 0x40cdd0
cmp dword [ebp - 0x24], esi
jle 0x40cd68
mov ecx, dword [ebp - 0x20]
push edi
call fcn.0040cdee
inc esi
add edi, ebx
cmp esi, dword [ebp - 0x24]
jl 0x40cdbd
jmp 0x40cd68
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3f7d4]
call fcn.00408733
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret