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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
lea eax, [ebp + 0xc]
push ebx
push esi
push edi
test eax, eax
mov dword [ebp - 0x14], ecx
jne 0x408bba
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 0x4089c6
cmp byte [ebp - 0xb], 0x3a
jne 0x4089c6
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 0x4089e2
cmp byte [ebp - 3], 0x3a
jne 0x4089e2
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 0x4089fe
cmp byte [ebp - 3], 0x3a
jne 0x4089fe
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 0x408a1f
cmp byte [ebp - 3], 0x3a
jne 0x408a1f
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp + 0xc]
cmp eax, 0x37
jne 0x408a92
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x408a43
cmp byte [ebp - 3], 0x3a
jne 0x408a43
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 0x408a5f
cmp byte [ebp - 3], 0x3a
jne 0x408a5f
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 0x408a7b
cmp byte [ebp - 3], 0x3a
jne 0x408a7b
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 0x408b50
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x408aae
cmp byte [ebp - 7], 0x3a
jne 0x408aae
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 0x408ac9
cmp byte [ebp - 7], 0x3a
jne 0x408ac9
movzx eax, byte [ebp - 8]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp + 0xc]
cmp eax, 0x37
jne 0x408b01
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x408aed
cmp byte [ebp - 7], 0x3a
jne 0x408aed
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 0x408b25
push 0
call dword [sym.imp.KERNEL32.dll_PulseEvent]
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x408b25
cmp byte [ebp - 7], 0x3a
jne 0x408b25
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 0x408b41
cmp byte [ebp - 3], 0x3a
jne 0x408b41
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 0x408b6b
cmp byte [ebp - 0xb], 0x3a
jne 0x408b6b
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp + 0xc]
cmp eax, 0x37
lea eax, [ebp - 0xc]
push eax
push ebx
jne 0x408ba3
call esi
test eax, eax
je 0x408b8f
cmp byte [ebp - 0xb], 0x3a
jne 0x408b8f
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 0x408bba
call esi
test eax, eax
je 0x408bba
cmp byte [ebp - 0xb], 0x3a
jne 0x408bba
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov ebx, dword [ebp + 0xc]
push 0
push 2
and dword [ebx], 0
mov eax, dword [0x4293d0]
call dword [eax + 0xc]
mov edi, eax
cmp edi, 0xffffffff
je 0x408c8b
mov esi, 0x128
lea eax, [ebp - 0x13c]
push esi
push 0
push eax
mov eax, dword [0x4293d0]
call dword [eax + 0x21c]
add esp, 0xc
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x13c], esi
push eax
mov eax, dword [0x4293d0]
push edi
call dword [eax + 8]
test eax, eax
je 0x408c8b
push 0x104
lea eax, [ebp - 0x240]
push 0
push eax
mov eax, dword [0x4293d0]
call dword [eax + 0x21c]
mov esi, dword [ebp - 0x14]
add esp, 0xc
lea eax, [ebp - 0x240]
mov ecx, esi
push eax
push dword [ebp - 0x134]
call fcn.00409359
lea eax, [ebp - 0x240]
mov ecx, esi
push eax
call fcn.00408fb0
test eax, eax
je 0x408c62
lea eax, [ebp - 0x240]
lea ecx, [esi + 4]
push eax
call fcn.0040a8c3
lea eax, [ebp - 0x13c]
push eax
mov eax, dword [0x4293d0]
push edi
call dword [eax + 4]
test eax, eax
jne 0x408c0e
mov eax, dword [0x4293d0]
push edi
call dword [eax + 0x44]
push ebx
lea ecx, [esi + 4]
push dword [ebp + 8]
call fcn.0040ab63
pop edi
pop esi
pop ebx
leave
ret 8