Function at 0x41c000
Capabilities:
Check if file exists
Check mutex on windows
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x51c
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0x518], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [0x6167a4]
push esi
push edi
mov edi, dword [0x616724]
xor esi, esi
push str.OYAZIVIEWER_CONV_MUTEX
push esi
mov dword [ecx], esi
push 0x1f0001
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], esi
mov byte [esp + 0x1f], 0
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [ebx], eax
test eax, eax
jne 0x41c087
mov ecx, dword [esp + 0xc]
mov eax, 0x232c
mov dword [ecx], 0x270f
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x518]
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0xc
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
je 0x41c758
cmp eax, 0x102
je 0x41c751
push 0
push 0x8000000
push 3
push 0
push 0
push SysReAllocString
lea eax, [edi + 0x800]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x39fc], eax
cmp eax, 0xffffffff
jne 0x41c0f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
cmp eax, 2
mov esi, 0xf3e
mov dword [ecx], eax
mov ecx, 3
cmove esi, ecx
jmp 0x41c75d
lea edi, [ebx + 0x3a04]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebx + 0x3a00], eax
test eax, eax
jne 0x41c121
cmp dword [edi], esi
jne 0x41c121
push dword [ebx + 0x39fc]
lea esi, [eax + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41c75d
push 0
lea edi, [ebx + 0x3a08]
push edi
push 4
lea eax, [esp + 0x50]
mov dword [esp + 0x30], edi
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c59b
nop dword [eax]
mov eax, dword [edi]
test eax, eax
je 0x41c644
cmp eax, 4
jne 0x41c747
xor edi, edi
mov dword [esp + 0x28], 0
cmp dword [esp + 0x44], edi
jle 0x41c1ed
lea eax, [ebx + 0x3a08]
nop dword [eax]
push 0
push eax
push 0x4d0
lea eax, [esp + 0x5c]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c5f6
cmp dword [ebx + 0x3a08], 0x4d0
lea eax, [ebx + 0x3a08]
jne 0x41c5ef
movzx ebx, word [ebx + 0x39be]
test bx, bx
je 0x41c1e2
lea eax, [esp + 0x100]
push eax
call fcn.00419b90
movsx ecx, bx
cmp eax, ecx
jne 0x41c1de
lea eax, [edi + 1]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
inc edi
cmp edi, dword [esp + 0x44]
jl 0x41c180
push 0
lea edi, [ebx + 0x3a08]
push edi
push 4
lea eax, [esp + 0x54]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c731
cmp dword [edi], 4
jne 0x41c727
xor edi, edi
cmp dword [esp + 0x48], edi
jle 0x41c23e
push 1
push 0
push 0x300
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
inc edi
cmp edi, dword [esp + 0x48]
jl 0x41c222
push 0
lea edi, [ebx + 0x3a08]
push edi
push 4
lea eax, [esp + 0x58]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c711
cmp dword [edi], 4
jne 0x41c707
xor edi, edi
cmp dword [esp + 0x4c], edi
jle 0x41c28f
push 1
push 0
push 0x2a8
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
inc edi
cmp edi, dword [esp + 0x4c]
jl 0x41c273
push 1
push 0
push 0x848
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edi, [ebx + 0x3a08]
push edi
push 4
lea eax, [esp + 0x48]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c6f1
cmp dword [edi], 4
jne 0x41c6e7
cmp dword [esp + 0x3c], 0xffffffff
je 0x41c57d
push 1
push 0
push 4
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x3c], 0xffffffff
je 0x41c57d
nop dword [eax]
push 0
push edi
push 4
lea eax, [esp + 0x4c]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c6d1
cmp dword [edi], 4
jne 0x41c6c7
cmp dword [esp + 0x40], 0xfffffffe
je 0x41c532
push 0
push edi
push 4
lea eax, [esp + 0x44]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c69a
cmp dword [edi], 4
jne 0x41c693
mov eax, dword [esp + 0x38]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
add esp, 4
mov edi, eax
lea eax, [ebx + 0x3a08]
mov dword [esp + 0x14], edi
push 0
push eax
mov eax, dword [esp + 0x40]
add eax, eax
push eax
push edi
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c680
mov ecx, dword [esp + 0x38]
lea eax, [ecx + ecx]
cmp dword [ebx + 0x3a08], eax
jne 0x41c636
cmp word [ebx + 0x39be], 0
je 0x41c3cc
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x3c]
jne 0x41c4ea
mov edx, dword [esp + 0x14]
lea edi, [ecx - 1]
test edi, edi
js 0x41c3ea
movzx eax, word [edx + edi*2]
cmp eax, 0xd
je 0x41c3e5
cmp eax, 0xa
jne 0x41c3ea
sub edi, 1
jns 0x41c3d7
add edi, 1
jns 0x41c3f5
mov dword [esp + 0x20], ecx
jmp 0x41c3fd
mov eax, ecx
sub eax, edi
mov dword [esp + 0x20], eax
xor ebx, ebx
test edi, edi
jle 0x41c4b9
mov eax, dword [esp + 0x18]
add eax, 0x9a1e
mov dword [esp + 0x30], eax
xor esi, esi
lea edx, [edx + ebx*2]
mov ecx, eax
nop dword [eax + eax]
lea eax, [esi + ebx]
cmp eax, edi
jge 0x41c43c
mov ax, word [edx]
inc esi
mov word [ecx], ax
add edx, 2
add ecx, 2
cmp esi, 0x800
jl 0x41c420
lea eax, [esi + ebx]
cmp eax, dword [esp + 0x38]
jge 0x41c480
mov ecx, dword [esp + 0x14]
mov edx, 0xfc00
lea ecx, [ecx + eax*2]
mov ax, word [ecx - 2]
and ax, dx
mov edx, 0xd800
cmp ax, dx
jne 0x41c480
movzx ecx, word [ecx]
mov eax, ecx
and eax, 0xfc00
cmp eax, 0xdc00
jne 0x41c480
mov eax, dword [esp + 0x18]
mov word [eax + esi*2 + 0x9a1e], cx
inc esi
push dword [esp + 0xc]
mov ecx, dword [esp + 0x1c]
push esi
push dword [esp + 0x24]
call fcn.0041c780
mov dword [esp + 0x34], eax
test eax, eax
jne 0x41c609
add ebx, esi
mov dword [esp + 0x1c], 1
cmp ebx, edi
jge 0x41c4b9
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
jmp 0x41c414
mov esi, dword [esp + 0x20]
test esi, esi
jne 0x41c5b1
mov byte [esp + 0x13], 1
mov edi, dword [esp + 0x14]
push dword [esp + 0xc]
mov ebx, dword [esp + 0x1c]
mov ecx, ebx
push esi
push 2
call fcn.0041c780
mov esi, eax
mov dword [esp + 0x1c], 1
push edi
call fcn.00560853
add esp, 4
test esi, esi
jne 0x41c644
push esi
lea edi, [ebx + 0x3a08]
push edi
push 4
lea eax, [esp + 0x4c]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c623
cmp dword [edi], 4
jne 0x41c61c
cmp dword [esp + 0x40], 0xfffffffe
jne 0x41c332
push 0
push edi
push 4
lea eax, [esp + 0x48]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41c6b4
cmp dword [edi], 4
jne 0x41c6ad
cmp dword [esp + 0x3c], 0xffffffff
je 0x41c57d
push 1
push 0
push 4
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x3c], 0xffffffff
jne 0x41c300
push 0
push edi
push 4
lea eax, [esp + 0x50]
push eax
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41c150
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf3f
mov dword [edi], eax
jmp 0x41c648
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x13], 0
inc dword [eax]
test esi, esi
jle 0x41c4ca
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add ecx, 0x9a1e
lea edx, [edi + ebx*2]
mov ax, word [edx]
lea edx, [edx + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
sub esi, 1
jne 0x41c5d5
mov esi, dword [esp + 0x20]
jmp 0x41c4ce
mov esi, 0xf42
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf41
mov dword [edi], eax
jmp 0x41c648
push dword [esp + 0x14]
call fcn.00560853
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
jmp 0x41c641
mov esi, 0xf50
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf4f
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf4e
push edi
call fcn.00560853
add esp, 4
mov edi, dword [esp + 0xc]
push dword [ebx + 0x39fc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp word [esp + 0x1c], 0
jle 0x41c66a
push edi
push 0
push 3
mov ecx, ebx
call fcn.0041c780
mov esi, eax
cmp byte [esp + 0x13], 0
je 0x41c75d
mov eax, dword [esp + 0x2c]
inc dword [eax]
jmp 0x41c75d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0xc]
mov esi, 0xf4d
mov dword [ecx], eax
jmp 0x41c63b
mov esi, 0xf4c
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf4b
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf52
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf51
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf4a
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf49
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf48
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf47
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf46
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf45
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf44
jmp 0x41c644
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0xc]
mov esi, 0xf43
mov dword [edi], eax
jmp 0x41c648
mov esi, 0xf40
jmp 0x41c644
mov esi, 1
jmp 0x41c75d
mov esi, 0xf3d
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x524]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0xc