Function at 0x419490
Capabilities:
Check if file exists
Check mutex on windows
Get file size
Hide graphical window
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x50c
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0x508], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [0x6167a4]
push esi
mov esi, dword [0x616724]
push edi
push str.hQf0
push 0x41
xor edi, edi
mov dword [esp + 0x14], eax
push 0x5f64e8
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], edi
call fcn.00565fee
add esp, 0xc
mov dword [esp + 0x14], 1
xor eax, eax
mov word [0x5f656a], ax
mov eax, dword [esp + 0xc]
push str.OYAZIVIEWER_CONV_MUTEX
push edi
push 0x1f0001
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [ebx], eax
test eax, eax
jne 0x419535
mov eax, dword [esp + 0xc]
mov dword [eax], 0x270f
mov eax, 0x232b
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x508]
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
je 0x419b67
cmp eax, 0x102
je 0x419b60
push 0
push 0x8000000
push 3
push 0
push 0
push SysReAllocString
lea eax, [esi + 0x800]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x39f8], eax
cmp eax, 0xffffffff
jne 0x41959f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
cmp eax, 2
mov esi, 0xdae
mov dword [ecx], eax
mov ecx, 3
cmove esi, ecx
jmp 0x419b6c
lea esi, [ebx + 0x3a04]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebx + 0x3a00], eax
test eax, eax
jne 0x4195c3
cmp dword [esi], edi
jne 0x4195c3
lea esi, [eax + 4]
jmp 0x419b38
mov dword [esp + 0x1c], eax
cmp eax, 0x7a120
jle 0x4195f8
mov eax, dword [ebx + 0x3a18]
push 0x5aacf0
push 0
push 0x801d
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebx + 0x3a18]
push 5
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
lea esi, [ebx + 0x3a08]
push esi
push 4
lea eax, [esp + 0x3c]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419a31
nop dword [eax]
mov eax, dword [esi]
test eax, eax
je 0x419b33
cmp eax, 4
jne 0x419b2c
add edi, eax
mov dword [esp + 0x10], 0
cmp dword [esp + 0x30], 0
jle 0x419780
mov ecx, dword [esp + 0x14]
mov eax, ecx
shl eax, 6
add eax, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
shl eax, 6
add eax, ecx
lea eax, [eax*2 + 0x5f64e8]
mov dword [esp + 0x20], eax
nop dword [eax]
push 0
push esi
push 0x4d0
lea eax, [esp + 0x4c]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419a51
cmp dword [esi], 0x4d0
jne 0x419a47
lea eax, [esp + 0xf0]
add edi, 0x4d0
push eax
call fcn.00419b90
test eax, eax
jg 0x41976d
xor eax, eax
nop word [eax + eax]
movzx edx, word [esp + eax*2 + 0xf0]
test dx, dx
je 0x41972f
mov ecx, dword [esp + 0x18]
add ecx, eax
mov word [ecx*2 + 0x5f64e8], dx
movzx edx, word [esp + eax*2 + 0xf2]
test dx, dx
je 0x41972e
mov word [ecx*2 + 0x5f64ea], dx
movzx edx, word [esp + eax*2 + 0xf4]
test dx, dx
je 0x419729
mov word [ecx*2 + 0x5f64ec], dx
movzx edx, word [esp + eax*2 + 0xf6]
test dx, dx
je 0x419724
add eax, 4
mov word [ecx*2 + 0x5f64ee], dx
cmp eax, 0x40
jl 0x4196c0
jmp 0x419733
add eax, 3
jmp 0x41972f
add eax, 2
jmp 0x41972f
inc eax
test eax, eax
je 0x41976d
mov ecx, dword [esp + 0x18]
xor edx, edx
add eax, ecx
add ecx, 0x41
mov dword [esp + 0x18], ecx
mov word [eax*2 + 0x5f64e8], dx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
inc edx
add eax, 0x82
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], eax
cmp edx, 0x3e8
jge 0x41976d
xor ecx, ecx
mov word [eax], cx
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x30]
jl 0x419670
push 0
push esi
push 4
lea eax, [esp + 0x40]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419b19
cmp dword [esi], 4
jne 0x419b12
add edi, 4
mov dword [esp + 0x10], 0
cmp dword [esp + 0x34], 0
jle 0x4197e8
mov esi, dword [esp + 0x10]
nop dword [eax]
push 1
push 0
push 0x300
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
inc esi
add edi, 0x300
cmp esi, dword [esp + 0x34]
jl 0x4197c0
lea esi, [ebx + 0x3a08]
push 0
push esi
push 4
lea eax, [esp + 0x44]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419aff
cmp dword [esi], 4
jne 0x419af8
add edi, 4
mov dword [esp + 0x10], 0
cmp dword [esp + 0x38], 0
jle 0x41984d
mov esi, dword [esp + 0x10]
push 1
push 0
push 0x2a8
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
inc esi
add edi, 0x2a8
cmp esi, dword [esp + 0x38]
jl 0x419825
lea esi, [ebx + 0x3a08]
push 1
push 0
push 0x848
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
push 4
lea eax, [esp + 0x34]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419ae5
cmp dword [esi], 4
jne 0x419ade
add edi, 0x84c
cmp dword [esp + 0x28], 0xffffffff
je 0x419a13
push 1
push 0
push 4
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, 4
cmp dword [esp + 0x28], 0xffffffff
je 0x419a13
nop word [eax + eax]
push 0
push esi
push 4
lea eax, [esp + 0x38]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419acb
cmp dword [esi], 4
jne 0x419ac4
add edi, 4
cmp dword [esp + 0x2c], 0xfffffffe
je 0x419967
push 0
push esi
push 4
lea eax, [esp + 0x48]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419a91
cmp dword [esi], 4
jne 0x419a87
mov eax, dword [esp + 0x3c]
push 1
push 0
add eax, eax
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x3c]
push 0
push esi
push 4
lea edi, [edi + eax*2]
lea eax, [esp + 0x38]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419a71
cmp dword [esi], 4
jne 0x419a67
add edi, 8
cmp dword [esp + 0x2c], 0xfffffffe
jne 0x4198f1
push 0
push esi
push 4
lea eax, [esp + 0x34]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419ab1
cmp dword [esi], 4
jne 0x419aa7
add edi, 4
cmp dword [esp + 0x28], 0xffffffff
je 0x4199ad
push 1
push 0
push 4
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, 4
mov eax, dword [esp + 0x1c]
cmp eax, 0x7a120
jle 0x419a08
movd xmm0, eax
movd xmm1, edi
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
mulsd xmm1, qword [0x5ea660]
cvttsd2si eax, xmm1
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x24]
je 0x419a08
call fcn.0040f410
push dword [esp + 0x10]
mov eax, dword [ebx + 0x3a18]
push 0
push 0x801c
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], eax
cmp dword [esp + 0x28], 0xffffffff
jne 0x4198c0
push 0
push esi
push 4
lea eax, [esp + 0x3c]
push eax
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x419620
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdaf
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdb2
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdb1
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdbe
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdbd
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdbc
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdbb
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdc0
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdbf
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdba
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdb9
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdb8
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdb7
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdb6
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdb5
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdb4
jmp 0x419b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xdb3
mov dword [ecx], eax
jmp 0x419b38
mov esi, 0xdb0
jmp 0x419b38
mov esi, 2
push dword [ebx + 0x39f8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x1c], 0x7a120
jle 0x419b6c
mov eax, dword [ebx + 0x3a18]
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x419b6c
mov esi, 1
jmp 0x419b6c
mov esi, 0xdad
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x514]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 8