Function at 0x41cd10
Capabilities:
Get common file path
Read file on windows
Set console window title

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x495677
mov eax, dword fs:[0]
push eax
sub esp, 0x648
mov eax, dword [0x4af480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, dl
mov edi, ecx
push 0x430
lea eax, [ebp - 0x648]
mov dword [ebp - 0x654], 0
push 0
push eax
mov dword [ebp - 0x650], 0
call fcn.0047ee20
add esp, 0xc
mov byte [ebp - 0x21a], 1
test bl, bl
je 0x41ce1c
cmp byte [0x4b4e54], 0
jne 0x41ce1c
call dword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
je 0x41cf8b
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
mov word [ebp - 0x21c], 0x100
call esi
push 0xfffffffffffffff4
mov dword [ebp - 0x234], eax
call esi
push 0xfffffffffffffff6
mov dword [ebp - 0x230], eax
call esi
cmp dword [ebp - 0x234], 0
mov dword [ebp - 0x22c], eax
je 0x41cf8b
cmp dword [ebp - 0x230], 0
je 0x41cf8b
test eax, eax
je 0x41cf8b
lea ecx, [ebp - 0x650]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov eax, dword [ebp - 0x650]
or eax, 0xc0
push eax
push dword [ebp - 0x22c]
mov dword [ebp - 0x650], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push str.MPQEditor_Console
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
push 0x3c
call fcn.0047d509
add esp, 4
mov dword [ebp - 0x64c], eax
mov dword [ebp - 4], 0
mov ecx, eax
push dword [0x4b4e44]
call fcn.0041fd40
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x648], eax
test eax, eax
je 0x41d043
test edi, edi
je 0x41cea9
movzx eax, word [edi]
mov ecx, eax
test ax, ax
je 0x41cea9
xor eax, eax
cmp ax, cx
jae 0x41ce84
mov eax, ecx
nop dword [eax]
cmp ax, 0x20
ja 0x41ce84
movzx eax, word [edi + 2]
add edi, 2
xor ecx, ecx
cmp cx, ax
jb 0x41ce70
movzx eax, word [edi]
mov ecx, eax
cmp eax, 0x2f
je 0x41ce93
cmp ecx, 0x2d
jne 0x41ce96
add edi, 2
mov edx, edi
lea ecx, [ebp - 0x648]
call fcn.0041cbb0
mov dword [ebp - 0x654], eax
cmp byte [ebp - 0x21a], 0
jne 0x41cfec
nop word [eax + eax]
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x648]
push 0x4a7494
push eax
call fcn.00419750
add esp, 0xc
xor edi, edi
mov ebx, 0x200
mov dword [ebp - 0x64c], edi
push 0x201
push 8
push dword [0x4b3a28]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x41cfdf
push edi
lea eax, [ebp - 0x64c]
push eax
push ebx
push esi
push dword [ebp - 0x22c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41cfac
add edi, dword [ebp - 0x64c]
mov ecx, esi
cmp dword [ebp - 0x64c], 0x200
jne 0x41cfac
cmp byte [edi + esi - 1], 0xa
je 0x41cfa6
add ebx, 0x200
push ebx
push esi
push 8
push dword [0x4b3a28]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x41cf95
push 0
lea ecx, [ebp - 0x64c]
mov esi, eax
push ecx
push 0x200
add eax, edi
push eax
push dword [ebp - 0x22c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41cf31
jmp 0x41cfac
mov eax, 0x1f
jmp 0x41d076
push esi
push 0
push dword [0x4b3a28]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x41cfdf
mov esi, ecx
test ecx, ecx
je 0x41cfdf
push 0
push esi
call fcn.0047cf70
push esi
push 0
push dword [0x4b3a28]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x41cfdf
mov edx, edi
lea ecx, [ebp - 0x648]
call fcn.0041cbb0
push edi
call fcn.00457d30
add esp, 4
cmp byte [ebp - 0x21a], 0
je 0x41cec0
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x41cffc
push eax
call fcn.00436ec0
mov edi, dword [ebp - 0x648]
mov dword [ebp - 0x228], 0
test edi, edi
je 0x41d043
lea esi, [edi + 0x30]
cmp dword [esi], esi
je 0x41d030
mov edx, dword [esi]
push edx
mov eax, dword [edx + 4]
mov ecx, dword [edx]
mov dword [eax], ecx
mov dword [ecx + 4], eax
call fcn.00457d30
add esp, 4
cmp dword [esi], esi
jne 0x41d017
lea eax, [edi + 0x30]
push 0x3c
push edi
mov dword [eax + 4], eax
mov dword [eax], eax
call fcn.0047d539
add esp, 8
cmp byte [ebp - 0x21b], 0
jne 0x41d055
cmp byte [ebp - 0x21c], 0
je 0x41d070
push dword [ebp - 0x234]
call dword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
cmp byte [ebp - 0x21b], 0
je 0x41d070
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov eax, dword [ebp - 0x654]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047d2db
mov esp, ebp
pop ebp
ret