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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b16c4
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x4d8c20]
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 0x4b9470
mov ecx, edi
mov dword [ebp - 0x74], edi
mov word [edi], ax
call fcn.00404447
mov eax, 1
mov dword [ebp - 4], ebx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
lea esi, [ebp - 0x2c]
call fcn.00419170
mov dword [ebp - 4], 1
cmp dword [ebp - 0x1c], ebx
je 0x40b313
lea ecx, [ebp - 0x48]
push str.kometa.exe
push ecx
mov ebx, esi
call fcn.004054c5
add esp, 8
mov esi, eax
mov edx, ebx
cmp edx, esi
je 0x40b2c2
cmp dword [ebp - 0x18], 8
jb 0x40b26a
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00475dcb
add esp, 4
xor ecx, ecx
mov ebx, 7
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], cx
cmp dword [esi + 0x14], 8
jae 0x40b29c
mov eax, dword [esi + 0x10]
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x2c]
push esi
push eax
call fcn.00475550
add esp, 0xc
jmp 0x40b2a7
mov ecx, dword [esi]
mov dword [ebp - 0x2c], ecx
mov dword [esi], 0
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x1c], edx
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x18], eax
xor ecx, ecx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov word [esi], cx
mov byte [ebp - 4], 1
cmp dword [ebp - 0x34], 8
jb 0x40b2d8
mov edx, dword [ebp - 0x48]
push edx
call fcn.00475dcb
add esp, 4
cmp dword [ebp - 0x18], 8
jb 0x40b2fe
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40b303
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40b303
test al, 0x10
jne 0x40b303
push 9
push str.kometa1
jmp 0x40b30a
lea eax, [ebp - 0x2c]
jmp 0x40b2e5
push 9
push str.kometa0
mov ecx, edi
call fcn.004043a6
xor ebx, ebx
lea eax, [ebp - 0x68]
push eax
push str.pcnt
mov dword [ebp - 0x68], ebx
call fcn.00415a50
add esp, 8
lea ecx, [ebp - 0x120]
push ecx
call fcn.0040ceb0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x68]
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.0040a3e8
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x120]
call fcn.0040d010
push eax
lea ecx, [ebp - 0x48]
push str.installcount
push ecx
mov byte [ebp - 4], 4
call fcn.0040a30a
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.00404303
mov esi, 8
cmp dword [ebp - 0x34], esi
jb 0x40b390
mov edx, dword [ebp - 0x48]
push edx
call fcn.00475dcb
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
cmp dword [ebp - 0x50], esi
jb 0x40b3b1
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00475dcb
add esp, 4
lea ecx, [ebp - 0xc0]
mov byte [ebp - 4], 1
call fcn.0040cf80
lea edx, [ebp - 0xc0]
push edx
mov dword [ebp - 0xc0], vtable.std::ios_base.0
call fcn.0048fd9f
add esp, 4
cmp dword [ebp - 0x18], esi
jb 0x40b3ea
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00475dcb
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.004751dc
mov esp, ebp
pop ebp
ret