Function at 0x40ae40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov edi, eax
mov eax, dword [esi + 0x68]
test al, 1
jne 0x40ae62
push esi
mov ecx, str.Missing_IHDR_before_cHRM
call fcn.00406390
add esp, 4
jmp 0x40ae91
test al, 4
je 0x40ae83
mov edx, str.Invalid_cHRM_after_IDAT
call fcn.00406450
push edi
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
test al, 2
je 0x40ae91
mov edx, str.Missing_PLTE_before_cHRM
call fcn.00406450
mov eax, dword [esp + 0x50]
test eax, eax
je 0x40aec4
mov eax, dword [eax + 8]
test al, 4
je 0x40aec4
test eax, 0x800
jne 0x40aec4
mov edx, str.Duplicate_cHRM_chunk
call fcn.00406450
push edi
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp edi, 0x20
je 0x40aee6
mov edx, str.Incorrect_cHRM_chunk_length
call fcn.00406450
push edi
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ebx, 4
lea edi, [esp + 0x10]
call fcn.0040a0f0
mov eax, dword [esp + 0x10]
movzx ecx, byte [esp + 0x12]
movzx edx, byte [esp + 0x13]
movzx ebp, al
shl ebp, 8
movzx eax, ah
add ebp, eax
shl ebp, 8
add ebp, ecx
shl ebp, 8
add ebp, edx
call fcn.0040a0f0
mov ecx, dword [esp + 0x10]
movzx edx, byte [esp + 0x12]
movzx eax, cl
shl eax, 8
movzx ecx, ch
add eax, ecx
movzx ecx, byte [esp + 0x13]
shl eax, 8
add eax, edx
shl eax, 8
add eax, ecx
cmp ebp, 0x13880
ja 0x40b2a1
cmp eax, 0x13880
ja 0x40b2a1
lea edx, [eax + ebp]
cmp edx, 0x186a0
ja 0x40b2a1
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], eax
call fcn.0040a0f0
mov eax, dword [esp + 0x10]
movzx ecx, byte [esp + 0x12]
movzx edx, byte [esp + 0x13]
movzx ebp, al
shl ebp, 8
movzx eax, ah
add ebp, eax
shl ebp, 8
add ebp, ecx
shl ebp, 8
add ebp, edx
call fcn.0040a0f0
mov ecx, dword [esp + 0x10]
movzx edx, byte [esp + 0x12]
movzx eax, cl
shl eax, 8
movzx ecx, ch
add eax, ecx
movzx ecx, byte [esp + 0x13]
shl eax, 8
add eax, edx
shl eax, 8
add eax, ecx
lea edx, [eax + ebp]
cmp edx, 0x186a0
jbe 0x40afe6
mov edx, str.Invalid_cHRM_red_point
call fcn.00406450
push 0x10
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
lea edi, [esp + 0x10]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], eax
call fcn.0040a0f0
mov ecx, edi
call fcn.0040a0d0
mov ebp, eax
call fcn.0040a0f0
mov ecx, edi
call fcn.0040a0d0
lea ecx, [eax + ebp]
cmp ecx, 0x186a0
jbe 0x40b035
mov edx, str.Invalid_cHRM_green_point
call fcn.00406450
push 8
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
lea edi, [esp + 0x10]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], eax
call fcn.0040a0f0
mov ecx, edi
call fcn.0040a0d0
mov ebp, eax
mov dword [esp + 0x30], ebp
call fcn.0040a0f0
mov ecx, edi
call fcn.0040a0d0
mov ebx, eax
lea edx, [ebx + ebp]
mov dword [esp + 0x2c], ebx
cmp edx, 0x186a0
jbe 0x40b08e
mov edx, str.Invalid_cHRM_blue_point
call fcn.00406450
push 0
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
fild dword [esp + 0x28]
mov edi, dword [esp + 0x50]
fld qword [0x431528]
fdiv st(1), st(0)
fxch st(1)
fstp dword [esp + 0x48]
fild dword [esp + 0x24]
fdiv st(1)
fstp dword [esp + 0x44]
fild dword [esp + 0x20]
fdiv st(1)
fstp dword [esp + 0x40]
fild dword [esp + 0x1c]
fdiv st(1)
fstp dword [esp + 0x3c]
fild dword [esp + 0x18]
fdiv st(1)
fstp dword [esp + 0x38]
fild dword [esp + 0x14]
fdiv st(1)
fstp dword [esp + 0x34]
fild dword [esp + 0x30]
fdiv st(1)
fstp dword [esp + 0x30]
fidivr dword [esp + 0x2c]
fstp dword [esp + 0x2c]
test edi, edi
je 0x40b210
test dword [edi + 8], 0x800
je 0x40b210
mov eax, dword [esp + 0x28]
add eax, 0xffff89c2
cmp eax, 0x7d0
ja 0x40b185
mov ecx, dword [esp + 0x24]
add ecx, 0xffff8364
cmp ecx, 0x7d0
ja 0x40b185
mov edx, dword [esp + 0x20]
add edx, 0xffff09e8
cmp edx, 0x7d0
ja 0x40b185
mov eax, dword [esp + 0x1c]
add eax, 0xffff8300
cmp eax, 0x7d0
ja 0x40b185
mov ecx, dword [esp + 0x18]
add ecx, 0xffff8eb8
cmp ecx, 0x7d0
ja 0x40b185
mov edx, dword [esp + 0x14]
add edx, 0xffff1988
cmp edx, 0x7d0
ja 0x40b185
cmp ebp, 0x36b0
jl 0x40b185
cmp ebp, 0x3e80
jg 0x40b185
cmp ebx, 0x1388
jl 0x40b185
cmp ebx, 0x1b58
jle 0x40b1fc
mov edx, str.Ignoring_incorrect_cHRM_value_when_sRGB_is_also_present
call fcn.00406450
fld dword [esp + 0x3c]
sub esp, 0x20
fstp qword [esp + 0x18]
fld dword [esp + 0x60]
fstp qword [esp + 0x10]
fld dword [esp + 0x64]
fstp qword [esp + 8]
fld dword [esp + 0x68]
fstp qword [esp]
push str.wx_f__wy_f__rx_f__ry_f_n
call fcn.00418485
add eax, 0x40
push eax
call fcn.0041863a
fld dword [esp + 0x54]
fstp qword [esp + 0x20]
add esp, 8
fld dword [esp + 0x50]
fstp qword [esp + 0x10]
fld dword [esp + 0x54]
fstp qword [esp + 8]
fld dword [esp + 0x58]
fstp qword [esp]
push str.gx_f__gy_f__bx_f__by_f_n
call fcn.00418485
add eax, 0x40
push eax
call fcn.0041863a
add esp, 0x28
push 0
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
fld dword [esp + 0x2c]
sub esp, 0x40
fstp qword [esp + 0x38]
mov eax, esi
fld dword [esp + 0x70]
fstp qword [esp + 0x30]
fld dword [esp + 0x74]
fstp qword [esp + 0x28]
fld dword [esp + 0x78]
fstp qword [esp + 0x20]
fld dword [esp + 0x7c]
fstp qword [esp + 0x18]
fld dword [esp + 0x80]
fstp qword [esp + 0x10]
fld dword [esp + 0x84]
fstp qword [esp + 8]
fld dword [esp + 0x88]
fstp qword [esp]
call fcn.00408b80
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
push ebx
push ebp
push eax
mov eax, dword [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x74]
push edx
mov edx, dword [esp + 0x7c]
push eax
push ecx
push edx
push esi
mov eax, edi
call fcn.00408e90
add esp, 0x64
push 0
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov edx, str.Invalid_cHRM_white_point
call fcn.00406450
push 0x18
mov ecx, esi
call fcn.0040a160
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret