Function at 0x4039a0
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x40754c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x6c
push ebx
push ebp
push esi
mov esi, ecx
push edi
push ecx
mov eax, esp
mov dword [esp + 0x2c], esp
push 0x40b03c
push 0x40b028
push eax
call sub.MFC42.DLL_operator_1
push ecx
xor ebp, ebp
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x40b018
mov dword [esp + 0x90], ebp
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x90], 1
mov ecx, esp
mov dword [esp + 0x40], esp
push 0x40b01c
call sub.MFC42.DLL_CString::CString_2
or edi, 0xffffffff
mov ecx, esi
mov dword [esp + 0x90], edi
call fcn.00403760
cmp eax, ebp
je 0x4040cb
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x40b024
push 0x40b028
push ecx
call sub.MFC42.DLL_operator_1
push ecx
mov dword [esp + 0x8c], 2
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x40b018
call sub.MFC42.DLL_CString::CString_2
push ecx
mov byte [esp + 0x90], 3
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x40b01c
call sub.MFC42.DLL_CString::CString_2
mov ecx, esi
mov dword [esp + 0x90], edi
call fcn.00403760
cmp eax, ebp
je 0x4040cb
lea ecx, [esp + 0x50]
call fcn.00406cf6
push 0x40b03c
lea edx, [esp + 0x20]
push 0x40b02c
push edx
mov dword [esp + 0x90], 4
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push ebp
push ebp
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x90], 5
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x84], 4
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x403ae7
mov dword [esp + 0x84], edi
jmp 0x4040c2
lea ecx, [esp + 0x24]
call fcn.004055a0
mov al, byte [esp + 0x8c]
mov dword [esp + 0x44], ebp
mov byte [esp + 0x40], al
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
lea ecx, [esp + 0x20]
mov byte [esp + 0x84], 7
call sub.MFC42.DLL_CString::CString_1
push 0x104
push 0x104
lea ecx, [esp + 0x28]
mov byte [esp + 0x8c], 8
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push edi
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0x40a21c
lea ecx, [esp + 0x24]
call fcn.00406c6c
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x40b024
push 0x40b02c
push ecx
call sub.MFC42.DLL_operator_1
lea edx, [esp + 0x44]
push ebp
push edx
lea ecx, [esp + 0x30]
call fcn.00405c10
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 0x10]
lea ecx, [esp + 0x50]
push eax
mov byte [esp + 0x88], 9
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x403fe1
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 8], 0x20
jl 0x403fcb
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
lea edx, [esp + 0x28]
push 0x20
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x8c], 0xa
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x88], 0xb
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x28]
mov byte [esp + 0x84], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::MakeUpper
push 0x20
push ebp
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Delete
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::TrimLeft
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::TrimRight
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
mov byte [esp + 0x84], 0xc
call sub.MFC42.DLL_CString::MakeUpper
push 0x40a21c
push 0x40a284
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Replace
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReverseFind
cmp eax, 0xffffffff
je 0x403fa9
push eax
push ebp
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Delete
xor edi, edi
mov esi, dword [esp + 0x44]
test esi, esi
je 0x403f6e
mov ecx, dword [esp + 0x48]
mov eax, 0x2aaaaaab
sub ecx, esi
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp ebp, edx
jae 0x403f6e
add esi, edi
lea ecx, [esp + 0x64]
push esi
call sub.MFC42.DLL_CString::CString_2
lea edx, [esi + 4]
lea ecx, [esp + 0x68]
push edx
mov byte [esp + 0x88], 0xd
call sub.MFC42.DLL_CString::CString_2
lea eax, [esi + 8]
lea ecx, [esp + 0x6c]
push eax
mov byte [esp + 0x88], 0xe
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esi + 0xc]
mov byte [esp + 0x84], 0xf
push ecx
lea ecx, [esp + 0x74]
call sub.MFC42.DLL_CString::CString_2
lea edx, [esi + 0x10]
lea ecx, [esp + 0x74]
push edx
mov byte [esp + 0x88], 0x10
call sub.MFC42.DLL_CString::CString_2
add esi, 0x14
lea ecx, [esp + 0x78]
push esi
mov byte [esp + 0x88], 0x11
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x70]
lea ecx, [esp + 0x1c]
push eax
mov byte [esp + 0x88], 0x12
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x1c]
mov byte [esp + 0x84], 0x13
call sub.MFC42.DLL_CString::MakeUpper
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
jne 0x403dc9
lea ecx, [esp + 0x1c]
mov byte [esp + 0x84], 0x12
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x78]
mov byte [esp + 0x84], 0x1e
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x74]
mov byte [esp + 0x84], 0x1d
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x70]
mov byte [esp + 0x84], 0x1c
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x6c]
mov byte [esp + 0x84], 0x1b
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x68]
mov byte [esp + 0x84], 0x1a
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x64]
mov byte [esp + 0x84], 0xc
call sub.MFC42.DLL_CString::CString
inc ebp
add edi, 0x18
jmp 0x403c6b
lea ecx, [esp + 0x38]
call fcn.00401000
push ecx
lea eax, [esp + 0x20]
mov edx, esp
mov dword [esp + 0x38], esp
lea ecx, [esp + 0x24]
push eax
push ecx
push edx
mov byte [esp + 0x94], 0x14
call sub.MFC42.DLL_operator_1
lea edx, [esp + 0x30]
lea ecx, [esp + 0x3c]
push edx
call fcn.00401720
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x2c]
test eax, eax
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x403e55
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x6c]
call sub.MFC42.DLL_CString::operator_1
lea edx, [esp + 0x10]
lea ecx, [esp + 0x78]
push edx
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0x8c]
lea edx, [esp + 0x64]
push edx
push 1
mov eax, dword [ecx + 8]
push eax
call fcn.00404250
mov ecx, dword [esp + 0x44]
lea eax, [ebp + ebp*2]
lea ecx, [ecx + eax*8]
mov eax, dword [esp + 0x48]
mov ebp, eax
lea edi, [ecx + 0x18]
cmp edi, eax
je 0x403ec2
lea esi, [edi - 0x10]
push edi
lea ecx, [esi - 8]
call sub.MFC42.DLL_CString::operator_1
lea edx, [esi + 0x14]
lea ecx, [esi - 4]
push edx
call sub.MFC42.DLL_CString::operator_1
lea eax, [esi + 0x18]
mov ecx, esi
push eax
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esi + 0x1c]
push ecx
lea ecx, [esi + 4]
call sub.MFC42.DLL_CString::operator_1
lea edx, [esi + 0x20]
lea ecx, [esi + 8]
push edx
call sub.MFC42.DLL_CString::operator_1
lea eax, [esi + 0x24]
lea ecx, [esi + 0xc]
push eax
call sub.MFC42.DLL_CString::operator_1
add edi, 0x18
add esi, 0x18
cmp edi, ebp
jne 0x403e70
mov eax, dword [esp + 0x48]
lea esi, [eax - 0x18]
mov edi, eax
cmp esi, eax
je 0x403edd
mov ecx, esi
call fcn.004016a0
add esi, 0x18
cmp esi, edi
jne 0x403ecb
mov eax, dword [esp + 0x48]
sub eax, 0x18
lea ecx, [esp + 0x38]
mov dword [esp + 0x48], eax
mov byte [esp + 0x84], 0x13
call fcn.00401030
lea ecx, [esp + 0x1c]
mov byte [esp + 0x84], 0x12
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x78]
mov byte [esp + 0x84], 0x19
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x74]
mov byte [esp + 0x84], 0x18
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x70]
mov byte [esp + 0x84], 0x17
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x6c]
mov byte [esp + 0x84], 0x16
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x68]
mov byte [esp + 0x84], 0x15
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x64]
mov byte [esp + 0x84], 0xc
call sub.MFC42.DLL_CString::CString
jmp 0x403f83
mov ecx, dword [esp + 0x90]
lea edx, [esp + 0x10]
push edx
mov eax, dword [ecx + 8]
push eax
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x84], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x84], 9
call sub.MFC42.DLL_CString::CString
xor ebp, ebp
jmp 0x403fcb
lea ecx, [esp + 0x14]
mov byte [esp + 0x84], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x84], 9
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x10]
lea ecx, [esp + 0x50]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
jne 0x403b9f
lea ecx, [esp + 0x50]
call sub.MFC42.DLL_CStdioFile::Close
lea ecx, [esp + 0x10]
mov byte [esp + 0x84], 8
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x84], 7
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x48]
mov esi, dword [esp + 0x44]
cmp esi, edi
mov dword [esp + 0x8c], esi
je 0x404091
mov bl, 6
lea ecx, [esi + 0x14]
mov byte [esp + 0x84], 0x23
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0x10]
mov byte [esp + 0x84], 0x22
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 0xc]
mov byte [esp + 0x84], 0x21
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 8]
mov byte [esp + 0x84], 0x20
call sub.MFC42.DLL_CString::CString
lea ecx, [esi + 4]
mov byte [esp + 0x84], 0x1f
call sub.MFC42.DLL_CString::CString
mov ecx, esi
mov byte [esp + 0x84], bl
call sub.MFC42.DLL_CString::CString
add esi, 0x18
cmp esi, edi
mov dword [esp + 0x8c], esi
jne 0x404021
mov esi, dword [esp + 0x44]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x24]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
mov byte [esp + 0x84], 4
call fcn.004055d0
mov dword [esp + 0x84], 0xffffffff
lea ecx, [esp + 0x50]
call sub.MFC42.DLL_CStdioFile::CStdioFile
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x78
ret 8