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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x44593f
push eax
mov eax, 0x115c
mov dword fs:[0], esp
call fcn.00443160
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1174], 0
call fcn.00442a9a
lea eax, [esp + 0x117c]
lea ecx, [esp + 0x18]
push eax
mov byte [esp + 0x1178], 1
call sub.mfc42.dll_CString::CString_3
mov edi, dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
push 0
push 0
mov byte [esp + 0x117c], 2
call edi
mov esi, eax
call dword [sym.imp.kernel32.dll_GetProcessHeap]
mov ebx, eax
push esi
push 8
push ebx
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebp, eax
push ebp
push esi
call edi
mov ecx, dword [esp + 0x117c]
push ebp
push ecx
call dword [sym.imp.msvcrt.dll__mbscmp]
add esp, 8
test eax, eax
je 0x412dba
mov edx, dword [esp + 0x117c]
push edx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x412fae
lea eax, [esp + 0x2c]
push eax
push 0x4548bc
call dword [sym.imp.kernel32.dll_FindFirstFileA]
mov esi, eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x20], esi
call fcn.00442a9a
cmp esi, 0xffffffff
mov byte [esp + 0x1174], 3
je 0x412f8c
mov esi, dword [esp + 0x1180]
mov edi, dword [sym.imp.msvcrt.dll_sprintf]
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x14]
call fcn.00442ad0
mov edx, dword [esp + 0x10]
push 0x4548b8
push edx
call dword [sym.imp.msvcrt.dll__mbscmp]
add esp, 8
test eax, eax
je 0x412f69
mov eax, dword [esp + 0x10]
push 0x4548b4
push eax
call dword [sym.imp.msvcrt.dll__mbscmp]
add esp, 8
test eax, eax
je 0x412f69
mov ecx, dword [esp + 0x2c]
and ecx, 0x10
cmp cl, 0x10
jne 0x412ecc
mov eax, dword [esp + 0x117c]
push esi
mov ecx, dword [eax - 8]
cmp byte [ecx + eax - 1], 0x5c
je 0x412ea5
lea edx, [esp + 0x1180]
push 0x5c
lea eax, [esp + 0x30]
push edx
push eax
call sub.mfc42.dll_operator_2
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
push eax
push ecx
mov byte [esp + 0x1188], 4
call sub.mfc42.dll_operator_1
call fcn.00412d10
add esp, 8
mov byte [esp + 0x1174], 3
lea ecx, [esp + 0x28]
jmp 0x412f64
push ecx
lea ecx, [esp + 0x18]
mov eax, esp
mov dword [esp + 0x2c], esp
lea edx, [esp + 0x1184]
push ecx
push edx
push eax
call sub.mfc42.dll_operator_1
call fcn.00412d10
add esp, 8
jmp 0x412f69
lea ecx, [esp + 0x14]
call fcn.00442a9a
mov eax, dword [esp + 0x117c]
mov byte [esp + 0x1174], 5
mov ecx, dword [eax - 8]
mov dl, byte [ecx + eax - 1]
mov ecx, dword [esp + 0x10]
cmp dl, 0x5c
push ecx
push eax
je 0x412efd
push 0x454820
jmp 0x412f02
push 0x4548ac
lea edx, [esp + 0x178]
push edx
call edi
add esp, 0x10
lea eax, [esp + 0x16c]
lea ecx, [esp + 0x14]
push eax
push 0x454328
push ecx
call sub.mfc42.dll_CString::Format
add esp, 0xc
lea ecx, [esp + 0x14]
call sub.mfc42.dll_CString::MakeUpper
push 0x455f64
lea ecx, [esp + 0x18]
call sub.mfc42.dll_CString::Find_2
cmp eax, 0xffffffff
je 0x412f58
mov eax, dword [esi + 8]
lea edx, [esp + 0x16c]
push edx
push eax
mov ecx, esi
call sub.mfc42.dll_CStringArray::SetAtGrow
mov byte [esp + 0x1174], 3
lea ecx, [esp + 0x14]
call sub.mfc42.dll_CString::CString
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.kernel32.dll_FindNextFileA]
test eax, eax
jne 0x412df7
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.kernel32.dll_FindClose]
push ebp
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push ebp
push 1
push ebx
call dword [sym.imp.kernel32.dll_HeapFree]
lea ecx, [esp + 0x10]
mov byte [esp + 0x1174], 2
call sub.mfc42.dll_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x1174], 1
call sub.mfc42.dll_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1174], 0
call sub.mfc42.dll_CString::CString
lea ecx, [esp + 0x117c]
mov dword [esp + 0x1174], 0xffffffff
call sub.mfc42.dll_CString::CString
mov ecx, dword [esp + 0x116c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1168
ret