Function at 0x416e00
Capabilities:
Check mutex on windows
Get file size
Hide graphical window
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1334
call fcn.005817c0
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0x1330], eax
mov edx, dword [ebp + 8]
xor eax, eax
mov ecx, dword [0x616724]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
xor esi, esi
mov dword [edx], eax
mov dword [esp + 0x54], esi
mov si, word [ebp + 0x10]
mov dword [esp + 0x68], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x70], 0xffffffff
mov dword [esp + 0x14], eax
mov dword [ebx], eax
push edi
mov edi, dword [0x6167a4]
mov dword [esp + 0x28], edi
cmp si, 4
jne 0x416f25
mov eax, dword [edi + 0x3a14]
mov ebx, dword [eax + 8]
mov eax, 1
mov dword [esp + 0x30], eax
test ebx, ebx
je 0x416f01
mov eax, dword [ebx + 0x1c]
xor edi, edi
mov dword [esp + 0x20], eax
nop dword [eax]
mov dword [esp + 0x24], eax
mov esi, ebx
mov al, 1
mov dword [esp + 0x34], 0
mov byte [esp + 0x13], al
test al, al
je 0x416eef
movzx eax, byte [ecx + 0x6c55]
push eax
movzx eax, byte [ecx + 0x6c54]
mov ecx, esi
push eax
push 0
push 1
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00531230
add edi, eax
cmp dword [esp + 0x24], 0
jne 0x416edd
mov esi, dword [esi]
mov ecx, dword [esp + 0x14]
cmp esi, ebx
jne 0x416eef
test esi, esi
je 0x416eef
mov al, byte [esp + 0x13]
jmp 0x416ea4
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x416e90
test edi, edi
jne 0x416f1d
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1330]
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x10
mov si, word [ebp + 0x10]
mov edi, dword [esp + 0x28]
xor eax, eax
push str.OYAZIVIEWER_CONV_MUTEX
push eax
push 0x1f0001
mov dword [esp + 0x54], eax
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
push 0xffffffffffffffff
push eax
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esp + 0x14]
push 0
push 0x8000000
push 4
push 0
push 0
push 0x40000000
lea eax, [ebx + 0x800]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [edi + 0x39f8], ecx
cmp ecx, 0xffffffff
jne 0x416f94
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc1d
mov dword [ecx], eax
jmp 0x417c2c
lea eax, [edi + 0x3a04]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 0x3a00], eax
cmp si, 1
je 0x416fc0
push 2
push 0
push 0
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 0x3a14]
xor ecx, ecx
mov eax, dword [eax + 0x38]
mov eax, dword [eax]
test eax, eax
je 0x416fd8
mov eax, dword [eax]
inc ecx
test eax, eax
jne 0x416fd1
push 0
lea eax, [edi + 0x3a0c]
mov dword [esp + 0x74], ecx
push eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x78]
push 4
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x417019
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc1e
mov dword [ecx], eax
jmp 0x417be8
mov edx, dword [edi + 0x3a14]
mov eax, dword [edx + 0x38]
mov esi, dword [eax]
test esi, esi
je 0x417282
nop dword [eax]
movzx eax, word [esi + 0x58]
mov word [esp + 0x320], ax
movzx eax, word [esi + 0x5a]
mov word [esp + 0x322], ax
movzx eax, word [esi + 0x5c]
mov word [esp + 0x324], ax
movzx eax, word [esi + 0x5e]
mov word [esp + 0x34a], ax
movzx eax, word [esi + 0x60]
mov word [esp + 0x34c], ax
movzx eax, byte [esi + 0x62]
mov byte [esp + 0x326], al
movsd xmm0, qword [esi + 0x68]
movsd qword [esp + 0x328], xmm0
movsd xmm0, qword [esi + 0x70]
movsd qword [esp + 0x330], xmm0
movsd xmm0, qword [esi + 0x78]
movsd qword [esp + 0x338], xmm0
movsd xmm0, qword [esi + 0x80]
movsd qword [esp + 0x340], xmm0
movzx eax, word [esi + 0x98]
mov word [esp + 0x348], ax
movups xmm0, xmmword [esi + 0xa0]
movups xmmword [esp + 0x350], xmm0
movups xmm0, xmmword [esi + 0xb0]
movups xmmword [esp + 0x360], xmm0
movsd xmm0, qword [esi + 0xc0]
movsd qword [esp + 0x370], xmm0
movsd xmm0, qword [esi + 0xc8]
movsd qword [esp + 0x378], xmm0
movsd xmm0, qword [esi + 0xd0]
movsd qword [esp + 0x380], xmm0
movsd xmm0, qword [esi + 0xd8]
movsd qword [esp + 0x388], xmm0
movzx eax, word [esi + 0xe0]
mov word [esp + 0x390], ax
movsd xmm0, qword [esi + 0xe8]
movsd qword [esp + 0x398], xmm0
movsd xmm0, qword [esi + 0xf0]
movsd qword [esp + 0x3a0], xmm0
movsd xmm0, qword [esi + 0xf8]
movsd qword [esp + 0x3a8], xmm0
movsd xmm0, qword [esi + 0x100]
movsd qword [esp + 0x3b0], xmm0
movzx eax, byte [esi + 0x108]
mov byte [esp + 0x3b8], al
movzx eax, byte [esi + 0x10c]
mov byte [esp + 0x3bc], al
movzx eax, word [esi + 0x10a]
mov word [esp + 0x3ba], ax
lea eax, [esi + 0x120]
movsd xmm0, qword [esi + 0x110]
push eax
movsd qword [esp + 0x3c4], xmm0
lea eax, [esp + 0x3d4]
movsd xmm0, qword [esi + 0x118]
push 0x200
push eax
movsd qword [esp + 0x3d4], xmm0
call fcn.00565fee
movzx eax, byte [esi + 0x520]
add esp, 0xc
mov byte [esp + 0x7d0], al
movsd xmm0, qword [esi + 0x528]
movsd qword [esp + 0x7d8], xmm0
movsd xmm0, qword [esi + 0x530]
movsd qword [esp + 0x7e0], xmm0
movsd xmm0, qword [esi + 0x538]
movsd qword [esp + 0x7e8], xmm0
movzx eax, byte [esi + 0x540]
mov byte [esp + 0x392], al
movzx eax, word [esi + 0x542]
mov word [esp + 0x394], ax
movzx eax, word [esi + 0x544]
mov word [esp + 0x396], ax
lea eax, [edi + 0x3a0c]
push 0
push eax
push 0x4d0
lea eax, [esp + 0x32c]
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4172d4
mov esi, dword [esi]
test esi, esi
jne 0x417030
mov edx, dword [edi + 0x3a14]
mov eax, dword [edx + 0x34]
xor ecx, ecx
mov eax, dword [eax]
test eax, eax
je 0x417297
nop dword [eax]
mov eax, dword [eax]
inc ecx
test eax, eax
jne 0x417290
push 0
lea esi, [edi + 0x3a0c]
mov dword [esp + 0x74], ecx
push esi
push 4
lea eax, [esp + 0x7c]
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4172ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc20
mov dword [ecx], eax
jmp 0x417be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc1f
mov dword [ecx], eax
jmp 0x417be4
mov edx, dword [edi + 0x3a14]
mov eax, dword [edx + 0x34]
mov ebx, dword [eax]
test ebx, ebx
je 0x41742e
movzx eax, word [ebx + 8]
lea esi, [ebx + 0x58]
mov word [esp + 0x7f0], ax
lea edi, [esp + 0x840]
movzx eax, word [ebx + 0xa]
mov ecx, 0xa2
mov word [esp + 0x7f2], ax
movsd xmm0, qword [ebx + 0x10]
movsd qword [esp + 0x7f8], xmm0
movsd xmm0, qword [ebx + 0x18]
movsd qword [esp + 0x800], xmm0
movsd xmm0, qword [ebx + 0x20]
movsd qword [esp + 0x808], xmm0
movzx eax, word [ebx + 0x28]
mov word [esp + 0x810], ax
movsd xmm0, qword [ebx + 0x30]
movsd qword [esp + 0x818], xmm0
movsd xmm0, qword [ebx + 0x38]
movsd qword [esp + 0x820], xmm0
movzx eax, word [ebx + 0x40]
mov word [esp + 0x828], ax
movsd xmm0, qword [ebx + 0x48]
movsd qword [esp + 0x830], xmm0
movzx eax, word [ebx + 0x50]
mov word [esp + 0x838], ax
lea eax, [esp + 0x7f0]
rep movsd dword es:[edi], dword [esi]
movsd xmm0, qword [ebx + 0x2e0]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
movsd qword [esp + 0xac8], xmm0
movsd xmm0, qword [ebx + 0x2e8]
push 0
movsd qword [esp + 0xad4], xmm0
movsd xmm0, qword [ebx + 0x2f0]
push esi
movsd qword [esp + 0xae0], xmm0
movsd xmm0, qword [ebx + 0x2f8]
push 0x300
push eax
push dword [edi + 0x39f8]
movsd qword [esp + 0xaf4], xmm0
movsd xmm0, qword [ebx + 0x300]
movsd qword [esp + 0xafc], xmm0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41747e
mov ebx, dword [ebx]
test ebx, ebx
jne 0x417300
mov edx, dword [edi + 0x3a14]
mov eax, dword [edx + 0x30]
xor ecx, ecx
mov eax, dword [eax]
test eax, eax
je 0x417447
nop dword [eax]
mov eax, dword [eax]
inc ecx
test eax, eax
jne 0x417440
push 0
push esi
push 4
lea eax, [esp + 0x7c]
mov dword [esp + 0x7c], ecx
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x417497
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc22
mov dword [ecx], eax
jmp 0x417be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc21
mov dword [ecx], eax
jmp 0x417be0
mov eax, dword [edi + 0x3a14]
mov eax, dword [eax + 0x30]
mov ebx, dword [eax]
test ebx, ebx
je 0x4176be
nop word [eax + eax]
lea eax, [ebx + 8]
mov dword [esp + 0x78], 0x1f7264
push eax
lea eax, [esp + 0x80]
push 0x20
push eax
call fcn.00565fee
lea eax, [ebx + 0xa4]
push eax
lea eax, [esp + 0x128]
push 0x20
push eax
call fcn.00565fee
lea eax, [ebx + 0xf0]
push eax
lea eax, [esp + 0x176]
push 0x20
push eax
call fcn.00565fee
lea eax, [ebx + 0x130]
push eax
lea eax, [esp + 0x1c2]
push 0x20
push eax
call fcn.00565fee
lea eax, [ebx + 0x170]
push eax
lea eax, [esp + 0x254]
push 0x20
push eax
call fcn.00565fee
lea esi, [ebx + 0x48]
mov ecx, 0x17
lea edi, [esp + 0xf8]
add esp, 0x3c
rep movsd dword es:[edi], dword [esi]
movsd xmm0, qword [ebx + 0xe8]
mov ecx, 0x2e
movsd qword [esp + 0x1f0], xmm0
movzx eax, word [ebx + 0xa50]
mov word [esp + 0x1dc], ax
movzx eax, byte [ebx + 0xa7c]
mov byte [esp + 0x1de], al
movzx eax, word [ebx + 0xa7e]
mov word [esp + 0x1e0], ax
mov eax, dword [ebx + 0xa80]
mov dword [esp + 0x1e4], eax
movzx eax, word [ebx + 0xa84]
mov word [esp + 0x1e8], ax
movzx eax, word [ebx + 0xa86]
mov word [esp + 0x158], ax
movzx eax, word [ebx + 0xa88]
mov word [esp + 0x1da], ax
movzx eax, word [ebx + 0xa8a]
mov word [esp + 0x262], ax
movsd xmm0, qword [ebx + 0xab8]
movsd qword [esp + 0x1f8], xmm0
movsd xmm0, qword [ebx + 0xac0]
movsd qword [esp + 0x200], xmm0
movsd xmm0, qword [ebx + 0xac8]
movsd qword [esp + 0x208], xmm0
movsd xmm0, qword [ebx + 0xad0]
movsd qword [esp + 0x210], xmm0
movzx eax, byte [ebx + 0xad8]
mov byte [esp + 0x218], al
movzx eax, byte [ebx + 0xad9]
mov byte [esp + 0x219], al
movzx eax, byte [ebx + 0xada]
mov byte [esp + 0x21a], al
movzx eax, byte [ebx + 0xadb]
mov byte [esp + 0x21b], al
movzx eax, byte [ebx + 0xadc]
mov byte [esp + 0x260], al
movzx eax, word [ebx + 0xa48]
mov word [esp + 0x264], ax
movzx eax, byte [ebx + 0x3d4]
mov byte [esp + 0x266], al
movzx eax, byte [ebx + 0x3d5]
mov byte [esp + 0x267], al
movzx eax, byte [ebx + 0x3d6]
mov byte [esp + 0x261], al
mov esi, dword [esp + 0x20]
lea edi, [esp + 0x268]
xor eax, eax
push eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x2c]
lea eax, [esp + 0x7c]
push esi
push 0x2a8
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41770d
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4174b0
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0xaf0]
lea ecx, [ebx + 0x4c28]
call fcn.00408ea0
push 0
push esi
push 0x848
lea eax, [esp + 0xafc]
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x417726
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc24
mov dword [ecx], eax
jmp 0x417be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc23
mov dword [ecx], eax
jmp 0x417be0
mov si, word [ebp + 0x10]
mov eax, dword [edi + 0x3a14]
cmp si, 4
jne 0x41773b
add eax, 8
jmp 0x41777e
mov eax, dword [eax]
test eax, eax
je 0x41774e
xor ecx, ecx
mov eax, dword [eax]
inc ecx
test eax, eax
jne 0x417743
mov dword [esp + 0x54], ecx
mov eax, dword [edi + 0x3a18]
push 0x5aace0
push 0
push 0x801d
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [edi + 0x3a18]
push 5
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [edi + 0x3a14]
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x417ba3
mov eax, dword [esp + 0x30]
or eax, 1
mov dword [esp + 0x50], 0
mov dword [esp + 0x60], eax
mov eax, dword [ecx + 0x1c]
mov dword [esp + 0x44], eax
mov dword [esp + 0x24], eax
mov esi, ecx
mov al, 1
mov dword [esp + 0x34], 0
xor edi, edi
mov byte [esp + 0x13], al
nop dword [eax]
test al, al
je 0x417812
movzx eax, byte [ebx + 0x6c55]
mov ecx, esi
push eax
movzx eax, byte [ebx + 0x6c54]
push eax
push 0
push 1
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00531230
add edi, eax
cmp dword [esp + 0x24], 0
jne 0x4177f9
mov esi, dword [esi]
mov ecx, dword [esp + 0x2c]
cmp esi, ecx
je 0x417808
cmp word [ebp + 0x10], 4
je 0x417812
test esi, esi
je 0x417812
mov al, byte [esp + 0x13]
jmp 0x4177c0
mov dword [esp + 0x3c], edi
test edi, edi
jle 0x417b00
xor ecx, ecx
lea esi, [edi + 0x64]
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov ebx, eax
xor ecx, ecx
lea eax, [edi + 0x65]
mov dword [esp + 0x6c], ebx
mov edi, 4
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov dword [esp + 0x38], eax
xor ecx, ecx
mov eax, esi
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov eax, esi
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov esi, dword [esp + 0x3c]
add esp, 0x10
mov edi, dword [esp + 0x14]
xor ecx, ecx
mov edx, eax
mov dword [esp + 0x40], ecx
mov eax, dword [esp + 0x44]
mov cl, 1
mov dword [esp + 0x38], edx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], 0
mov byte [esp + 0x13], cl
test cl, cl
je 0x417947
movzx eax, byte [edi + 0x6c55]
mov ecx, esi
push eax
movzx eax, byte [edi + 0x6c54]
push eax
push 0
push 1
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [esp + 0x78]
push eax
push edx
push dword [esp + 0x40]
lea eax, [esp + 0x88]
push dword [esp + 0x54]
push ebx
push eax
lea eax, [esp + 0x7c]
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.00531470
mov edx, dword [esp + 0x40]
add edx, eax
cmp dword [esp + 0x24], 0
mov dword [esp + 0x40], edx
jne 0x417929
mov esi, dword [esi]
cmp esi, dword [esp + 0x2c]
je 0x417936
cmp word [ebp + 0x10], 4
je 0x41794b
test esi, esi
je 0x41794b
mov cl, byte [esp + 0x13]
mov edx, dword [esp + 0x38]
jmp 0x4178c3
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
cmp ecx, edx
jl 0x41795e
sub ecx, edx
mov dword [esp + 0x48], ecx
jmp 0x417ac9
mov edx, dword [esp + 0x3c]
xor al, al
mov byte [esp + 0x13], al
cmp ecx, edx
jge 0x417ac1
cmp word [ebx + ecx*2], 0xa
jne 0x4179a5
test ecx, ecx
jle 0x4179a5
cmp word [ebx + ecx*2 - 2], 0xd
jne 0x4179a5
lea edi, [ecx - 2]
test edi, edi
js 0x4179c3
nop word [eax + eax]
movzx eax, word [ebx + edi*2]
cmp eax, 0xd
je 0x4179c3
cmp eax, 0xa
je 0x4179c3
sub edi, 1
jns 0x417990
jmp 0x4179c3
lea edi, [ecx - 1]
test edi, edi
js 0x4179c3
nop dword [eax]
movzx eax, word [ebx + edi*2]
cmp eax, 0xd
je 0x4179c3
cmp eax, 0xa
je 0x4179c3
sub edi, 1
jns 0x4179b0
inc edi
mov esi, ecx
mov dword [esp + 0x4c], edi
cmp ecx, edx
jge 0x4179fc
nop
movzx eax, word [ebx + esi*2]
cmp eax, 0xd
je 0x4179e7
cmp eax, 0xa
je 0x4179fc
inc esi
cmp esi, edx
jl 0x4179d0
mov edx, esi
jmp 0x417a25
lea eax, [esi + 1]
cmp eax, edx
jge 0x4179fc
cmp word [ebx + esi*2 + 2], 0xa
jne 0x4179fc
mov esi, eax
mov edx, esi
jmp 0x417a04
mov edx, esi
cmp esi, dword [esp + 0x3c]
jge 0x417a25
movzx eax, word [ebx + esi*2]
cmp eax, 0xa
jne 0x417a1b
cmp word [ebx + esi*2 - 2], 0xd
lea edx, [esi - 1]
jne 0x417a23
dec edx
jmp 0x417a23
cmp eax, 0xd
jne 0x417a23
lea edx, [esi - 1]
inc esi
inc edx
mov ecx, edi
cmp edi, esi
jge 0x417a54
mov ebx, dword [esp + 0x38]
mov di, word [ebp + 0x10]
mov eax, dword [ebx + ecx*4]
cmp dword [eax + 0x24], 0
jne 0x417a42
cmp di, 4
jne 0x417a47
mov byte [esp + 0x13], 1
inc ecx
cmp ecx, esi
jl 0x417a33
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x68]
cmp byte [esp + 0x13], 0
je 0x417ab3
mov ecx, dword [esp + 0x14]
cmp byte [ecx + 0x4f1c], 0
je 0x417a7d
lea eax, [ecx + 0x1800]
push eax
push ecx
push edx
mov edx, edi
mov ecx, ebx
call fcn.0040d190
add esp, 0xc
push dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
push dword [eax + 0x28]
push dword [esp + 0x40]
push ecx
push esi
push edi
mov edi, dword [esp + 0x40]
mov ecx, edi
push ebx
call fcn.00417c60
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x18], eax
inc dword [ecx]
test eax, eax
jne 0x417b79
xor al, al
mov byte [esp + 0x13], al
mov edx, dword [esp + 0x3c]
mov ecx, esi
cmp esi, edx
jl 0x417970
sub edx, dword [esp + 0x40]
mov dword [esp + 0x48], edx
push ebx
call fcn.00560853
push dword [esp + 0x34]
call fcn.00560853
push dword [esp + 0x28]
call fcn.00560853
push dword [esp + 0x44]
call fcn.00560853
add esp, 0x10
cmp dword [esp + 0x18], 0
jne 0x417bdc
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
mov dword [esp + 0x44], eax
test eax, eax
jne 0x4177a6
mov si, word [ebp + 0x10]
mov ecx, dword [ecx]
mov dword [esp + 0x2c], ecx
cmp si, 4
je 0x417b9f
mov eax, dword [esp + 0x50]
add eax, 0x64
mov dword [esp + 0x50], eax
cdq
idiv dword [esp + 0x54]
mov esi, eax
cmp esi, dword [esp + 0x58]
je 0x417b67
call fcn.0040f410
mov edi, dword [esp + 0x28]
push esi
push 0
push 0x801c
mov ecx, dword [edi + 0x3a18]
push dword [ecx]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x58], esi
jmp 0x417b6b
mov edi, dword [esp + 0x28]
test ecx, ecx
jne 0x41779f
mov si, word [ebp + 0x10]
jmp 0x417ba3
push ebx
call fcn.00560853
push dword [esp + 0x34]
call fcn.00560853
push dword [esp + 0x28]
call fcn.00560853
push dword [esp + 0x44]
call fcn.00560853
add esp, 0x10
jmp 0x417be0
mov edi, dword [esp + 0x28]
push 0
lea eax, [edi + 0x3a0c]
push eax
push 4
lea eax, [esp + 0x80]
push eax
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x417be8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], 0xc25
mov dword [ecx], eax
jmp 0x417be8
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
mov si, word [ebp + 0x10]
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [edi + 0x39f8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x20810]
test ecx, ecx
je 0x417c2c
cmp si, 1
jne 0x417c16
push 0
push 1
jmp 0x417c20
push dword [edi + 0x3a00]
movsx eax, si
push eax
push 0x801a
push ecx
call dword [sym.imp.USER32.dll_SendNotifyMessageW]
mov eax, dword [edi + 0x3a18]
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x133c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x10