Function at 0x402541
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4d8
lea eax, [ebp - 0x208]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x407970
push 0x104
lea ecx, [ebp - 0x208]
push ecx
lea edx, [ebp - 0x208]
push edx
push 0x407990
push 0x4079a4
call sub.TOOLS_W.dll_TO_GetPrivateProfileString
push 0x100
push 0
lea eax, [ebp - 0x4d4]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x80
push 0
lea ecx, [ebp - 0x2d4]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x40
lea edx, [ebp - 0x2d4]
push edx
push 0x47
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0x4079b4
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp + eax*2 - 0x2d2]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x4c
push 0
lea edx, [ebp - 0x254]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x254], 0x4c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x250], eax
lea ecx, [ebp - 0x4d4]
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x234], 0x80
lea edx, [ebp - 0x208]
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x218], 0x4079bc
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x220], 0x1004
lea ecx, [ebp - 0x254]
push ecx
call sub.comdlg32.dll_GetOpenFileNameW
test eax, eax
je 0x402838
lea edx, [ebp - 0x208]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x4079c4
lea eax, [ebp - 0x208]
push eax
push str.OpenPath
push str.Options
call sub.TOOLS_W.dll_TO_WritePrivateProfileString
push 0x80
lea ecx, [ebp - 0x3d4]
push ecx
mov edx, dword [ebp - 0x238]
push edx
call sub.comdlg32.dll_GetFileTitleW
movsx eax, ax
test eax, eax
jge 0x4026e6
push 0x50
push 0x40ab00
push 0x3f
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0x37
push 0x40ace0
push 0x32
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0
push 0x40ace0
push 0x40ab00
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x40283a
push 0x3e8
mov edx, dword [ebp - 0x238]
push edx
call sub.AR_V.dll_AR_ExistEx
mov dword [ebp - 0x4d8], eax
cmp dword [ebp - 0x4d8], 4
jne 0x402743
push 0x50
push 0x40ab00
push 0x3f
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0x37
push 0x40ace0
push 0x32
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0
push 0x40ace0
push 0x40ab00
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x40283a
cmp dword [ebp - 0x4d8], 3
jne 0x40278c
push 0x64
push 0x40aa20
push 0x825
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0x37
push 0x40ace0
push 0x32
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0
push 0x40ace0
push 0x40aa20
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x40283a
push 0
mov edx, dword [0x40706c]
push edx
call sub.BRW.dll_BRW_GetGraphicStatus
push eax
mov eax, dword [ebp - 0x238]
push eax
mov ecx, dword [0x40706c]
push ecx
call sub.BRW.dll_BRW_CreateView
mov dword [ebp - 0x4d8], eax
cmp dword [ebp - 0x4d8], 0xfffffc11
jne 0x4027f6
push 0x50
push 0x40ab00
push 0x2b
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0x37
push 0x40ace0
push 0x32
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0
push 0x40ace0
push 0x40ab00
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp dword [ebp - 0x4d8], 0xfffffc12
jne 0x402838
push 0x37
push 0x40adc0
push 0x2a
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0x37
push 0x40ace0
push 0x32
push 0x32
call sub.LGG.dll_LGG_LoadString
push 0
push 0x40ace0
push 0x40adc0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
mov esp, ebp
pop ebp
ret 4