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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4458b4
push eax
mov eax, 0x1158
mov dword fs:[0], esp
call fcn.00443160
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x1170], 0
call fcn.00442a9a
lea eax, [esp + 0x1178]
lea ecx, [esp + 0x14]
push eax
mov byte [esp + 0x1174], 1
call sub.mfc42.dll_CString::CString_3
mov ebp, dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
push 0
push 0
mov byte [esp + 0x1178], 2
call ebp
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 edi, eax
push edi
push esi
call ebp
mov ecx, dword [esp + 0x1178]
push edi
push ecx
call dword [sym.imp.msvcrt.dll__mbscmp]
add esp, 8
test eax, eax
je 0x4129ea
mov edx, dword [esp + 0x1178]
push edx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x412b75
lea eax, [esp + 0x28]
push eax
push 0x4548bc
call dword [sym.imp.kernel32.dll_FindFirstFileA]
mov esi, eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], esi
call fcn.00442a9a
cmp esi, 0xffffffff
mov byte [esp + 0x1170], 3
je 0x412b53
mov esi, dword [esp + 0x117c]
mov ebp, dword [sym.imp.msvcrt.dll_sprintf]
lea ecx, [esp + 0x54]
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 0x412b30
mov eax, dword [esp + 0x10]
push 0x4548b4
push eax
call dword [sym.imp.msvcrt.dll__mbscmp]
add esp, 8
test eax, eax
je 0x412b30
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x1178]
and ecx, 0x10
cmp cl, 0x10
mov ecx, dword [eax - 8]
mov dl, byte [ecx + eax - 1]
jne 0x412af9
cmp dl, 0x5c
push esi
je 0x412ad5
lea edx, [esp + 0x117c]
push 0x5c
lea eax, [esp + 0x2c]
push edx
push eax
call sub.mfc42.dll_operator_2
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
push eax
push ecx
mov byte [esp + 0x1184], 4
call sub.mfc42.dll_operator_1
call fcn.00412940
add esp, 8
lea ecx, [esp + 0x24]
mov byte [esp + 0x1170], 3
call sub.mfc42.dll_CString::CString
jmp 0x412b30
push ecx
lea ecx, [esp + 0x18]
mov eax, esp
mov dword [esp + 0x28], esp
lea edx, [esp + 0x1180]
push ecx
push edx
push eax
call sub.mfc42.dll_operator_1
call fcn.00412940
add esp, 8
jmp 0x412b30
mov ecx, dword [esp + 0x10]
cmp dl, 0x5c
push ecx
push eax
je 0x412b0b
push 0x454820
jmp 0x412b10
push 0x4548ac
lea edx, [esp + 0x174]
push edx
call ebp
mov eax, dword [esi + 8]
add esp, 0x10
lea ecx, [esp + 0x168]
push ecx
push eax
mov ecx, esi
call sub.mfc42.dll_CStringArray::SetAtGrow
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x28]
push edx
push eax
call dword [sym.imp.kernel32.dll_FindNextFileA]
test eax, eax
jne 0x412a27
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.kernel32.dll_FindClose]
push edi
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push edi
push 1
push ebx
call dword [sym.imp.kernel32.dll_HeapFree]
lea ecx, [esp + 0x10]
mov byte [esp + 0x1170], 2
call sub.mfc42.dll_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x1170], 1
call sub.mfc42.dll_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x1170], 0
call sub.mfc42.dll_CString::CString
lea ecx, [esp + 0x1178]
mov dword [esp + 0x1170], 0xffffffff
call sub.mfc42.dll_CString::CString
mov ecx, dword [esp + 0x1168]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1164
ret