Function at 0x4727a0
Capabilities:
Terminate process

Disassembly:
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov ebx, eax
mov eax, dword [esi + 0x6c]
test al, 1
push edi
jne 0x4727bd
mov edi, str.Missing_IHDR_before_pCAL
mov eax, esi
jmp fcn.004665a0
test al, 4
je 0x4727da
mov ecx, str.Invalid_pCAL_after_IDAT
call fcn.004665c0
pop edi
mov ecx, esi
pop esi
mov eax, ebx
pop ebx
add esp, 0x14
jmp fcn.00470aa0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x472804
test dword [eax + 8], 0x400
je 0x472804
mov ecx, str.Duplicate_pCAL_chunk
call fcn.004665c0
pop edi
mov ecx, esi
pop esi
mov eax, ebx
pop ebx
add esp, 0x14
jmp fcn.00470aa0
mov ecx, dword [esi + 0x2a8]
test ecx, ecx
je 0x472829
mov eax, dword [esi + 0x240]
test eax, eax
push ecx
je 0x472821
push esi
call eax
add esp, 8
jmp 0x472829
call fcn.0047fdbd
add esp, 4
lea ecx, [ebx + 1]
call fcn.0046fa50
test eax, eax
mov dword [esi + 0x2a8], eax
jne 0x47284c
mov ecx, str.No_memory_for_pCAL_purpose
call fcn.004665c0
pop edi
pop esi
pop ebx
add esp, 0x14
ret
call fcn.00470a30
xor eax, eax
mov ecx, esi
call fcn.00470aa0
test eax, eax
je 0x47287c
mov edx, dword [esi + 0x2a8]
mov ecx, esi
call fcn.0046fa20
pop edi
mov dword [esi + 0x2a8], 0
pop esi
pop ebx
add esp, 0x14
ret
mov eax, dword [esi + 0x2a8]
mov byte [ebx + eax], 0
mov ecx, dword [esi + 0x2a8]
mov eax, ecx
cmp byte [eax], 0
je 0x47289b
add eax, 1
cmp byte [eax], 0
jne 0x472893
add ecx, ebx
lea edx, [eax + 0xc]
cmp ecx, edx
mov dword [esp + 0x1c], ecx
ja 0x4728f7
mov ecx, str.Invalid_pCAL_data
call fcn.004665c0
mov ecx, dword [esi + 0x2a8]
test ecx, ecx
je 0x4728e6
mov eax, dword [esi + 0x240]
test eax, eax
push ecx
je 0x4728de
push esi
call eax
add esp, 8
pop edi
mov dword [esi + 0x2a8], 0
pop esi
pop ebx
add esp, 0x14
ret
call fcn.0047fdbd
add esp, 4
pop edi
mov dword [esi + 0x2a8], 0
pop esi
pop ebx
add esp, 0x14
ret
mov cl, byte [eax + 1]
movzx ebx, cl
shl ebx, 8
test cl, cl
jns 0x47291e
movzx ecx, byte [eax + 2]
movzx edx, byte [eax + 3]
add ebx, ecx
movzx ecx, byte [eax + 4]
shl ebx, 8
add ebx, edx
shl ebx, 8
add ebx, ecx
jmp 0x472936
movzx edx, byte [eax + 2]
movzx ecx, byte [eax + 3]
add ebx, edx
movzx edx, byte [eax + 4]
shl ebx, 8
add ebx, ecx
shl ebx, 8
add ebx, edx
mov cl, byte [eax + 5]
push ebp
movzx ebp, cl
shl ebp, 8
test cl, cl
jns 0x47295e
movzx ecx, byte [eax + 6]
movzx edx, byte [eax + 7]
add ebp, ecx
movzx ecx, byte [eax + 8]
shl ebp, 8
add ebp, edx
shl ebp, 8
add ebp, ecx
jmp 0x472976
movzx edx, byte [eax + 6]
movzx ecx, byte [eax + 7]
add ebp, edx
movzx edx, byte [eax + 8]
shl ebp, 8
add ebp, ecx
shl ebp, 8
add ebp, edx
mov cl, byte [eax + 9]
mov dl, byte [eax + 0xa]
add eax, 0xb
test cl, cl
mov byte [esp + 0x13], cl
mov byte [esp + 0x12], dl
mov dword [esp + 0x1c], eax
jne 0x472996
cmp dl, 2
jne 0x4729b8
jmp 0x4729f8
cmp cl, 1
jne 0x4729a2
cmp dl, 3
jne 0x4729b8
jmp 0x4729f8
cmp cl, 2
jne 0x4729ae
cmp dl, 3
jne 0x4729b8
jmp 0x4729f8
cmp cl, 3
jne 0x4729e1
cmp dl, 4
je 0x4729f8
mov ecx, str.Invalid_pCAL_parameters_for_equation_type
call fcn.004665c0
mov edx, dword [esi + 0x2a8]
mov ecx, esi
call fcn.0046fa20
pop ebp
pop edi
mov dword [esi + 0x2a8], 0
pop esi
pop ebx
add esp, 0x14
ret
cmp cl, 4
jb 0x4729f8
mov ecx, str.Unrecognized_equation_type_for_pCAL_chunk
call fcn.004665c0
mov dl, byte [esp + 0x12]
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0
mov edi, eax
je 0x472a08
nop
add edi, 1
cmp byte [edi], 0
jne 0x472a00
movzx eax, dl
lea ecx, [eax*4]
mov dword [esp + 0x18], eax
call fcn.0046fa50
test eax, eax
mov dword [esp + 0x14], eax
jne 0x472a64
mov ecx, dword [esi + 0x2a8]
test ecx, ecx
je 0x472a48
mov eax, dword [esi + 0x240]
test eax, eax
push ecx
je 0x472a40
push esi
call eax
add esp, 8
jmp 0x472a48
call fcn.0047fdbd
add esp, 4
mov ecx, str.No_memory_for_pCAL_params
mov dword [esi + 0x2a8], 0
call fcn.004665c0
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
xor edx, edx
cmp dword [esp + 0x18], edx
jle 0x472ac0
lea esp, [esp]
mov ecx, dword [esp + 0x20]
add edi, 1
cmp edi, ecx
mov dword [eax + edx*4], edi
ja 0x472a8c
mov edi, edi
cmp byte [edi], 0
je 0x472ab3
add edi, 1
cmp edi, ecx
jbe 0x472a80
mov ecx, str.Invalid_pCAL_data
call fcn.004665c0
mov ecx, dword [esi + 0x2a8]
test ecx, ecx
je 0x472b0c
mov eax, dword [esi + 0x240]
test eax, eax
push ecx
je 0x472b04
push esi
call eax
add esp, 8
jmp 0x472b0c
cmp edi, ecx
ja 0x472a8c
add edx, 1
cmp edx, dword [esp + 0x18]
jl 0x472a70
mov ecx, dword [esp + 0x18]
movzx edx, byte [esp + 0x13]
push eax
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esi + 0x2a8]
push ecx
push edx
push ebp
push ebx
push eax
mov eax, dword [esp + 0x44]
push esi
call fcn.00465880
mov eax, dword [esi + 0x2a8]
add esp, 0x20
test eax, eax
je 0x472b3c
mov ecx, dword [esi + 0x240]
test ecx, ecx
push eax
je 0x472b34
push esi
call ecx
add esp, 8
jmp 0x472b3c
call fcn.0047fdbd
add esp, 4
mov eax, dword [esi + 0x240]
test eax, eax
mov dword [esi + 0x2a8], 0
jne 0x472b50
mov edx, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
mov dword [esp + 4], edx
jmp fcn.0047fdbd
call fcn.0047fdbd
add esp, 4
mov eax, dword [esi + 0x240]
test eax, eax
mov dword [esi + 0x2a8], 0
je 0x472b63
mov ecx, dword [esp + 0x14]
push ecx
push esi
call eax
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
mov edx, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
mov dword [esp + 4], edx
jmp fcn.0047fdbd