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

Disassembly:
push 0xffffffffffffffff
push 0x40cb57
mov eax, dword fs:[0]
push eax
sub esp, 0x870
mov eax, dword [0x414018]
xor eax, esp
mov dword [esp + 0x868], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x414018]
xor eax, esp
push eax
lea eax, [esp + 0x884]
mov dword fs:[0], eax
mov eax, dword [esp + 0x894]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x898]
xor edi, edi
push eax
xor edx, edx
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edi
mov byte [esp + 0x23], 0
call fcn.00402a90
mov ecx, dword [0x414780]
xor ebp, ebp
cmp dword [ecx - 0xc], edi
je 0x406df8
mov eax, 0x414780
mov edi, edi
mov esi, dword [eax]
lea edx, [esp + 0x83c]
lea ecx, [esp + 0x3c]
call fcn.00402f50
test eax, eax
je 0x406904
cmp word [esi], 0x2e
jne 0x4068e9
lea esp, [esp]
add esi, 2
cmp word [esi], 0x2e
je 0x4068e0
lea edx, [esp + 0x83c]
push esi
push edx
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
sete al
test al, al
jne 0x406922
add ebp, 1
mov eax, ebp
shl eax, 5
mov ecx, dword [eax + 0x414780]
cmp dword [ecx - 0xc], edi
lea eax, [eax + 0x414780]
jne 0x4068c0
jmp 0x406df8
mov dword [esp + 0x28], ebp
shl ebp, 5
lea ebx, [ebp + 0x414790]
mov ecx, ebx
mov byte [esp + 0x1f], 1
call fcn.00402420
test eax, eax
je 0x406a39
push 1
push 0x2e
lea ecx, [esp + 0x2c]
call dword [sym.imp.MFC80U.DLL_Ordinal_281]
lea esi, [esp + 0x18]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x88c], edi
call fcn.004031d0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x890], 1
call dword [sym.imp.MFC80U.DLL_Ordinal_896]
mov ecx, esi
mov byte [esp + 0x88c], 0
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x18]
push edx
call fcn.00402800
mov eax, dword [eax]
test eax, eax
je 0x4069a0
mov eax, dword [eax]
jmp 0x4069a2
xor eax, eax
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov edi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4069f5
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4069ed
test esi, esi
je 0x4069ed
mov eax, dword [esi]
test eax, eax
je 0x4069d4
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
test eax, eax
je 0x4069e4
push eax
call sub.MFC80U.DLL_Ordinal_266
add esp, 4
push esi
call sub.MFC80U.DLL_Ordinal_764
add esp, 4
mov dword [esp + 0x18], 0
mov eax, dword [0x4146a0]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
push ebx
push edi
push eax
call edx
test eax, eax
push edi
jge 0x406a1e
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [esp + 0x24]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
jmp 0x406e17
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [esp + 0x24]
mov dword [esp + 0x88c], 0xffffffff
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov ecx, ebx
call fcn.00402420
test eax, eax
jne 0x406a8e
cmp dword [ebp + 0x414788], 0
lea eax, [ebp + 0x414788]
jne 0x406a8e
push eax
push 0x40e7b4
push 1
push 0
push ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x406a8e
mov eax, dword [0x40e758]
mov ecx, dword [0x40e75c]
mov edx, dword [0x40e760]
mov dword [ebx], eax
mov eax, dword [0x40e764]
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], eax
jmp 0x406e17
push 0x14
call sub.MFC80U.DLL_Ordinal_762
mov ebx, eax
add esp, 4
mov dword [esp + 0x30], ebx
test ebx, ebx
mov dword [esp + 0x88c], 2
je 0x406b15
lea esi, [esp + 0x38]
lea ecx, [esp + 0x3c]
call fcn.00403220
mov edi, eax
mov byte [esp + 0x88c], 3
lea esi, [esp + 0x24]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x20], 1
call fcn.00403180
mov dword [esp + 0x88c], 4
mov ecx, dword [ebp + 0x414788]
mov ebp, dword [esp + 0x2c]
mov edi, dword [edi]
mov esi, dword [eax]
push ecx
push ebp
lea ecx, [esp + 0x44]
mov dword [esp + 0x28], 3
call fcn.00407fb0
movzx edx, al
push edx
push edi
push esi
push ebx
call fcn.00403ab0
mov edi, eax
jmp 0x406b1b
mov ebp, dword [esp + 0x2c]
xor edi, edi
mov ebx, dword [esp + 0x20]
test bl, 2
je 0x406b35
and ebx, 0xfffffffd
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], ebx
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
test bl, 1
mov dword [esp + 0x88c], 0xffffffff
je 0x406b56
and ebx, 0xfffffffe
lea ecx, [esp + 0x38]
mov dword [esp + 0x20], ebx
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea esi, [esp + 0x30]
lea ecx, [esp + 0x3c]
call fcn.00403180
push eax
lea ecx, [ebp + 0x488]
mov dword [esp + 0x890], 7
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov ecx, esi
mov dword [esp + 0x88c], 0xffffffff
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
test edi, edi
je 0x406df8
push edi
mov ebx, ebp
call fcn.00407300
test al, al
jne 0x406dd5
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_293]
push 0
push 0
mov dword [esp + 0x894], 8
mov eax, dword [ebp + 0x388]
push 0x1004
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x28]
push 0
mov esi, eax
mov eax, dword [ebp + ecx*4 + 0x3d8]
push eax
push 0
push 0
push 0x40e770
push esi
lea ebx, [ebp + 0x368]
push 3
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_3873
mov eax, dword [edi]
push eax
push 1
push esi
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_5869
mov eax, dword [edi + 4]
push eax
push 2
push esi
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_5869
cmp word [esp + 0x3c], 0
je 0x406c2d
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406c62
push 0x8c
lea ecx, [esp + 0x1c]
call dword [sym.imp.MFC80U.DLL_Ordinal_4026]
mov eax, dword [esp + 0x18]
push eax
push 3
push esi
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_5869
lea ecx, [esp + 0x18]
push ecx
lea ecx, [edi + 0x10]
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov byte [edi + 0xc], 0
jmp 0x406da2
lea edx, [esp + 0x83c]
lea ecx, [esp + 0x3c]
call fcn.00402f50
test eax, eax
je 0x406c95
lea edx, [esp + 0x83c]
push 0x40efd8
push edx
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
sete al
test al, al
jne 0x406cf1
lea edx, [esp + 0x83c]
lea ecx, [esp + 0x3c]
call fcn.00402f50
test eax, eax
je 0x406cc8
lea eax, [esp + 0x83c]
push 0x40efe0
push eax
call dword [sym.imp.MSVCR80.dll__wcsicmp]
add esp, 8
test eax, eax
sete al
test al, al
jne 0x406cf1
lea edx, [esp + 0x83c]
lea ecx, [esp + 0x3c]
call fcn.00402f50
test eax, eax
je 0x406d31
push 0x40efe8
lea ecx, [esp + 0x840]
call fcn.00403290
test al, al
je 0x406d31
lea ecx, [esp + 0x3c]
push ecx
call fcn.00409740
add esp, 4
test eax, eax
jne 0x406d31
push 0x73
lea ecx, [esp + 0x1c]
call dword [sym.imp.MFC80U.DLL_Ordinal_4026]
mov edx, dword [esp + 0x18]
push edx
push 3
push esi
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_5869
lea eax, [esp + 0x18]
push eax
lea ecx, [edi + 0x10]
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov byte [edi + 0xc], 0
jmp 0x406da2
push 0x81
lea ecx, [esp + 0x1c]
call dword [sym.imp.MFC80U.DLL_Ordinal_4026]
cmp dword [edi + 8], 0
je 0x406d4c
lea eax, [esp + 0x18]
jmp 0x406d68
push 0x40efd6
lea ecx, [esp + 0x2c]
call dword [sym.imp.MFC80U.DLL_Ordinal_287]
mov byte [esp + 0x88c], 9
or dword [esp + 0x20], 4
lea ebp, [edi + 0x10]
push eax
mov ecx, ebp
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov dword [esp + 0x88c], 8
test byte [esp + 0x20], 4
je 0x406d90
lea ecx, [esp + 0x28]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov ebp, dword [ebp]
push ebp
push 3
push esi
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_5869
mov ebp, dword [esp + 0x2c]
push edi
push 0
push 0
push 0
push 0
push 4
push 0
push esi
mov ecx, ebx
call sub.MFC80U.DLL_Ordinal_5862
lea ecx, [esp + 0x18]
mov byte [ebp + 0x3c0], 1
mov dword [esp + 0x88c], 0xffffffff
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
jmp 0x406df8
lea ecx, [edi + 0x10]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
lea ecx, [edi + 4]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov ecx, edi
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
push edi
call sub.MFC80U.DLL_Ordinal_764
add esp, 4
cmp byte [esp + 0x89c], 0
je 0x406e17
cmp byte [esp + 0x1f], 0
jne 0x406e17
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x2c]
push ecx
call fcn.004070e0
mov ecx, dword [esp + 0x884]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x868]
xor ecx, esp
call fcn.0040b277
add esp, 0x87c
ret 0xc