Function at 0x40d58c
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x48340d
call fcn.00482d18
sub esp, 0x38
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x11], dl
mov esi, ecx
mov dword [ebp - 0x44], esi
xor edi, edi
mov dword [ebp - 0x40], edi
push 0x497a60
call fcn.00402244
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x1c]
call fcn.00402286
mov dword [ebp - 0x20], edi
lea eax, [ebp - 0x28]
push eax
call fcn.0040b543
push eax
push 0x49a000
lea ecx, [ebp - 0x30]
call fcn.00417006
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00405731
add esp, 0xc
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00405774
add esp, 0xc
lea ecx, [ebp - 0x34]
call fcn.0040223f
lea ecx, [ebp - 0x30]
call fcn.0040223f
lea ecx, [ebp - 0x28]
call fcn.0040223f
push str.GRID_INDEPENDENT
lea ecx, [ebp - 0x34]
call fcn.00402244
lea ecx, [ebp - 0x28]
call fcn.004178fa
mov ecx, eax
call fcn.00402642
push eax
lea ecx, [ebp - 0x30]
call fcn.004058df
lea ecx, [ebp - 0x28]
call fcn.0040223f
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x2c]
call fcn.00416bce
lea ecx, [ebp - 0x18]
call fcn.0040b7e1
push ecx
mov ecx, esp
lea eax, [ebp - 0x18]
push eax
call fcn.00402274
call fcn.0040ce83
mov edi, eax
mov dword [esp], str.C:Program_Files__x86_
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor ebx, ebx
inc ebx
cmp eax, ebx
mov ecx, str.64_bit
je 0x40d67e
mov ecx, str.32_bit
push ecx
lea ecx, [ebp - 0x28]
call fcn.00402244
push ecx
mov ecx, esp
call fcn.0040b820
mov edx, edi
lea ecx, [ebp - 0x24]
call fcn.0040d22d
pop ecx
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x1c]
call fcn.0040b858
cmp byte [ebp - 0x11], 0
je 0x40d6c5
push ecx
mov ecx, esp
lea eax, [ebp - 0x38]
push eax
call fcn.00402274
push 5
pop edx
lea ecx, [ebp - 0x40]
call fcn.0040d22d
pop ecx
jmp 0x40d6d5
push 0x497a60
lea ecx, [ebp - 0x3c]
call fcn.00402244
push 2
pop ebx
push eax
lea ecx, [ebp - 0x20]
call fcn.00402274
test bl, 2
je 0x40d6ee
and ebx, 0xfffffffd
lea ecx, [ebp - 0x3c]
call fcn.0040223f
test bl, 1
je 0x40d6fb
lea ecx, [ebp - 0x40]
call fcn.0040223f
push ecx
mov ecx, esp
lea eax, [ebp - 0x28]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x20]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x1c]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x2c]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x30]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x34]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x24]
push eax
call fcn.00402274
push ecx
mov ecx, esp
lea eax, [ebp - 0x18]
push eax
call fcn.00402274
mov dl, byte [ebp - 0x11]
lea ecx, [ebp - 0x40]
call fcn.0040d49b
add esp, 0x20
push eax
mov ecx, esi
call fcn.0040222d
lea ecx, [ebp - 0x40]
call fcn.0040223f
lea ecx, [ebp - 0x20]
call fcn.0040223f
lea ecx, [ebp - 0x24]
call fcn.0040223f
lea ecx, [ebp - 0x28]
call fcn.0040223f
lea ecx, [ebp - 0x18]
call fcn.0040223f
lea ecx, [ebp - 0x2c]
call fcn.0040223f
lea ecx, [ebp - 0x30]
call fcn.0040223f
lea ecx, [ebp - 0x34]
call fcn.0040223f
lea ecx, [ebp - 0x38]
call fcn.0040223f
lea ecx, [ebp - 0x1c]
call fcn.0040223f
or dword [ebp - 4], 0xffffffff
jmp 0x40d7e5
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret