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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x533d84
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x56adc0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x70], ebx
push ebx
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], ebx
push 0x53ff0c
mov ecx, edi
mov dword [ebp - 0x74], edi
mov word [edi], ax
call fcn.00404bd5
mov eax, 1
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], ebx
push ecx
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
call fcn.00424dd0
add esp, 4
mov dword [ebp - 4], 1
cmp dword [ebp - 0x1c], ebx
je 0x40ec46
lea edx, [ebp - 0x48]
push str.kometa.exe
push edx
mov ebx, esi
call fcn.00405c6f
add esp, 8
mov esi, eax
mov eax, ebx
cmp eax, esi
je 0x40ebf5
cmp dword [ebp - 0x18], 8
jb 0x40eb9e
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004f77ab
add esp, 4
xor edx, edx
mov ebx, 7
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], dx
cmp dword [esi + 0x14], 8
jae 0x40ebcf
mov eax, dword [esi + 0x10]
inc eax
add eax, eax
push eax
lea ecx, [ebp - 0x2c]
push esi
push ecx
call fcn.004f6f30
add esp, 0xc
jmp 0x40ebda
mov edx, dword [esi]
mov dword [ebp - 0x2c], edx
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], eax
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x18], ecx
xor edx, edx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov word [esi], dx
mov byte [ebp - 4], 1
cmp dword [ebp - 0x34], 8
jb 0x40ec0b
mov eax, dword [ebp - 0x48]
push eax
call fcn.004f77ab
add esp, 4
cmp dword [ebp - 0x18], 8
jb 0x40ec31
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40ec36
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ec36
test al, 0x10
jne 0x40ec36
push 9
push str.kometa1
jmp 0x40ec3d
lea eax, [ebp - 0x2c]
jmp 0x40ec18
push 9
push str.kometa0
mov ecx, edi
call fcn.00404b34
xor ebx, ebx
lea ecx, [ebp - 0x68]
push ecx
push str.scnt
mov dword [ebp - 0x68], ebx
call fcn.004201f0
add esp, 8
lea edx, [ebp - 0x120]
push edx
call fcn.0040d3e0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x68]
push eax
lea ecx, [ebp - 0x110]
push ecx
call fcn.00422730
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x120]
call fcn.0040d540
push eax
lea edx, [ebp - 0x48]
push str.installcount
push edx
mov byte [ebp - 4], 4
call fcn.00405fff
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.00404a91
mov esi, 8
cmp dword [ebp - 0x34], esi
jb 0x40ecc3
mov eax, dword [ebp - 0x48]
push eax
call fcn.004f77ab
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], cx
cmp dword [ebp - 0x50], esi
jb 0x40ece4
mov edx, dword [ebp - 0x64]
push edx
call fcn.004f77ab
add esp, 4
lea ecx, [ebp - 0xc0]
mov byte [ebp - 4], 1
call fcn.0040d4b0
lea eax, [ebp - 0xc0]
push eax
mov dword [ebp - 0xc0], vtable.std::ios_base.0
call fcn.005168a4
add esp, 4
cmp dword [ebp - 0x18], esi
jb 0x40ed1d
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004f77ab
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f6bad
mov esp, ebp
pop ebp
ret