Function at 0x41ed90
Capabilities:
Check if file exists
Check mutex on windows
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d0405
mov eax, dword fs:[0]
push eax
sub esp, 0x1e4
mov eax, dword [0x4fbf60]
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
xor ebx, ebx
push str.kometaup_check
push ebx
mov esi, ecx
push ebx
mov dword [ebp - 0x12c], esi
mov byte [ebp - 0x130], bl
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov dword [ebp - 0x134], edi
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x41f8cc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, ebx
je 0x41ee01
cmp eax, 0x80
jne 0x41ee53
mov byte [ebp - 0x130], 1
cmp esi, ebx
je 0x41ee20
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41ee20
test al, 0x10
je 0x41eec1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x548
lea eax, [ebp - 0x1f0]
push eax
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
mov byte [ebp - 4], 1
test esi, esi
je 0x41ee9d
lea ebx, [esi + 0x10]
test ebx, ebx
je 0x41ee59
lea eax, [esi + 0x20]
jmp 0x41ee5b
push edi
jmp 0x41f8c6
xor eax, eax
push str.ERROR:
push eax
call fcn.00409b50
add esp, 8
test ebx, ebx
je 0x41ee72
lea eax, [esi + 0x20]
jmp 0x41ee74
xor eax, eax
push str.failed_to_found_zip_file:
push eax
call fcn.00409b50
add esp, 8
test ebx, ebx
je 0x41ee8b
lea eax, [esi + 0x20]
jmp 0x41ee8d
xor eax, eax
mov ecx, dword [ebp - 0x12c]
push ecx
push eax
call fcn.00409b50
add esp, 8
lea ecx, [ebp - 0x1f0]
mov byte [ebp - 4], 0
call fcn.004073f0
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x41f8ce
lea esi, [ebp - 0x64]
call fcn.0041cbe0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x54], ebx
jne 0x41ef58
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x550
lea edx, [ebp - 0x1f0]
push edx
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
mov byte [ebp - 4], 3
call fcn.004210f0
test eax, eax
je 0x41ef1e
lea ecx, [eax + 0x10]
test ecx, ecx
je 0x41ef0e
add eax, 0x20
jmp 0x41ef10
xor eax, eax
push str.failed_to_get_appdatalocal
push eax
call fcn.00409b50
add esp, 8
lea ecx, [ebp - 0x1f0]
mov byte [ebp - 4], 2
call fcn.004073f0
cmp dword [ebp - 0x50], 8
jb 0x41ef3f
mov edx, dword [ebp - 0x64]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], 0
mov word [ebp - 0x64], ax
jmp 0x41eeac
xor ecx, ecx
push 6
mov word [ebp - 0xb8], cx
push 0x4decf4
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0xa4], 7
mov dword [ebp - 0xa8], ebx
call fcn.004028fc
lea ebx, [ebp - 0xb8]
lea ecx, [ebp - 0x64]
lea edi, [ebp - 0x80]
mov byte [ebp - 4], 4
call fcn.0041c970
mov esi, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0xa4], esi
jb 0x41efb8
mov edx, dword [ebp - 0xb8]
push edx
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
xor eax, eax
push 0xc
mov ebx, 7
mov word [ebp - 0xb8], cx
xor edx, edx
push str.kometaup.exe
lea ecx, [ebp - 0xf0]
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xe0], eax
mov word [ebp - 0xf0], dx
call fcn.004028fc
mov byte [ebp - 4], bl
lea ebx, [ebp - 0xf0]
lea ecx, [ebp - 0x80]
lea edi, [ebp - 0x2c]
call fcn.0041c970
mov byte [ebp - 4], 9
cmp dword [ebp - 0xdc], esi
jb 0x41f02a
mov eax, dword [ebp - 0xf0]
push eax
call fcn.0047f3b4
add esp, 4
xor esi, esi
xor ecx, ecx
mov edi, 8
mov ebx, 7
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xe0], esi
mov word [ebp - 0xf0], cx
cmp dword [ebp - 0x18], edi
jb 0x41f163
mov eax, dword [ebp - 0x2c]
cmp eax, esi
je 0x41f06f
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41f06f
test al, 0x10
je 0x41f7b7
cmp dword [ebp - 0x6c], edi
jb 0x41f16b
mov eax, dword [ebp - 0x80]
cmp eax, esi
je 0x41f092
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41f08f
test al, 0x10
jne 0x41f0a1
mov eax, dword [ebp - 0x80]
cmp dword [ebp - 0x6c], edi
jae 0x41f09a
lea eax, [ebp - 0x80]
mov ecx, eax
call fcn.0041cc20
mov edi, dword [ebp - 0x12c]
lea esi, [ebp - 0xb8]
call fcn.0041d820
lea edi, [ebp - 0xd4]
mov byte [ebp - 4], 0xa
call fcn.0041d590
mov ebx, 8
mov byte [ebp - 4], 0xb
cmp dword [eax + 0x14], ebx
jb 0x41f0d1
mov eax, dword [eax]
mov edi, eax
lea esi, [ebp - 0x48]
call fcn.0041d820
mov byte [ebp - 4], 0xd
cmp dword [ebp - 0xc0], ebx
jb 0x41f0f6
mov edx, dword [ebp - 0xd4]
push edx
call fcn.0047f3b4
add esp, 4
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xf8], eax
push 0xc
mov dword [ebp - 0xc4], ecx
xor edx, edx
mov dword [ebp - 0xfc], ecx
xor eax, eax
push str.kometaup.exe
lea ecx, [ebp - 0x10c]
mov word [ebp - 0xd4], dx
mov word [ebp - 0x10c], ax
call fcn.004028fc
lea ebx, [ebp - 0x10c]
lea ecx, [ebp - 0x48]
lea edi, [ebp - 0x128]
mov byte [ebp - 4], 0xe
call fcn.0041c970
mov edi, 8
mov byte [ebp - 4], 0xf
cmp dword [eax + 0x14], edi
jb 0x41f173
mov edx, dword [eax]
jmp 0x41f175
lea eax, [ebp - 0x2c]
jmp 0x41f05b
lea eax, [ebp - 0x80]
jmp 0x41f07f
mov edx, eax
xor esi, esi
xor ecx, ecx
mov eax, edx
mov dword [ebp - 0x88], 7
mov dword [ebp - 0x8c], esi
mov word [ebp - 0x9c], cx
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x41f195
sub eax, ebx
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x9c]
call fcn.004028fc
cmp dword [ebp - 0x114], edi
jb 0x41f1c8
mov edx, dword [ebp - 0x128]
push edx
call fcn.0047f3b4
add esp, 4
mov ebx, 7
xor eax, eax
mov dword [ebp - 0x114], ebx
mov dword [ebp - 0x118], esi
mov word [ebp - 0x128], ax
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0xf8], edi
jb 0x41f1fd
mov ecx, dword [ebp - 0x10c]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
push edi
push str.8n4Nm184
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0xf8], ebx
mov dword [ebp - 0xfc], esi
mov word [ebp - 0x10c], dx
mov dword [ebp - 0xc0], 0xf
mov dword [ebp - 0xc4], esi
mov byte [ebp - 0xd4], dl
call fcn.004026cf
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0xb8]
push ecx
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 0x13
call fcn.0042feb0
add esp, 8
test al, al
sete bl
mov byte [ebp - 4], 0x12
cmp dword [ebp - 0xc0], 0x10
jb 0x41f277
mov edx, dword [ebp - 0xd4]
push edx
call fcn.0047f3b4
add esp, 4
test bl, bl
je 0x41f3cd
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], edi
jae 0x41f28a
lea ecx, [ebp - 0x48]
call fcn.0041cf30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x566
lea eax, [ebp - 0x1f0]
push eax
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
mov byte [ebp - 4], 0x14
call fcn.004210f0
mov ecx, str.failed_to_unpack
mov esi, eax
call fcn.00421400
lea ecx, [ebp - 0x12c]
mov esi, eax
call fcn.00421240
lea ecx, [ebp - 0x1f0]
mov byte [ebp - 4], 0x12
call fcn.004073f0
cmp dword [ebp - 0x88], edi
jb 0x41f2f6
mov ecx, dword [ebp - 0x9c]
push ecx
call fcn.0047f3b4
add esp, 4
xor ebx, ebx
xor edx, edx
mov esi, 7
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], ebx
mov word [ebp - 0x9c], dx
cmp dword [ebp - 0x34], edi
jb 0x41f323
mov eax, dword [ebp - 0x48]
push eax
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], cx
cmp dword [ebp - 0xa4], edi
jb 0x41f346
mov edx, dword [ebp - 0xb8]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0xa8], ebx
mov word [ebp - 0xb8], ax
cmp dword [ebp - 0x18], edi
jb 0x41f36c
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], dx
cmp dword [ebp - 0x6c], edi
jb 0x41f389
mov eax, dword [ebp - 0x80]
push eax
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x70], ebx
mov word [ebp - 0x80], cx
cmp dword [ebp - 0x50], edi
jb 0x41f3a6
mov edx, dword [ebp - 0x64]
push edx
call fcn.0047f3b4
add esp, 4
mov dword [ebp - 0x50], esi
mov esi, dword [ebp - 0x134]
xor eax, eax
push esi
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], ax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x41f8ce
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0x88], edi
jae 0x41f3e1
lea eax, [ebp - 0x9c]
call fcn.0041c950
test al, al
jne 0x41f537
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], edi
jae 0x41f3f9
lea ecx, [ebp - 0x48]
call fcn.0041cf30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x56d
lea ecx, [ebp - 0x1f0]
push ecx
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
mov byte [ebp - 4], 0x15
call fcn.004210f0
mov esi, eax
call fcn.00421430
lea ecx, [ebp - 0x12c]
mov esi, eax
call fcn.00421240
lea ecx, [ebp - 0x1f0]
mov byte [ebp - 4], 0x12
call fcn.004073f0
cmp dword [ebp - 0x88], edi
jb 0x41f460
mov edx, dword [ebp - 0x9c]
push edx
call fcn.0047f3b4
add esp, 4
xor ebx, ebx
xor eax, eax
mov esi, 7
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], ebx
mov word [ebp - 0x9c], ax
cmp dword [ebp - 0x34], edi
jb 0x41f48d
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], dx
cmp dword [ebp - 0xa4], edi
jb 0x41f4b0
mov eax, dword [ebp - 0xb8]
push eax
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0xa8], ebx
mov word [ebp - 0xb8], cx
cmp dword [ebp - 0x18], edi
jb 0x41f4d6
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
cmp dword [ebp - 0x6c], edi
jb 0x41f4f3
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x70], ebx
mov word [ebp - 0x80], dx
cmp dword [ebp - 0x50], edi
jb 0x41f510
mov eax, dword [ebp - 0x64]
push eax
call fcn.0047f3b4
add esp, 4
mov dword [ebp - 0x50], esi
mov esi, dword [ebp - 0x134]
xor ecx, ecx
push esi
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], cx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x41f8ce
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x41f542
lea ecx, [ebp - 0x2c]
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0x88], edi
jae 0x41f556
lea eax, [ebp - 0x9c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov ecx, dword [ebp - 0x48]
cmp dword [ebp - 0x34], edi
jae 0x41f569
lea ecx, [ebp - 0x48]
call fcn.0041cf30
test al, al
jne 0x41f5dd
cmp dword [ebp - 0x34], edi
jb 0x41f582
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x12c], edx
jmp 0x41f58b
lea eax, [ebp - 0x48]
mov dword [ebp - 0x12c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x575
lea ecx, [ebp - 0x1f0]
push ecx
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
mov byte [ebp - 4], 0x16
call fcn.004210f0
mov ecx, str.failed_to_delete_temp_folder
mov esi, eax
call fcn.00421400
lea ecx, [ebp - 0x12c]
mov esi, eax
call fcn.00421240
lea ecx, [ebp - 0x1f0]
mov byte [ebp - 4], 0x12
call fcn.004073f0
xor esi, esi
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x41f5e8
lea eax, [ebp - 0x2c]
call fcn.0041c950
test al, al
jne 0x41f747
cmp dword [ebp - 0x18], edi
jb 0x41f605
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x12c], edx
jmp 0x41f60e
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x12c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x57a
lea ecx, [ebp - 0x1f0]
push ecx
mov ebx, str.env.cpp
call fcn.00407320
mov esi, eax
mov byte [ebp - 4], 0x17
call fcn.004210f0
mov esi, eax
call fcn.00421470
lea ecx, [ebp - 0x12c]
mov esi, eax
call fcn.00421240
lea ecx, [ebp - 0x1f0]
mov byte [ebp - 4], 0x12
call fcn.004073f0
cmp dword [ebp - 0x88], edi
jb 0x41f670
mov edx, dword [ebp - 0x9c]
push edx
call fcn.0047f3b4
add esp, 4
xor ebx, ebx
xor eax, eax
mov esi, 7
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x8c], ebx
mov word [ebp - 0x9c], ax
cmp dword [ebp - 0x34], edi
jb 0x41f69d
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], dx
cmp dword [ebp - 0xa4], edi
jb 0x41f6c0
mov eax, dword [ebp - 0xb8]
push eax
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0xa8], ebx
mov word [ebp - 0xb8], cx
cmp dword [ebp - 0x18], edi
jb 0x41f6e6
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
cmp dword [ebp - 0x6c], edi
jb 0x41f703
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x70], ebx
mov word [ebp - 0x80], dx
cmp dword [ebp - 0x50], edi
jb 0x41f720
mov eax, dword [ebp - 0x64]
push eax
call fcn.0047f3b4
add esp, 4
mov dword [ebp - 0x50], esi
mov esi, dword [ebp - 0x134]
xor ecx, ecx
push esi
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], cx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x41f8ce
cmp dword [ebp - 0x88], edi
jb 0x41f75e
mov edx, dword [ebp - 0x9c]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov ebx, 7
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x8c], esi
mov word [ebp - 0x9c], ax
cmp dword [ebp - 0x34], edi
jb 0x41f789
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0047f3b4
add esp, 4
xor edx, edx
mov byte [ebp - 4], 9
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], esi
mov word [ebp - 0x48], dx
cmp dword [ebp - 0xa4], edi
jb 0x41f7b0
mov eax, dword [ebp - 0xb8]
push eax
call fcn.0047f3b4
add esp, 4
mov edi, 8
xor esi, esi
push str.kometaup.exe
call fcn.0041e190
add esp, 4
test al, al
jne 0x41f861
cmp dword [ebp - 0x18], edi
jb 0x41f857
mov edi, dword [ebp - 0x2c]
cmp edi, esi
je 0x41f7e8
call fcn.0041dff0
test al, al
jne 0x41f85c
mov edi, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
jb 0x41f7f7
push edi
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
cmp dword [ebp - 0x6c], 8
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x2c], cx
jb 0x41f815
mov edx, dword [ebp - 0x80]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
cmp dword [ebp - 0x50], 8
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], esi
mov word [ebp - 0x80], ax
jb 0x41f833
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0047f3b4
add esp, 4
mov dword [ebp - 0x54], esi
mov esi, dword [ebp - 0x134]
xor edx, edx
push esi
mov dword [ebp - 0x50], ebx
mov word [ebp - 0x64], dx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x41f8ce
lea edi, [ebp - 0x2c]
jmp 0x41f7dc
mov edi, 8
cmp dword [ebp - 0x18], edi
jb 0x41f872
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0047f3b4
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x2c], cx
cmp dword [ebp - 0x6c], edi
jb 0x41f88f
mov edx, dword [ebp - 0x80]
push edx
call fcn.0047f3b4
add esp, 4
xor eax, eax
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], esi
mov word [ebp - 0x80], ax
cmp dword [ebp - 0x50], edi
jb 0x41f8ac
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.0047f3b4
add esp, 4
mov dword [ebp - 0x54], esi
mov esi, dword [ebp - 0x134]
xor edx, edx
push esi
mov dword [ebp - 0x50], ebx
mov word [ebp - 0x64], dx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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.0047f164
mov esp, ebp
pop ebp
ret