Function at 0x10046cb0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x184c
call fcn.10099130
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x100fd948], 0
jne 0x1004728d
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0xc24]
push 0x104
push eax
push 0
call edi
mov esi, dword [sym.imp.MSVCR120.dll_wcscpy_s]
test eax, eax
je 0x10046cff
lea eax, [ebp - 0xc24]
push eax
jmp 0x10046d04
push str.c:hnchwp_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [ebp - 0x81c], ax
push 0x1fe
push eax
lea eax, [ebp - 0x81a]
push eax
call sub.MSVCR120.dll_memset
push 0
push 0
push 0x100
lea eax, [ebp - 0x81c]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x20c]
push 0
push eax
call dword [sym.imp.MSVCR120.dll__wsplitpath_s]
xor eax, eax
push 0x1fe
push eax
mov word [ebp - 0xa1c], ax
lea eax, [ebp - 0xa1a]
push eax
call sub.MSVCR120.dll_memset
lea eax, [ebp - 0x81c]
push eax
lea eax, [ebp - 0xa1c]
push 0x100
push eax
call esi
add esp, 0x48
lea eax, [ebp - 0xa1c]
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll__wcsupr_s]
lea eax, [ebp - 0xa1c]
push str.VIEWER
push eax
call dword [sym.imp.MSVCR120.dll_wcsstr]
add esp, 0x10
test eax, eax
je 0x10046dd4
lea ecx, [ebp - 0xa1c]
sub eax, ecx
sar eax, 1
push eax
lea eax, [ebp - 0x81c]
push eax
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
lea eax, [ebp - 0x81c]
push eax
push str.AppName
call sym.HncFoundation.dll_HncRegisterPath
xor eax, eax
mov dword [ebp - method._CHncFilePathT_unsigned_short_int_.virtual_0], vtable._CHncFilePathT_unsigned_short_int_.0
mov word [ebp - 0x1848], ax
lea ecx, [ebp - 0x184c]
mov word [ebp - 0x1842], ax
mov word [ebp - 0x1642], ax
mov word [ebp - 0x1442], ax
mov word [ebp - 0x1242], ax
lea eax, [ebp - 0x20c]
push eax
call fcn.10029760
push ecx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x184c]
call fcn.100472a0
lea eax, [ebp - 0x20c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x20c]
push eax
push 0x100c4b84
call sym.HncFoundation.dll_HncRegisterPath
push 0x104
lea eax, [ebp - 0xc24]
push eax
push dword [0x100f8578]
call edi
test eax, eax
je 0x10046e77
lea eax, [ebp - 0xc24]
push eax
jmp 0x10046e7c
push str.C:HncCommon110_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call esi
xor eax, eax
lea ecx, [ebp - 0x184c]
add esp, 0xc
mov word [ebp - 0x1848], ax
mov word [ebp - 0x1842], ax
mov word [ebp - 0x1642], ax
mov word [ebp - 0x1442], ax
mov word [ebp - 0x1242], ax
lea eax, [ebp - 0x20c]
push eax
call fcn.10029760
push ecx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x184c]
call fcn.100472a0
lea eax, [ebp - 0x20c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x20c]
push eax
push str.Common
call sym.HncFoundation.dll_HncRegisterPath
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call dword [sym.imp.MSVCR120.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x10046f0f
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x414]
push eax
push 0x100c4b48
call sym.HncFoundation.dll_HncRegisterPath
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push str._sShared
push eax
call fcn.10028380
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x20c]
add esp, 0xc
push eax
call edi
cmp eax, 0xffffffff
je 0x10046f78
and eax, 0x10
jne 0x10046f9d
lea ecx, [ebp - 0x20c]
call fcn.100469c0
test eax, eax
jne 0x10046f9d
push str.C:HncShared_
lea eax, [ebp - 0x20c]
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call edi
cmp eax, 0xffffffff
je 0x10046fb0
and eax, 0x10
jne 0x10046fcb
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push str._sShared
push eax
call fcn.10028380
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x20c]
push eax
push str.SharedData
call sym.HncFoundation.dll_HncRegisterPath
lea eax, [ebp - 0x20c]
push eax
push str.InternalSharedData
call sym.HncFoundation.dll_HncRegisterPath
mov edi, dword [sym.imp.MSVCR120.dll__wgetenv_s]
lea eax, [ebp - 0xe2c]
push 0x100c4c2c
push 0x104
push eax
lea eax, [ebp - 0x1038]
mov dword [ebp - 0x1038], 0
push eax
call edi
mov eax, dword [ebp - 0x1038]
add esp, 0x10
test eax, eax
jne 0x10047057
push str.TEMP
push 0x104
lea eax, [ebp - 0xe2c]
push eax
lea eax, [ebp - 0x1038]
push eax
call edi
mov eax, dword [ebp - 0x1038]
add esp, 0x10
test eax, eax
je 0x1004705f
lea eax, [ebp - 0xe2c]
jmp 0x10047099
lea ecx, [ebp - 0x414]
call fcn.10046b80
test eax, eax
je 0x10047088
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x61c]
push str._sTemp_
push eax
call fcn.10028380
jmp 0x100470a8
lea edx, [ebp - 0xc24]
call fcn.100467f0
lea eax, [ebp - 0xc24]
push eax
lea eax, [ebp - 0x61c]
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x61c]
push eax
push str.Temp
call sym.HncFoundation.dll_HncRegisterPath
xor eax, eax
lea edx, [ebp - 0x20c]
push ecx
xor ecx, ecx
mov word [ebp - 0x20c], ax
call fcn.10046860
add esp, 4
pop edi
pop esi
test eax, eax
jne 0x10047118
lea ecx, [ebp - 0x414]
call fcn.10046b80
test eax, eax
lea eax, [ebp - 0x414]
jne 0x10047103
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x20c]
push str._sAppData_
push eax
call fcn.10028380
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x20c]
push eax
push str.UserData
call sym.HncFoundation.dll_HncRegisterPath
push str.UserShared110
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.MSVCR120.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x20c]
push eax
push str.UserSharedData
call sym.HncFoundation.dll_HncRegisterPath
xor eax, eax
lea edx, [ebp - 0x20c]
push ecx
mov word [ebp - 0x20c], ax
lea ecx, [eax + 1]
call fcn.10046860
add esp, 4
test eax, eax
jne 0x100471bb
lea ecx, [ebp - 0x414]
call fcn.10046b80
test eax, eax
lea eax, [ebp - 0x414]
jne 0x100471a6
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x20c]
push str._sSysData_
push eax
call fcn.10028380
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call sym.HncFoundation.dll_HncRemoveBackSlash
lea eax, [ebp - 0x20c]
push eax
push str.AllUserData
call sym.HncFoundation.dll_HncRegisterPath
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLCID]
push eax
call sym.HncFoundation.dll_HncGetResourceExt
lea eax, [ebp - 0x20c]
push eax
push str.SysExt
call sym.HncFoundation.dll_HncRegisterPath
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0xffff
call sym.HncFoundation.dll_HncGetResourceExt
lea eax, [ebp - 0x20c]
push eax
push str.ResExt
call sym.HncFoundation.dll_HncRegisterPath
mov edx, 0x104
lea ecx, [ebp - 0x1034]
call fcn.10048750
lea eax, [ebp - 0x1034]
push eax
push str.Culture
call sym.HncFoundation.dll_HncRegisterPath
push 0x100c4d08
push str.DsoExt
call sym.HncFoundation.dll_HncRegisterPath
xor eax, eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x61c]
push 0x100c4cf0
push eax
call fcn.10028380
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
push str.Lang
call sym.HncFoundation.dll_HncRegisterPath
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100944ae
mov esp, ebp
pop ebp
ret