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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
lea eax, [ebp - 0x14]
push ebx
push esi
push edi
test eax, eax
mov dword [ebp - 0x14], ecx
jne 0x40314d
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 0x402f59
cmp byte [ebp - 0xb], 0x3a
jne 0x402f59
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 0x402f75
cmp byte [ebp - 3], 0x3a
jne 0x402f75
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 0x402f91
cmp byte [ebp - 3], 0x3a
jne 0x402f91
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 0x402fb2
cmp byte [ebp - 3], 0x3a
jne 0x402fb2
movzx eax, byte [ebp - 4]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
cmp eax, 0x37
jne 0x403025
lea eax, [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x402fd6
cmp byte [ebp - 3], 0x3a
jne 0x402fd6
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 0x402ff2
cmp byte [ebp - 3], 0x3a
jne 0x402ff2
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 0x40300e
cmp byte [ebp - 3], 0x3a
jne 0x40300e
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 0x4030e3
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x403041
cmp byte [ebp - 7], 0x3a
jne 0x403041
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 0x40305c
cmp byte [ebp - 7], 0x3a
jne 0x40305c
movzx eax, byte [ebp - 8]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
cmp eax, 0x37
jne 0x403094
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x403080
cmp byte [ebp - 7], 0x3a
jne 0x403080
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 0x4030b8
push 0
call dword [sym.imp.KERNEL32.dll_PulseEvent]
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x4030b8
cmp byte [ebp - 7], 0x3a
jne 0x4030b8
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 0x4030d4
cmp byte [ebp - 3], 0x3a
jne 0x4030d4
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 0x4030fe
cmp byte [ebp - 0xb], 0x3a
jne 0x4030fe
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
lea eax, [ebp - 0x14]
cmp eax, 0x37
lea eax, [ebp - 0xc]
push eax
push ebx
jne 0x403136
call esi
test eax, eax
je 0x403122
cmp byte [ebp - 0xb], 0x3a
jne 0x403122
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 0x40314d
call esi
test eax, eax
je 0x40314d
cmp byte [ebp - 0xb], 0x3a
jne 0x40314d
movzx eax, byte [ebp - 0xc]
push eax
call sub.MSVCRT.dll_toupper
pop ecx
mov eax, dword [ebp - 0x14]
xor ebx, ebx
push 0x19000
push ebx
lea edi, [eax + 0x118]
mov eax, dword [0x4293d0]
push edi
call dword [eax + 0x21c]
mov ecx, dword [ebp - 0x14]
add esp, 0xc
lea esi, [ecx + 0x19118]
push esi
push edi
push dword [ecx + 0x110]
mov dword [esi], ebx
call fcn.004036ef
xor eax, eax
cmp dword [esi], ebx
pop edi
pop esi
setne al
pop ebx
leave
ret