Function at 0x406d90
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x814
mov eax, dword [0x451c14]
xor eax, esp
mov dword [esp + 0x80c], eax
push ebx
push ebp
push esi
push edi
push 0x800
lea eax, [esp + 0x1c]
push 0
push eax
mov esi, ecx
call fcn.00428ee0
add esp, 0xc
test esi, esi
je 0x406e4a
mov eax, esi
lea edx, [eax + 2]
jmp 0x406dd0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406dd0
sub eax, edx
sar eax, 1
je 0x406e4a
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406e4a
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x406e4a
push 0x3ff
push esi
lea ecx, [esp + 0x20]
push 0x400
push ecx
call fcn.00426b21
lea eax, [esp + 0x28]
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406e16
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x16], 0x5c
jne 0x406e90
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406e34
sub eax, edx
sar eax, 1
mov word [esp + eax*2 + 0x16], cx
jmp 0x406e90
push 0x400
lea edx, [esp + 0x1c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x406e90
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406e67
sub eax, edx
sar eax, 1
je 0x406e90
lea eax, [esp + 0x18]
push 0x5c
push eax
call fcn.004275d1
add esp, 8
test eax, eax
je 0x406e90
mov word [eax], 0
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406e97
sub eax, edx
sar eax, 1
je 0x406ecc
lea ecx, [esp + 0x18]
call fcn.00408730
test al, al
jne 0x406ed3
lea ecx, [esp + 0x18]
push ecx
push str.find_manual_source_path_under___s__fail__
mov ecx, 0x463520
call fcn.0040bf70
add esp, 8
xor al, al
jmp 0x4070bb
call fcn.00407eb0
call fcn.00408c40
mov esi, 0x46350c
call fcn.004062b0
cmp word [0x463510], 9
jne 0x406f74
mov eax, dword [0x463518]
mov esi, dword [eax]
cmp esi, eax
jne 0x406f05
call fcn.00426fb3
mov edi, dword [esi + 0x2c]
cmp edi, dword [esi + 0x30]
lea ebp, [esi + 0x28]
jbe 0x406f15
call fcn.00426fb3
mov eax, dword [0x463518]
mov esi, dword [eax]
cmp esi, eax
jne 0x406f25
call fcn.00426fb3
mov ebx, dword [esi + 0x30]
add esi, 0x28
cmp dword [esi + 4], ebx
jbe 0x406f35
call fcn.00426fb3
cmp ebp, esi
je 0x406f3e
call fcn.00426fb3
cmp edi, ebx
je 0x406f74
cmp edi, dword [ebp + 8]
jb 0x406f4c
call fcn.00426fb3
movzx eax, word [0x46350e]
mov ecx, edi
call fcn.004063c0
test al, al
jne 0x4070b9
cmp edi, dword [ebp + 8]
jb 0x406f6c
call fcn.00426fb3
add edi, 0x2014
jmp 0x406f15
mov eax, dword [0x463518]
mov esi, dword [eax]
cmp esi, eax
jne 0x406f84
call fcn.00426fb3
mov edi, dword [esi + 0x2c]
cmp edi, dword [esi + 0x30]
lea ebp, [esi + 0x28]
jbe 0x406f94
call fcn.00426fb3
mov eax, dword [0x463518]
mov esi, dword [eax]
cmp esi, eax
jne 0x406fa4
call fcn.00426fb3
mov ebx, dword [esi + 0x30]
add esi, 0x28
cmp dword [esi + 4], ebx
jbe 0x406fb4
call fcn.00426fb3
cmp ebp, esi
je 0x406fbd
call fcn.00426fb3
cmp edi, ebx
je 0x406ff3
cmp edi, dword [ebp + 8]
jb 0x406fcb
call fcn.00426fb3
movzx eax, word [0x463510]
mov ecx, edi
call fcn.004063c0
test al, al
jne 0x4070b9
cmp edi, dword [ebp + 8]
jb 0x406feb
call fcn.00426fb3
add edi, 0x2014
jmp 0x406f94
mov eax, dword [0x463518]
mov esi, dword [eax]
cmp esi, eax
jne 0x407003
call fcn.00426fb3
mov edi, dword [esi + 0x2c]
cmp edi, dword [esi + 0x30]
lea ebp, [esi + 0x28]
jbe 0x407013
call fcn.00426fb3
mov eax, dword [0x463518]
mov esi, dword [eax]
cmp esi, eax
jne 0x407023
call fcn.00426fb3
mov ebx, dword [esi + 0x30]
add esi, 0x28
cmp dword [esi + 4], ebx
jbe 0x407033
call fcn.00426fb3
cmp ebp, esi
je 0x40703c
call fcn.00426fb3
cmp edi, ebx
je 0x4070b9
cmp edi, dword [ebp + 8]
jb 0x40704e
call fcn.00426fb3
mov esi, 9
cmp dword [edi + 0x2004], esi
je 0x40706d
cmp edi, dword [ebp + 8]
jb 0x407065
call fcn.00426fb3
add edi, 0x2014
jmp 0x407013
push str.langid__m_LangID
mov ecx, 0x463520
call fcn.0040bf70
add esp, 4
cmp dword [edi + 0x2004], esi
jne 0x407099
push str.PRIMARYLANGID_langid___m_LangID
mov ecx, 0x463520
call fcn.0040bf70
add esp, 4
mov byte [edi + 0x200c], 1
add edi, 0x800
push edi
push str.Set_Default_:__s
mov ecx, 0x463520
call fcn.0040bf70
add esp, 8
mov al, 1
mov ecx, dword [esp + 0x81c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042683e
add esp, 0x814
ret