Function at 0x40c120
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b1f54
mov eax, dword fs:[0]
push eax
sub esp, 0x1dc
mov eax, dword [0x4d8c20]
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
lea ecx, [ebp - 0xb8]
call fcn.0040af10
xor ebx, ebx
push str.KometaLaunchPanel.exe
mov dword [ebp - 4], ebx
call fcn.0041aa60
add esp, 4
cmp al, bl
je 0x40c18b
push str.KometaLaunchPanel
push ebx
call dword [sym.imp.USER32.dll_FindWindowW]
push ebx
push ebx
push 0x10
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
call fcn.0041ad00
cmp dword [ebp - 0xa4], 8
mov eax, dword [ebp - 0xb8]
jae 0x40c1a0
lea eax, [ebp - 0xb8]
push eax
push 0x6e
call fcn.0041ae60
add esp, 8
test al, al
jne 0x40c24e
push 0xa2
push str.apppanel.cpp
lea esi, [ebp - 0x1e8]
call fcn.00414f70
mov edi, eax
mov byte [ebp - 4], 1
cmp edi, ebx
je 0x40c221
lea esi, [edi + 0x10]
cmp esi, ebx
je 0x40c1de
lea eax, [edi + 0x20]
jmp 0x40c1e0
xor eax, eax
push str.ERROR:
push eax
call fcn.00407256
add esp, 8
cmp esi, ebx
je 0x40c1f7
lea eax, [edi + 0x20]
jmp 0x40c1f9
xor eax, eax
push str.Failed_unzip_resources_to_kometa_folder
push eax
call fcn.00407256
add esp, 8
cmp esi, ebx
je 0x40c210
lea eax, [edi + 0x20]
jmp 0x40c212
xor eax, eax
push eax
lea ecx, [ebp - 0xb8]
call fcn.0040741c
add esp, 4
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], bl
call fcn.00415130
cmp dword [ebp - 0xa4], 8
jb 0x40c247
mov eax, dword [ebp - 0xb8]
push eax
call fcn.00475dcb
add esp, 4
xor al, al
jmp 0x40cb80
xor ecx, ecx
push 0x15
mov word [ebp - 0x48], cx
push str.KometaLaunchPanel.exe
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
call fcn.00404447
lea edx, [ebp - 0xb8]
push edx
lea ebx, [ebp - 0x48]
lea edi, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.00419220
add esp, 4
mov esi, 8
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], esi
jb 0x40c298
mov edx, dword [eax]
jmp 0x40c29a
mov edx, eax
xor edi, edi
xor eax, eax
mov word [ebp - 0x80], ax
mov eax, edx
mov dword [ebp - 0x6c], 7
mov dword [ebp - 0x70], edi
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40c2b1
sub eax, ebx
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x80]
call fcn.00404447
lea edx, [ebp - 0x80]
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 4
call fcn.0041b410
cmp dword [ebp - 0x6c], esi
jb 0x40c2ed
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.00475dcb
add esp, 4
mov ebx, 7
xor edx, edx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], edi
mov word [ebp - 0x80], dx
cmp dword [ebp - 0x18], esi
jb 0x40c30f
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00475dcb
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], edi
mov word [ebp - 0x2c], cx
mov byte [ebp - 4], 8
cmp dword [ebp - 0x34], esi
jb 0x40c330
mov edx, dword [ebp - 0x48]
push edx
call fcn.00475dcb
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], edi
mov word [ebp - 0x48], ax
call fcn.0040bdb0
call fcn.0040b520
lea ecx, [ebp - 0xd4]
push ecx
lea ecx, [ebp - 0xb8]
call fcn.0040be30
add esp, 4
call fcn.0041a0d0
test al, al
jne 0x40c416
push 0xc
xor edx, edx
push str.normaliz.dll
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], edi
mov word [ebp - 0x64], dx
call fcn.00404447
lea eax, [ebp - 0xb8]
push eax
lea ebx, [ebp - 0x64]
lea edi, [ebp - 0x9c]
mov byte [ebp - 4], 9
call fcn.00419220
mov ebx, 8
add esp, 4
mov byte [ebp - 4], bl
cmp dword [ebp - 0x50], ebx
jb 0x40c3bc
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00475dcb
add esp, 4
cmp dword [ebp - 0x88], ebx
jb 0x40c547
mov eax, dword [ebp - 0x9c]
test eax, eax
je 0x40c3fd
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40c3fd
test al, 0x10
jne 0x40c3fd
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0x88], ebx
jae 0x40c3f6
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x88], ebx
jb 0x40c414
mov edx, dword [ebp - 0x9c]
push edx
call fcn.00475dcb
add esp, 4
xor edi, edi
push 0xc
xor eax, eax
mov esi, 7
push str.kometaup.zip
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], edi
mov word [ebp - 0x9c], ax
call fcn.00404447
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 0xa
call fcn.0040af10
push eax
lea ebx, [ebp - 0x9c]
lea edi, [ebp - 0xf0]
mov byte [ebp - 4], 0xb
call fcn.00419220
add esp, 4
mov edi, 8
cmp dword [ebp - 0x114], edi
jb 0x40c486
mov ecx, dword [ebp - 0x128]
push ecx
call fcn.00475dcb
add esp, 4
xor ebx, ebx
xor edx, edx
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x118], ebx
mov word [ebp - 0x128], dx
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x88], edi
jb 0x40c4b8
mov eax, dword [ebp - 0x9c]
push eax
call fcn.00475dcb
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], ebx
mov word [ebp - 0x9c], cx
cmp dword [ebp - 0xdc], edi
jb 0x40c552
mov eax, dword [ebp - 0xf0]
cmp eax, ebx
je 0x40c5ac
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40c5ac
test al, 0x10
jne 0x40c5ac
mov ecx, dword [ebp - 0xf0]
cmp dword [ebp - 0xdc], edi
jae 0x40c50f
lea ecx, [ebp - 0xf0]
call fcn.0041b740
test al, al
jne 0x40c5ac
push 0xbf
push str.apppanel.cpp
lea esi, [ebp - 0x1e8]
call fcn.00414f70
mov esi, eax
mov byte [ebp - 4], 0xf
cmp esi, ebx
je 0x40c59d
lea edi, [esi + 0x10]
cmp edi, ebx
je 0x40c55a
lea eax, [esi + 0x20]
jmp 0x40c55c
lea eax, [ebp - 0x9c]
jmp 0x40c3d2
lea eax, [ebp - 0xf0]
jmp 0x40c4e3
xor eax, eax
push str.ERROR:
push eax
call fcn.00407256
add esp, 8
cmp edi, ebx
je 0x40c573
lea eax, [esi + 0x20]
jmp 0x40c575
xor eax, eax
push str.failed_to_check
push eax
call fcn.00407256
add esp, 8
cmp edi, ebx
je 0x40c58c
lea eax, [esi + 0x20]
jmp 0x40c58e
xor eax, eax
push eax
lea ecx, [ebp - 0xf0]
call fcn.0040741c
add esp, 4
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 0xe
call fcn.00415130
push 0xb
xor edx, edx
push str.getdata.exe
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], dx
call fcn.00404447
lea eax, [ebp - 0xb8]
push eax
lea ebx, [ebp - 0x48]
lea edi, [ebp - 0x80]
mov byte [ebp - 4], 0x10
call fcn.00419220
add esp, 4
mov ebx, 8
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0x34], ebx
jb 0x40c5fe
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00475dcb
add esp, 4
xor esi, esi
xor edx, edx
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], esi
mov word [ebp - 0x48], dx
cmp dword [ebp - 0x6c], ebx
jb 0x40c85b
mov eax, dword [ebp - 0x80]
cmp eax, esi
je 0x40c6c5
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40c6c5
test al, 0x10
jne 0x40c6c5
lea eax, [ebp - 0x2c]
push str.__browserdefault___output_path_
push eax
lea edi, [ebp - 0xb8]
call fcn.00405855
lea ecx, [ebp - 0x64]
push str.____targetPANEL
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x13
call fcn.00405536
add esp, 0x10
mov byte [ebp - 4], 0x15
cmp dword [ebp - 0x18], ebx
jb 0x40c67c
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00475dcb
add esp, 4
mov edx, dword [ebp - 0x64]
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x2c], ax
cmp dword [ebp - 0x50], ebx
jae 0x40c697
lea edx, [ebp - 0x64]
mov ecx, dword [ebp - 0x80]
cmp dword [ebp - 0x6c], ebx
jae 0x40c6a2
lea ecx, [ebp - 0x80]
push 0x927c0
push esi
call fcn.0041a4a0
add esp, 8
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0x50], ebx
jb 0x40c6c5
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00475dcb
add esp, 4
lea ecx, [ebp - 0x10c]
call fcn.0040af10
mov byte [ebp - 4], 0x16
push 0x15
xor edx, edx
push str.KometaLaunchPanel.exe
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], esi
mov word [ebp - 0x64], dx
call fcn.00404447
lea eax, [ebp - 0x10c]
push eax
lea ebx, [ebp - 0x64]
lea edi, [ebp - 0x2c]
mov byte [ebp - 4], 0x17
call fcn.00419220
add esp, 4
mov edi, 8
mov byte [ebp - 4], 0x18
cmp dword [eax + 0x14], edi
jb 0x40c71c
mov eax, dword [eax]
push str.KometaLaunchPanel
mov ecx, str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
call fcn.00415ba0
add esp, 4
cmp dword [ebp - 0x18], edi
jb 0x40c73f
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00475dcb
add esp, 4
xor ebx, ebx
xor edx, edx
mov esi, 7
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], dx
cmp dword [ebp - 0x50], edi
jb 0x40c763
mov eax, dword [ebp - 0x64]
push eax
call fcn.00475dcb
add esp, 4
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0xf8], edi
jb 0x40c77e
mov ecx, dword [ebp - 0x10c]
push ecx
call fcn.00475dcb
add esp, 4
push 1
push str.BlockCorners
mov ecx, str.SoftwareNetBoxPanel_
call fcn.00415c20
add esp, 8
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x6c], edi
jb 0x40c7a7
mov edx, dword [ebp - 0x80]
push edx
call fcn.00475dcb
add esp, 4
push 0x15
xor eax, eax
push str.KometaLaunchPanel.exe
lea ecx, [ebp - 0x48]
mov byte [ebp - 0x129], 1
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
call fcn.00404447
lea ecx, [ebp - 0xb8]
push ecx
lea ebx, [ebp - 0x48]
lea edi, [ebp - 0x80]
mov byte [ebp - 4], 0x19
call fcn.00419220
add esp, 4
mov edi, 8
mov byte [ebp - 4], 0x1b
cmp dword [ebp - 0x34], edi
jb 0x40c7fc
mov edx, dword [ebp - 0x48]
push edx
call fcn.00475dcb
add esp, 4
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
cmp dword [ebp - 0x6c], edi
jb 0x40c863
mov eax, dword [ebp - 0x80]
cmp eax, ebx
je 0x40c82a
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40c82a
test al, 0x10
je 0x40c8b7
push 0xeb
push str.apppanel.cpp
lea esi, [ebp - 0x1e8]
mov byte [ebp - 0x129], bl
call fcn.00414f70
mov esi, eax
mov byte [ebp - 4], 0x1c
cmp esi, ebx
je 0x40c8a8
lea edi, [esi + 0x10]
cmp edi, ebx
je 0x40c868
lea eax, [esi + 0x20]
jmp 0x40c86a
lea eax, [ebp - 0x80]
jmp 0x40c624
lea eax, [ebp - 0x80]
jmp 0x40c816
xor eax, eax
push str.ERROR:
push eax
call fcn.00407256
add esp, 8
cmp edi, ebx
je 0x40c881
lea eax, [esi + 0x20]
jmp 0x40c883
xor eax, eax
push str.failed_to_find_panel_file:
push eax
call fcn.00407256
add esp, 8
cmp edi, ebx
je 0x40c89a
lea eax, [esi + 0x20]
jmp 0x40c89c
xor eax, eax
push eax
lea ecx, [ebp - 0x80]
call fcn.0040741c
add esp, 4
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 0x1b
call fcn.00415130
xor ecx, ecx
push 0x15
mov word [ebp - 0x64], cx
push str.KometaLaunchPanel.exe
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], ebx
call fcn.00404447
lea edx, [ebp - 0xb8]
push edx
lea ebx, [ebp - 0x64]
lea edi, [ebp - 0x2c]
mov byte [ebp - 4], 0x1d
call fcn.00419220
add esp, 4
mov esi, 8
mov byte [ebp - 4], 0x1e
cmp dword [eax + 0x14], esi
jb 0x40c8ff
mov eax, dword [eax]
mov edx, 0x4b9470
mov ecx, eax
call fcn.0041a230
test al, al
sete bl
cmp dword [ebp - 0x18], esi
jb 0x40c921
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00475dcb
add esp, 4
xor ecx, ecx
mov byte [ebp - 4], 0x1b
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0x50], esi
jb 0x40c94a
mov edx, dword [ebp - 0x64]
push edx
call fcn.00475dcb
add esp, 4
test bl, bl
je 0x40c9d5
push 0xf1
push str.apppanel.cpp
lea esi, [ebp - 0x1e8]
xor bl, bl
call fcn.00414f70
mov esi, eax
mov byte [ebp - 4], 0x1f
test esi, esi
je 0x40c9bf
lea edi, [esi + 0x10]
test edi, edi
je 0x40c97f
lea eax, [esi + 0x20]
jmp 0x40c981
xor eax, eax
push str.ERROR:
push eax
call fcn.00407256
add esp, 8
test edi, edi
je 0x40c998
lea eax, [esi + 0x20]
jmp 0x40c99a
xor eax, eax
push str.failed_to_launch_panel:
push eax
call fcn.00407256
add esp, 8
test edi, edi
je 0x40c9b1
lea eax, [esi + 0x20]
jmp 0x40c9b3
xor eax, eax
push eax
lea ecx, [ebp - 0x80]
call fcn.0040741c
add esp, 4
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 0x1b
call fcn.00415130
mov esi, 8
jmp 0x40c9db
mov bl, byte [ebp - 0x129]
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x6c], esi
jb 0x40c9f0
mov eax, dword [ebp - 0x80]
push eax
call fcn.00475dcb
add esp, 4
lea edi, [ebp - 0x10c]
call fcn.0040b1c0
test bl, bl
jne 0x40ca86
lea ecx, [ebp - 0x2c]
push 0x4b9470
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x20
call fcn.00405536
add esp, 8
mov byte [ebp - 4], 0x21
cmp dword [eax + 0x14], esi
jb 0x40ca25
mov eax, dword [eax]
mov edx, dword [ebp - 0xd4]
cmp dword [ebp - 0xc0], esi
jae 0x40ca39
lea edx, [ebp - 0xd4]
push eax
push 2
mov ecx, str.install_fail
call fcn.0040e9c0
add esp, 8
cmp dword [ebp - 0x18], esi
jb 0x40ca5a
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00475dcb
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
cmp dword [ebp - 0xf8], esi
jb 0x40cb08
mov ecx, dword [ebp - 0x10c]
push ecx
jmp 0x40cb00
lea edx, [ebp - 0x2c]
push 0x4b9470
push edx
mov ecx, eax
mov byte [ebp - 4], 0x22
call fcn.00405536
add esp, 8
mov byte [ebp - 4], 0x23
cmp dword [eax + 0x14], esi
jb 0x40caa8
mov eax, dword [eax]
mov edx, dword [ebp - 0xd4]
cmp dword [ebp - 0xc0], esi
jae 0x40cabc
lea edx, [ebp - 0xd4]
push eax
push 2
mov ecx, str.install_success
call fcn.0040e9c0
add esp, 8
cmp dword [ebp - 0x18], esi
jb 0x40cadd
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00475dcb
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0xf8], esi
jb 0x40cb08
mov edx, dword [ebp - 0x10c]
push edx
call fcn.00475dcb
add esp, 4
cmp dword [ebp - 0xdc], esi
jb 0x40cb1f
mov eax, dword [ebp - 0xf0]
push eax
call fcn.00475dcb
add esp, 4
xor edi, edi
xor ecx, ecx
mov ebx, 7
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xe0], edi
mov word [ebp - 0xf0], cx
cmp dword [ebp - 0xc0], esi
jb 0x40cb52
mov edx, dword [ebp - 0xd4]
push edx
call fcn.00475dcb
add esp, 4
xor eax, eax
mov dword [ebp - 0xc0], ebx
mov dword [ebp - 0xc4], edi
mov word [ebp - 0xd4], ax
cmp dword [ebp - 0xa4], esi
jb 0x40cb7e
mov ecx, dword [ebp - 0xb8]
push ecx
call fcn.00475dcb
add esp, 4
mov al, 1
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.004751dc
mov esp, ebp
pop ebp
ret