Function at 0x404af0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c65f6
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x4fad60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
lea ecx, [ebp - 0xe4]
push ebx
push ecx
lea ecx, [ebx + 0x20]
mov dword [ebp - 0xec], esi
mov dword [ebp - 0xe4], eax
call fcn.00404820
add esp, 8
test eax, eax
je 0x404b67
mov edx, dword [ebp - 0xe4]
mov ecx, dword [ebp - 0xe0]
lea eax, [ebx + 0x20]
mov dword [esi], edx
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
lea eax, [ebx + 1]
jmp 0x405020
lea edx, [ebp - 0xe4]
push 1
push edx
mov ecx, 0x20
call fcn.00404820
add esp, 8
test eax, eax
je 0x404ba4
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ebp - 0xe0]
mov eax, 0x20
mov dword [esi], ecx
mov dword [esi + 4], edx
mov dword [esi + 8], eax
mov eax, 1
jmp 0x405020
mov eax, dword [0x4ff1e4]
cmp eax, ebx
je 0x40501e
cmp eax, 1
je 0x404bf6
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.GetNativeSystemInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x404e4f
lea ecx, [ebp - 0x114]
push ecx
call eax
cmp word [ebp - 0x114], 9
jne 0x40503c
mov dword [0x4ff1e4], 1
mov edi, 7
xor edx, edx
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x84], ebx
mov word [ebp - 0x94], dx
mov dword [ebp - 0x98], 1
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0xe4]
lea ecx, [eax*8]
push ebx
sub ecx, eax
sub esp, 0x1c
lea eax, [ecx*4 + 0x4fc6d0]
mov ecx, esp
mov dword [ebp - 0xf0], esp
mov dword [ebp - 0x78], 0x100
mov dword [ebp - 0x9c], reloc.OLEAUT32.dll_SysReAllocString
push ebx
push eax
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
or eax, 0xffffffff
mov word [ecx], dx
call fcn.00404570
lea ecx, [ebp - 0xa0]
call fcn.004091e0
xor eax, eax
mov word [ebp - 0x48], ax
push ebx
mov eax, 0x4ddda0
lea esi, [ebp - 0x48]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
call fcn.00403e70
sub esp, 0x1c
mov byte [ebp - 4], 1
mov esi, esp
mov dword [ebp - 0xf0], esp
xor ecx, ecx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
push ebx
mov eax, 0x4ddda0
mov word [esi], cx
call fcn.00403e70
sub esp, 0x1c
mov byte [ebp - 4], 2
mov esi, esp
mov dword [ebp - 0xe8], esp
xor edx, edx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
push 0xc
mov eax, str.AcadLocation
mov word [esi], dx
call fcn.00403e70
lea edx, [ebp - 0xbc]
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 1
call fcn.00409c60
mov edi, eax
lea esi, [ebp - 0x48]
mov byte [ebp - 4], 3
call fcn.00409010
mov esi, 8
mov byte [ebp - 4], 1
cmp dword [ebp - 0xa8], esi
jb 0x404d19
mov eax, dword [ebp - 0xbc]
push eax
call fcn.00490a16
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xac], ebx
mov word [ebp - 0xbc], cx
cmp dword [ebp - 0x38], ebx
jne 0x404da5
cmp dword [ebp - 0x34], esi
jb 0x404d49
mov edx, dword [ebp - 0x48]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
or eax, 0xffffffff
xor ecx, ecx
lea esi, [ebp - 0x94]
mov dword [ebp - 4], 4
call fcn.00404150
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x80], 8
mov dword [ebp - 0x9c], VariantCopy
mov dword [ebp - 0x98], 1
jb 0x404e54
mov ecx, dword [ebp - 0x94]
push ecx
call fcn.00490a16
add esp, 4
jmp 0x404e54
push 9
mov eax, str.Acad.exe
lea ecx, [ebp - 0x48]
call fcn.00407570
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], esi
jae 0x404dbf
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404e1d
cmp dword [ebp - 0x34], esi
jb 0x404ddb
mov edx, dword [ebp - 0x48]
push edx
call fcn.00490a16
add esp, 4
lea ecx, [ebp - 0xa0]
xor eax, eax
push ecx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
mov dword [ebp - 4], 0xffffffff
call fcn.00409110
mov ecx, dword [ebp - 0xec]
mov edx, dword [ebp - 0xe4]
mov eax, 0x40
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, 1
jmp 0x405020
cmp dword [ebp - 0x34], esi
jb 0x404e2e
mov edx, dword [ebp - 0x48]
push edx
call fcn.00490a16
add esp, 4
lea ecx, [ebp - 0xa0]
xor eax, eax
push ecx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
mov dword [ebp - 4], 0xffffffff
call fcn.00409110
jmp 0x404e54
mov edi, 7
mov eax, dword [0x4ff1e4]
cmp eax, ebx
je 0x40501e
mov esi, 1
cmp eax, esi
je 0x404ea6
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.GetNativeSystemInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40501e
lea ecx, [ebp - 0x138]
push ecx
call eax
cmp word [ebp - 0x138], 9
jne 0x40503c
mov dword [0x4ff1e4], esi
xor edx, edx
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x58], ebx
mov word [ebp - 0x68], dx
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0xe4]
lea ecx, [eax*8]
push ebx
sub ecx, eax
sub esp, 0x1c
lea eax, [ecx*4 + 0x4fc8e8]
mov ecx, esp
mov dword [ebp - 0xe8], esp
mov dword [ebp - 0x4c], 0x100
mov dword [ebp - 0x70], reloc.OLEAUT32.dll_SysReAllocString
push ebx
push eax
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
or eax, 0xffffffff
mov word [ecx], dx
call fcn.00404570
lea ecx, [ebp - 0x74]
call fcn.004091e0
xor eax, eax
mov word [ebp - 0x2c], ax
push ebx
mov eax, 0x4ddda0
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], ebx
call fcn.00403e70
sub esp, 0x1c
mov byte [ebp - 4], 6
mov esi, esp
mov dword [ebp - 0xe8], esp
xor ecx, ecx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
push ebx
mov eax, 0x4ddda0
mov word [esi], cx
call fcn.00403e70
sub esp, 0x1c
mov byte [ebp - 4], 7
mov esi, esp
mov dword [ebp - 0xf0], esp
xor edx, edx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
push 0xc
mov eax, str.AcadLocation
mov word [esi], dx
call fcn.00403e70
lea edx, [ebp - 0xd8]
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 6
call fcn.00409c60
mov edi, eax
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 8
call fcn.00409010
mov edi, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0xc4], edi
jb 0x404faf
mov eax, dword [ebp - 0xd8]
push eax
call fcn.00490a16
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0xc8], ebx
mov word [ebp - 0xd8], cx
cmp dword [ebp - 0x1c], ebx
jne 0x405044
cmp dword [ebp - 0x18], edi
jb 0x404fdf
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00490a16
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
or eax, 0xffffffff
xor ecx, ecx
lea esi, [ebp - 0x68]
mov dword [ebp - 4], 9
call fcn.00404150
mov dword [ebp - 0x70], SysReAllocString
mov dword [ebp - 0x6c], 1
cmp dword [ebp - 0x54], edi
jb 0x40501e
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.00490a16
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00490a21
mov esp, ebp
pop ebp
ret
mov dword [0x4ff1e4], ebx
jmp 0x40501e
push 9
mov eax, str.Acad.exe
lea ecx, [ebp - 0x2c]
call fcn.00407570
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x40505e
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4050bf
mov esi, 1
cmp dword [ebp - 0x18], edi
jb 0x40507f
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00490a16
add esp, 4
lea ecx, [ebp - 0x74]
xor eax, eax
push ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
mov dword [ebp - 4], 0xffffffff
call fcn.00409110
mov eax, dword [ebp - 0xec]
mov edx, dword [ebp - 0xe4]
mov dword [eax], edx
mov ecx, 0x40
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov eax, esi
jmp 0x405020
cmp dword [ebp - 0x18], edi
jb 0x4050d0
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00490a16
add esp, 4
lea ecx, [ebp - 0x74]
xor eax, eax
push ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
mov dword [ebp - 4], 0xffffffff
call fcn.00409110
jmp 0x40501e