Function at 0x40d755
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ee4f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x684
mov dword [ebp - 0x678], ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x24c]
call sub.MFC42.DLL_CFileFind::CFileFind
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
push eax
push 0x428d2c
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
lea edx, [ebp - 0x10c]
push edx
lea ecx, [ebp - 0x24c]
call sub.MFC42.DLL_CFileFind::FindFile
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0
jne 0x40da1e
mov ecx, dword [ebp - 0x678]
add ecx, 0x358
call fcn.00401ec0
push eax
lea ecx, [ebp + 8]
call fcn.004015d0
test eax, eax
jne 0x40da1e
push 0x428d34
push 0x428d78
lea eax, [ebp - 0x454]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x458]
push ecx
lea edx, [ebp - 0x454]
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40d96f
mov dword [ebp - 0x460], 1
mov dword [ebp - 0x45c], 0x104
lea eax, [ebp - 0x45c]
push eax
lea ecx, [ebp - 0x350]
push ecx
lea edx, [ebp - 0x460]
push edx
push 0
push 0x428d7c
mov eax, dword [ebp - 0x458]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40d962
mov dword [ebp - 0x45c], 0x104
lea ecx, [ebp - 0x454]
push ecx
lea edx, [ebp - 0x350]
push edx
call sub.MSVCRT.dll_strcpy
add esp, 8
lea eax, [ebp - 0x45c]
push eax
lea ecx, [ebp - 0x350]
push ecx
lea edx, [ebp - 0x460]
push edx
push 0
push 0x428d88
mov eax, dword [ebp - 0x458]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40d8c5
mov byte [ebp - 0x350], 0
lea ecx, [ebp - 0x350]
push ecx
push 0x428d94
mov edx, dword [ebp - 0x678]
add edx, 0x358
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push 0x428d98
mov eax, dword [ebp - 0x678]
add eax, 0x358
push eax
lea ecx, [ebp - 0x664]
push ecx
call sub.MFC42.DLL_operator_2
mov dword [ebp - 0x67c], eax
mov edx, dword [ebp - 0x67c]
mov dword [ebp - 0x680], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x680]
push eax
mov ecx, dword [ebp - 0x678]
add ecx, 0x358
call sub.MFC42.DLL_CString::operator_1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x664]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x678]
mov edx, dword [ecx + 0x358]
push edx
push 0x428da8
lea eax, [ebp - 0x350]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [ebp - 0x458]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x350]
push edx
push 0x428dac
mov eax, dword [ebp - 0x678]
add eax, 0x358
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov ecx, dword [ebp - 0x678]
add ecx, 0x358
call fcn.00401ea0
test eax, eax
je 0x40d9dc
push 1
push 5
lea ecx, [ebp - 0x10c]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0x428db0
lea edx, [ebp - 0x10c]
push edx
push 0x428dc0
mov eax, dword [ebp - 0x678]
add eax, 0x358
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov ecx, dword [ebp - 0x678]
add ecx, 0x358
push ecx
mov edx, esp
mov dword [ebp - 0x668], esp
push ecx
mov ecx, edx
call fcn.0041ced0
mov dword [ebp - 0x684], eax
mov ecx, dword [ebp - 0x678]
call fcn.0040e1ab
mov eax, dword [ebp - 0x678]
add eax, 0x358
push eax
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 8]
call fcn.00401590
cmp eax, 3
jle 0x40da5f
mov ecx, dword [ebp + 8]
push ecx
push 0x428dc8
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0x104
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
jmp 0x40da78
mov edx, dword [ebp + 8]
push edx
push 0x428dcc
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x110]
call sub.MFC42.DLL_CString::CString_3
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x22c]
push ecx
push 0x428dd0
lea edx, [ebp - 0x110]
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x110]
call fcn.00401590
mov dword [ebp - 0x118], eax
mov eax, 0xfe
sub eax, dword [ebp - 0x118]
sub eax, 7
mov dword [ebp - 0x118], eax
push 0x104
lea ecx, [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x678]
add edx, 0x368
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea eax, [ebp - 0x22c]
push eax
push 0x428dd4
lea ecx, [ebp - 0x110]
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x110]
call fcn.00401590
mov dword [ebp - 0x114], eax
mov edx, 0x100
sub edx, dword [ebp - 0x114]
sub edx, 7
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x114]
cmp eax, dword [ebp - 0x118]
jge 0x40db40
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x118], ecx
push 0x3ec
mov ecx, dword [ebp - 0x678]
call sub.MFC42.DLL_CWnd::GetDlgItem
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x118], 0x18
jge 0x40dc29
push 0
push 0x428dd8
push 0
push 0x428e04
push 0x428e10
push 0
lea ecx, [ebp - 0x65c]
call sub.MFC42.DLL_CFileDialog::CFileDialog
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x65c]
call sub.MFC42.DLL_CFileDialog::DoModal
cmp eax, 1
jne 0x40dbec
lea edx, [ebp - 0x660]
push edx
lea ecx, [ebp - 0x65c]
call sub.MFC42.DLL_CFileDialog::GetPathName
mov byte [ebp - 4], 5
lea eax, [ebp - 0x660]
push eax
mov ecx, dword [ebp - 0x678]
add ecx, 0x35c
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x660]
push ecx
mov ecx, dword [ebp - 0x678]
add ecx, 0x358
call sub.MFC42.DLL_CString::operator_1
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x660]
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x678]
add edx, 0x358
push ecx
mov ecx, esp
mov dword [ebp - 0x66c], esp
push edx
call fcn.0041ced0
mov dword [ebp - 0x688], eax
mov ecx, dword [ebp - 0x678]
call fcn.0040d755
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x65c]
call fcn.00412fc0
jmp 0x40dc36
push 0x18
mov ecx, dword [ebp - 0x230]
call fcn.00413680
mov ecx, dword [ebp - 0x678]
add ecx, 0x354
call fcn.00401590
cmp eax, dword [ebp - 0x118]
jle 0x40dcab
mov eax, dword [ebp - 0x118]
push eax
lea ecx, [ebp - 0x670]
push ecx
mov ecx, dword [ebp - 0x678]
add ecx, 0x354
call sub.MFC42.DLL_CString::Left
mov dword [ebp - 0x68c], eax
mov edx, dword [ebp - 0x68c]
mov dword [ebp - 0x690], edx
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x690]
push eax
mov ecx, dword [ebp - 0x678]
add ecx, 0x354
call sub.MFC42.DLL_CString::operator_1
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x670]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x678]
add ecx, 0x354
call fcn.00401ec0
push eax
mov ecx, dword [ebp - 0x230]
call sub.MFC42.DLL_CWnd::SetWindowTextA
mov ecx, dword [ebp - 0x118]
push ecx
push 0x428e14
lea edx, [ebp - 0x128]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, 0x42a988
call fcn.00401ec0
push eax
push 0x428e18
push 0x428e1c
push 0x428e28
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [ebp - 0x678]
add ecx, 0x354
call fcn.00401590
mov dword [ebp - 0x118], eax
mov eax, dword [ebp - 0x118]
push eax
push 0x428e30
lea ecx, [ebp - 0x128]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, 0x42a988
call fcn.00401ec0
push eax
lea edx, [ebp - 0x128]
push edx
push 0x428e34
push 0x428e40
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x674], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x110]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24c]
call fcn.0041cebe
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x674]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4