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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
movsd xmm2, qword [0x4d8790]
push ebx
mov ebx, ecx
push esi
xor esi, esi
mov dword [esp + 0x30], ebx
push edi
mov ecx, dword [ebx + 0x2c4]
mov eax, dword [ebx + 0x188]
test ecx, ecx
je 0x406565
sub esp, 8
test eax, eax
je 0x4064fa
xorps xmm1, xmm1
xorps xmm0, xmm0
cvtsi2sd xmm1, ecx
cvtsi2sd xmm0, eax
mulsd xmm1, xmm0
divsd xmm1, qword [0x4d87e8]
addsd xmm1, xmm2
movsd qword [esp + 0x40], xmm1
fld qword [esp + 0x40]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movsd xmm0, qword [0x4d87f0]
add esp, 8
fstp qword [esp + 0x38]
movsd xmm1, qword [esp + 0x38]
comisd xmm0, xmm1
jb 0x4064f0
comisd xmm1, xmmword [0x4d8810]
jb 0x4064f0
cvttsd2si eax, xmm1
add eax, 0xfffe8ce8
cmp eax, 0x2710
jbe 0x4065e5
mov esi, 1
jmp 0x4065e5
movsd xmm1, qword [0x4d87f8]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
addsd xmm1, xmm2
movsd qword [esp + 0x40], xmm1
fld qword [esp + 0x40]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movsd xmm0, qword [0x4d87f0]
add esp, 8
fstp qword [esp + 0x38]
movsd xmm1, qword [esp + 0x38]
comisd xmm0, xmm1
jb 0x406558
comisd xmm1, xmmword [0x4d8810]
jb 0x406558
cvttsd2si eax, xmm1
mov dword [ebx + 0x188], eax
jmp 0x4065e5
xor eax, eax
mov dword [ebx + 0x188], eax
jmp 0x4065e5
test eax, eax
je 0x4065d1
movsd xmm1, qword [0x4d87f8]
sub esp, 8
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
addsd xmm1, xmm2
movsd qword [esp + 0x40], xmm1
fld qword [esp + 0x40]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movsd xmm0, qword [0x4d87f0]
add esp, 8
fstp qword [esp + 0x38]
movsd xmm1, qword [esp + 0x38]
comisd xmm0, xmm1
jb 0x4065c7
comisd xmm1, xmmword [0x4d8810]
jb 0x4065c7
cvttsd2si eax, xmm1
mov dword [ebx + 0x2c4], eax
jmp 0x4065e5
xor eax, eax
mov dword [ebx + 0x2c4], eax
jmp 0x4065e5
mov dword [ebx + 0x2c4], 0x186a0
mov dword [ebx + 0x188], 0x186a0
mov edx, dword [ebx + 0x7c]
mov eax, edx
or word [ebx + 0x30e], 1
and eax, 0xffffdfff
or edx, 0x2000
test esi, esi
cmove edx, eax
mov eax, edx
mov dword [ebx + 0x7c], edx
and eax, 0x40080
cmp eax, 0x40000
jne 0x40662c
and dword [ebx + 0x78], 0xffffdfff
and edx, 0xfd7ffeff
xor eax, eax
mov dword [ebx + 0x7c], edx
mov word [ebx + 0x148], ax
mov eax, dword [ebx + 0x188]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x40664e
and edx, 0xff7fffff
and dword [ebx + 0x78], 0xffffdfff
mov dword [ebx + 0x7c], edx
mov ecx, edx
test edx, 0x600000
je 0x4067ac
cmp byte [ebx + 0x249], 0
jne 0x4067ac
test byte [ebx + 0x30e], 2
je 0x4067ac
mov eax, dword [ebx + 0x2f8]
mov ecx, dword [ebx + 0x304]
mov edx, dword [ebx + 0x2ec]
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], eax
lea esi, [ecx + eax]
mov dword [esp + 0x2c], eax
add esi, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], esi
test esi, esi
jle 0x4073f6
test edx, edx
js 0x4073f6
push esi
push 0x8000
lea ecx, [esp + 0x38]
call fcn.004041e0
add esp, 8
test eax, eax
je 0x4073f6
mov edi, dword [esp + 0x30]
cmp edi, 0x8000
ja 0x4073f6
mov edx, dword [esp + 0x38]
test edx, edx
js 0x4073f6
push esi
push 0x8000
lea ecx, [esp + 0x34]
call fcn.004041e0
add esp, 8
test eax, eax
je 0x4073f6
mov esi, dword [esp + 0x2c]
cmp esi, 0x8000
ja 0x4073f6
mov edx, dword [esp + 0x24]
test edx, edx
js 0x4073f6
push dword [esp + 0x20]
lea ecx, [esp + 0x2c]
push 0x8000
call fcn.004041e0
add esp, 8
test eax, eax
je 0x4073f6
mov ecx, dword [esp + 0x28]
cmp ecx, 0x8000
ja 0x4073f6
lea eax, [ecx + esi]
add eax, edi
cmp eax, 0x8001
jg 0x4073f6
cmp eax, 0x8000
jle 0x40676a
or eax, 0xffffffff
jmp 0x406771
jge 0x40678b
mov eax, 1
cmp edi, esi
jg 0x406781
cmp esi, ecx
jl 0x40677d
add esi, eax
jmp 0x40678b
cmp edi, esi
jl 0x406789
cmp edi, ecx
jl 0x406789
add edi, eax
jmp 0x40678b
add ecx, eax
lea eax, [ecx + esi]
add eax, edi
cmp eax, 0x8000
jne 0x4073ea
mov ecx, dword [ebx + 0x7c]
mov word [ebx + 0x24a], di
mov word [ebx + 0x24c], si
test ecx, 0x100
je 0x4067bf
test byte [ebx + 0x14f], 2
jne 0x4067f4
jmp 0x4067ed
mov eax, ecx
and eax, 0x4080
cmp eax, 0x4080
jne 0x4067f4
movzx eax, word [ebx + 0x166]
cmp ax, word [ebx + 0x168]
jne 0x4067f4
cmp ax, word [ebx + 0x16a]
jne 0x4067f4
mov word [ebx + 0x16c], ax
or dword [ebx + 0x74], 0x800
mov al, byte [ebx + 0x14f]
mov byte [esp + 0x19], al
cmp al, 3
jne 0x406811
mov ecx, ebx
call fcn.00406310
mov edx, dword [ebx + 0x7c]
jmp 0x4068d9
test al, 4
jne 0x406838
and dword [ebx + 0x78], 0xffffdfff
and ecx, 0xff7fffff
cmp word [ebx + 0x148], 0
mov dword [ebx + 0x7c], ecx
ja 0x406838
and ecx, 0xfffffe7f
mov dword [ebx + 0x7c], ecx
mov eax, ecx
mov edx, ecx
and eax, 0x1100
cmp eax, 0x1100
jne 0x4068d9
test byte [esp + 0x19], 2
jne 0x4068d9
movzx eax, byte [ebx + 0x150]
movzx edx, word [ebx + 0x16c]
movzx esi, word [ebx + 0x1bc]
sub eax, 1
je 0x406893
sub eax, 1
je 0x40688b
sub eax, 2
jne 0x40689f
mov eax, edx
shl edx, 4
add edx, eax
mov eax, esi
shl esi, 4
add esi, eax
jmp 0x40689f
imul edx, edx, 0x55
imul esi, esi, 0x55
jmp 0x40689f
imul edx, edx, 0xff
imul esi, esi, 0xff
movzx eax, dx
mov edx, ecx
mov word [ebx + 0x16a], ax
mov word [ebx + 0x168], ax
mov word [ebx + 0x166], ax
test ecx, 0x2000000
jne 0x4068d9
movzx eax, si
mov word [ebx + 0x1ba], ax
mov word [ebx + 0x1b8], ax
mov word [ebx + 0x1b6], ax
mov eax, edx
and eax, 0x380
cmp eax, 0x280
jne 0x406960
cmp byte [ebx + 0x150], 0x10
je 0x406960
movzx eax, word [ebx + 0x166]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [ebx + 0x166], ax
movzx eax, word [ebx + 0x168]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [ebx + 0x168], ax
movzx eax, word [ebx + 0x16a]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [ebx + 0x16a], ax
movzx eax, word [ebx + 0x16c]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [ebx + 0x16c], ax
test edx, 0x4000400
setne cl
test dl, 0x80
setne al
test al, cl
je 0x4069cd
test edx, 0x100
jne 0x4069cd
cmp byte [ebx + 0x150], 0x10
jne 0x4069cd
movzx ecx, word [ebx + 0x166]
mov esi, 0x101
imul ecx, esi
mov word [ebx + 0x166], cx
movzx ecx, word [ebx + 0x168]
imul ecx, esi
mov word [ebx + 0x168], cx
movzx ecx, word [ebx + 0x16a]
imul ecx, esi
mov word [ebx + 0x16a], cx
movzx ecx, word [ebx + 0x16c]
imul ecx, esi
mov word [ebx + 0x16c], cx
movq xmm0, qword [ebx + 0x164]
mov ax, word [ebx + 0x16c]
movq qword [ebx + 0x16e], xmm0
mov word [ebx + 0x176], ax
test edx, 0x2000
jne 0x406c04
test edx, 0x600000
je 0x406a2b
mov eax, dword [ebx + 0x2c4]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x406c04
mov eax, dword [ebx + 0x188]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x406c04
test dl, dl
jns 0x406a7a
mov eax, dword [ebx + 0x2c4]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x406c04
mov eax, dword [ebx + 0x188]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x406c04
cmp byte [ebx + 0x15c], 3
jne 0x406a7a
mov eax, dword [ebx + 0x160]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x406c04
mov ecx, dword [ebx + 0x7c]
mov dword [esp + 0x2c], ecx
test ecx, 0x800000
je 0x406a9f
mov eax, dword [ebx + 0x188]
add eax, 0xfffe8ce8
cmp eax, 0x2710
ja 0x406c04
mov edx, ecx
test cl, cl
jns 0x407312
cmp byte [ebx + 0x14f], 3
jne 0x407312
mov al, byte [ebx + 0x166]
movzx esi, word [ebx + 0x148]
mov dl, byte [ebx + 0x16a]
mov edi, dword [ebx + 0x13c]
mov byte [esp + 0x1a], al
mov byte [esp + 0x1c], al
mov al, byte [ebx + 0x168]
mov byte [esp + 0x1b], al
mov byte [esp + 0x1d], al
xor eax, eax
mov dword [esp + 0x30], esi
mov byte [esp + 0x19], dl
mov dword [esp + 0x20], eax
test esi, esi
je 0x406bf7
mov ecx, dword [ebx + 0x1b0]
add edi, 2
mov ebx, ecx
mov cl, byte [ebx + eax]
test cl, cl
jne 0x406b1d
mov cx, word [esp + 0x1c]
mov word [edi - 2], cx
mov byte [edi], dl
jmp 0x406bdf
cmp cl, 0xff
je 0x406bdf
movzx eax, byte [esp + 0x1a]
movzx edx, cl
mov ecx, 0xff
sub ecx, edx
movzx esi, cx
imul esi, eax
movzx eax, byte [edi - 2]
imul eax, edx
add si, ax
mov eax, 0x80
add si, ax
movzx eax, si
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, dword [esp + 0x20]
shr ecx, 8
mov byte [edi - 2], cl
mov ecx, 0xff
movzx edx, byte [ebx + eax]
movzx eax, byte [esp + 0x1b]
sub ecx, edx
movzx esi, cx
imul esi, eax
movzx eax, byte [edi - 1]
imul eax, edx
add si, ax
mov eax, 0x80
add si, ax
movzx eax, si
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, dword [esp + 0x20]
shr ecx, 8
mov byte [edi - 1], cl
mov ecx, 0xff
movzx edx, byte [ebx + eax]
movzx eax, byte [esp + 0x19]
sub ecx, edx
movzx esi, cx
imul esi, eax
movzx eax, byte [edi]
imul eax, edx
mov dl, byte [esp + 0x19]
add si, ax
mov eax, 0x80
add si, ax
movzx eax, si
mov esi, dword [esp + 0x30]
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, dword [esp + 0x20]
shr ecx, 8
mov byte [edi], cl
inc eax
add edi, 3
mov dword [esp + 0x20], eax
cmp eax, esi
jl 0x406b06
mov ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
mov edx, ecx
and edx, 0xffffff7f
jmp 0x40730f
movzx edx, byte [ebx + 0x150]
mov ecx, ebx
call fcn.00404c50
mov eax, dword [ebx + 0x7c]
test al, al
jns 0x4072a5
test eax, 0x600000
je 0x406c65
mov eax, dword [ebx + 0x50]
push str.libpng_does_not_support_gammabackgroundrgb_to_gray
test eax, eax
je 0x406c35
push ebx
call eax
jmp 0x406c62
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.libpng_warning:__s
push 2
call esi
add esp, 4
push eax
call fcn.0040cad0
add esp, 0xc
push 0x4d7efc
push 2
call esi
add esp, 4
push eax
call fcn.0040cad0
add esp, 8
cmp byte [ebx + 0x14f], 3
mov al, byte [ebx + 0x15c]
jne 0x407024
cmp al, 2
jne 0x406ccc
mov edx, dword [ebx + 0x18c]
movzx edi, word [ebx + 0x166]
movzx esi, word [ebx + 0x168]
movzx ecx, word [ebx + 0x16a]
mov al, byte [edx + edi]
mov byte [esp + 0x1c], al
mov al, byte [edx + esi]
mov byte [esp + 0x1d], al
mov al, byte [edx + ecx]
mov byte [esp + 0x19], al
mov eax, dword [ebx + 0x198]
mov dl, byte [eax + edi]
mov cl, byte [eax + ecx]
mov dword [esp + 0x20], edx
mov dl, byte [eax + esi]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
jmp 0x406e7c
movzx eax, al
sub eax, 1
je 0x406db1
sub eax, 1
je 0x406d11
sub eax, 1
je 0x406cee
mov edi, 0x186a0
mov esi, edi
jmp 0x406dbc
mov esi, dword [ebx + 0x160]
mov ecx, esi
call fcn.00404290
mov edx, dword [ebx + 0x188]
mov ecx, esi
mov edi, eax
call fcn.00404300
mov esi, eax
jmp 0x406d96
mov esi, dword [ebx + 0x2c4]
mov ecx, esi
call fcn.00404290
mov edi, eax
test esi, esi
je 0x406da8
mov eax, dword [ebx + 0x188]
test eax, eax
je 0x406da8
movsd xmm1, qword [0x4d8800]
xorps xmm0, xmm0
cvtsi2sd xmm0, esi
sub esp, 8
divsd xmm1, xmm0
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
divsd xmm1, xmm0
addsd xmm1, qword [0x4d8790]
movsd qword [esp + 0x40], xmm1
fld qword [esp + 0x40]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movsd xmm0, qword [0x4d87f0]
add esp, 8
fstp qword [esp + 0x38]
movsd xmm1, qword [esp + 0x38]
comisd xmm0, xmm1
jb 0x406da8
comisd xmm1, xmmword [0x4d8810]
jb 0x406da8
cvttsd2si esi, xmm1
cmp esi, 0x17318
jl 0x406daa
cmp esi, 0x19a28
jg 0x406daa
jmp 0x406dbc
xor esi, esi
mov eax, 1
jmp 0x406dbe
mov edi, dword [ebx + 0x188]
mov esi, 0x186a0
xor eax, eax
test eax, eax
je 0x406e0f
movzx eax, word [ebx + 0x166]
mov edx, esi
movzx ecx, ax
mov dword [esp + 0x20], eax
call fcn.00404380
mov byte [esp + 0x1c], al
mov edx, esi
movzx eax, word [ebx + 0x168]
movzx ecx, ax
mov dword [esp + 0x24], eax
call fcn.00404380
mov byte [esp + 0x1d], al
mov edx, esi
movzx eax, word [ebx + 0x16a]
movzx ecx, ax
mov dword [esp + 0x28], eax
call fcn.00404380
mov byte [esp + 0x19], al
jmp 0x406e39
mov cl, byte [ebx + 0x166]
mov al, byte [ebx + 0x168]
mov dl, byte [ebx + 0x16a]
mov byte [esp + 0x1c], cl
mov byte [esp + 0x1d], al
mov byte [esp + 0x19], dl
mov byte [esp + 0x20], cl
mov byte [esp + 0x24], al
mov byte [esp + 0x28], dl
lea eax, [edi - 0x17318]
cmp eax, 0x2710
jbe 0x406e7c
movzx ecx, word [ebx + 0x166]
mov edx, edi
call fcn.00404380
movzx ecx, word [ebx + 0x168]
mov edx, edi
mov byte [esp + 0x20], al
call fcn.00404380
movzx ecx, word [ebx + 0x16a]
mov edx, edi
mov byte [esp + 0x24], al
call fcn.00404380
mov byte [esp + 0x28], al
movzx eax, word [ebx + 0x140]
xor edx, edx
mov dword [esp + 0x2c], edx
test eax, eax
je 0x407015
mov esi, dword [ebx + 0x13c]
movzx eax, word [ebx + 0x148]
add esi, 2
mov dword [esp + 0x30], esi
cmp edx, eax
jae 0x406fd1
mov eax, dword [ebx + 0x1b0]
mov dword [esp + 0x38], eax
mov al, byte [eax + edx]
cmp al, 0xff
je 0x406fd1
test al, al
jne 0x406ed8
mov ax, word [esp + 0x1c]
mov word [esi - 2], ax
mov al, byte [esp + 0x19]
jmp 0x406ff1
mov edi, dword [ebx + 0x198]
mov ecx, 0xff
movzx edx, al
movzx eax, byte [esi - 2]
sub ecx, edx
movzx ecx, cx
mov ebx, dword [ebx + 0x194]
movzx esi, byte [eax + edi]
mov eax, dword [esp + 0x20]
movzx eax, al
imul ecx, eax
mov eax, 0x80
imul esi, edx
mov edx, dword [esp + 0x38]
add si, cx
add si, ax
movzx eax, si
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x30]
mov al, byte [eax + ebx]
mov byte [ecx - 2], al
mov eax, dword [esp + 0x2c]
movzx edx, byte [edx + eax]
movzx eax, byte [ecx - 1]
mov ecx, 0xff
sub ecx, edx
movzx ecx, cx
movzx esi, byte [eax + edi]
mov eax, dword [esp + 0x24]
movzx eax, al
imul ecx, eax
mov eax, 0x80
imul esi, edx
mov edx, dword [esp + 0x38]
add si, cx
add si, ax
movzx eax, si
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x30]
mov al, byte [eax + ebx]
mov byte [ecx - 1], al
mov eax, dword [esp + 0x2c]
movzx edx, byte [edx + eax]
movzx eax, byte [ecx]
mov ecx, 0xff
sub ecx, edx
movzx ecx, cx
movzx esi, byte [eax + edi]
mov eax, dword [esp + 0x28]
movzx eax, al
imul ecx, eax
mov eax, 0x80
imul esi, edx
mov edx, dword [esp + 0x2c]
add si, cx
add si, ax
movzx eax, si
mov esi, dword [esp + 0x30]
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
movzx eax, cl
mov al, byte [eax + ebx]
mov ebx, dword [esp + 0x34]
jmp 0x406ff1
mov ecx, dword [ebx + 0x18c]
movzx eax, byte [esi - 2]
mov al, byte [eax + ecx]
mov byte [esi - 2], al
movzx eax, byte [esi - 1]
mov al, byte [eax + ecx]
mov byte [esi - 1], al
movzx eax, byte [esi]
mov al, byte [eax + ecx]
mov byte [esi], al
inc edx
movzx eax, word [ebx + 0x140]
add esi, 3
cmp edx, eax
mov dword [esp + 0x2c], edx
movzx eax, word [ebx + 0x148]
mov dword [esp + 0x30], esi
jl 0x406ea5
and dword [ebx + 0x7c], 0xffffdf7f
mov edx, dword [ebx + 0x7c]
jmp 0x407312
movzx eax, al
mov esi, 0x186a0
sub eax, 1
je 0x407128
sub eax, 1
je 0x4070d2
sub eax, 1
jne 0x407402
mov esi, dword [ebx + 0x160]
mov ecx, esi
call fcn.00404290
mov edi, eax
test esi, esi
je 0x407124
mov eax, dword [ebx + 0x188]
test eax, eax
je 0x407124
movsd xmm1, qword [0x4d8800]
xorps xmm0, xmm0
cvtsi2sd xmm0, esi
divsd xmm1, xmm0
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
divsd xmm1, xmm0
addsd xmm1, qword [0x4d8790]
movsd qword [esp + 0x38], xmm1
fld qword [esp + 0x38]
sub esp, 8
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
movsd xmm0, qword [0x4d87f0]
add esp, 8
fstp qword [esp + 0x38]
movsd xmm1, qword [esp + 0x38]
comisd xmm0, xmm1
jb 0x407124
comisd xmm1, xmmword [0x4d8810]
jb 0x407124
cvttsd2si esi, xmm1
jmp 0x40712e
mov esi, dword [ebx + 0x2c4]
mov ecx, esi
call fcn.00404290
mov edi, eax
test esi, esi
je 0x407124
mov eax, dword [ebx + 0x188]
test eax, eax
je 0x407124
movsd xmm1, qword [0x4d8800]
xorps xmm0, xmm0
cvtsi2sd xmm0, esi
divsd xmm1, xmm0
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
divsd xmm1, xmm0
addsd xmm1, qword [0x4d8790]
movsd qword [esp + 0x38], xmm1
fld qword [esp + 0x38]
jmp 0x40709c
xor esi, esi
jmp 0x40712e
mov edi, dword [ebx + 0x188]
lea eax, [edi - 0x17318]
lea ecx, [esi - 0x17318]
cmp eax, 0x2710
jbe 0x407160
movzx edx, word [ebx + 0x16c]
mov ecx, ebx
push edi
call fcn.004043f0
add esp, 4
mov word [ebx + 0x176], ax
lea ecx, [esi - 0x17318]
cmp ecx, 0x2710
jbe 0x407181
movzx edx, word [ebx + 0x16c]
mov ecx, ebx
push esi
call fcn.004043f0
add esp, 4
mov word [ebx + 0x16c], ax
movzx eax, word [ebx + 0x166]
movzx ecx, word [ebx + 0x168]
mov edx, eax
cmp ax, cx
jne 0x4071eb
cmp ax, word [ebx + 0x16a]
jne 0x4071eb
movzx ecx, word [ebx + 0x16c]
cmp ax, cx
jne 0x4071eb
movzx eax, word [ebx + 0x176]
mov edx, dword [ebx + 0x7c]
mov word [ebx + 0x174], ax
mov word [ebx + 0x172], ax
mov word [ebx + 0x170], ax
mov word [ebx + 0x16a], cx
mov word [ebx + 0x168], cx
mov word [ebx + 0x166], cx
mov byte [ebx + 0x15c], 1
jmp 0x407312
lea ecx, [edi - 0x17318]
cmp ecx, 0x2710
jbe 0x407245
push edi
mov ecx, ebx
mov dword [esp + 0x3c], edx
call fcn.004043f0
movzx edx, word [ebx + 0x168]
add esp, 4
mov ecx, ebx
mov word [ebx + 0x170], ax
push edi
call fcn.004043f0
movzx edx, word [ebx + 0x16a]
add esp, 4
mov ecx, ebx
mov word [ebx + 0x172], ax
push edi
call fcn.004043f0
mov word [ebx + 0x174], ax
add esp, 4
mov eax, dword [esp + 0x38]
lea ecx, [esi - 0x17318]
cmp ecx, 0x2710
jbe 0x407299
push esi
mov edx, eax
mov ecx, ebx
call fcn.004043f0
movzx edx, word [ebx + 0x168]
add esp, 4
mov ecx, ebx
mov word [ebx + 0x166], ax
push esi
call fcn.004043f0
movzx edx, word [ebx + 0x16a]
add esp, 4
mov ecx, ebx
mov word [ebx + 0x168], ax
push esi
call fcn.004043f0
add esp, 4
mov word [ebx + 0x16a], ax
mov edx, dword [ebx + 0x7c]
mov byte [ebx + 0x15c], 1
jmp 0x407312
cmp byte [ebx + 0x14f], 3
mov edx, eax
jne 0x407312
test eax, 0x600000
setne cl
bt eax, 0xc
setb al
test al, cl
jne 0x407312
movzx esi, word [ebx + 0x140]
mov ecx, dword [ebx + 0x13c]
test esi, esi
je 0x407306
mov edx, dword [ebx + 0x18c]
add ecx, 2
nop dword [eax]
movzx eax, byte [ecx - 2]
lea ecx, [ecx + 3]
mov al, byte [eax + edx]
mov byte [ecx - 5], al
movzx eax, byte [ecx - 4]
mov al, byte [eax + edx]
mov byte [ecx - 4], al
movzx eax, byte [ecx - 3]
mov al, byte [eax + edx]
mov byte [ecx - 3], al
sub esi, 1
jne 0x4072e0
mov edx, dword [ebx + 0x7c]
and edx, 0xffffdfff
mov dword [ebx + 0x7c], edx
mov eax, edx
and eax, 0x1008
cmp eax, 8
jne 0x4073e3
cmp byte [ebx + 0x14f], 3
jne 0x4073e3
movzx eax, byte [ebx + 0x1a4]
mov ecx, 8
movzx esi, word [ebx + 0x140]
mov edi, ecx
sub edi, eax
and edx, 0xfffffff7
mov eax, edi
mov dword [esp + 0x38], edi
mov dword [ebx + 0x7c], edx
test eax, eax
jle 0x40737e
cmp eax, ecx
jge 0x40737e
test esi, esi
je 0x40737e
mov eax, dword [ebx + 0x13c]
mov edx, esi
mov ebx, edi
mov cl, bl
lea eax, [eax + 3]
shr byte [eax - 3], cl
sub edx, 1
jne 0x407368
mov ebx, dword [esp + 0x34]
mov ecx, 8
movzx eax, byte [ebx + 0x1a5]
mov edx, ecx
sub edx, eax
test edx, edx
jle 0x4073b2
cmp edx, 8
jge 0x4073b2
test esi, esi
je 0x4073b2
mov eax, dword [ebx + 0x13c]
mov edi, esi
inc eax
nop
mov cl, dl
lea eax, [eax + 3]
shr byte [eax - 3], cl
sub edi, 1
jne 0x4073a0
mov ecx, 8
movzx eax, byte [ebx + 0x1a6]
sub ecx, eax
mov dword [esp + 0x38], ecx
test ecx, ecx
jle 0x4073e3
cmp ecx, 8
jge 0x4073e3
test esi, esi
je 0x4073e3
mov eax, dword [ebx + 0x13c]
add eax, 2
shr byte [eax], cl
lea eax, [eax + 3]
mov ecx, dword [esp + 0x38]
sub esi, 1
jne 0x4073d5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, str.internal_error_handling_cHRM_coefficients
mov ecx, ebx
call fcn.0040c5b0
mov edx, str.internal_error_handling_cHRM__XYZ
mov ecx, ebx
call fcn.0040c5b0
mov edx, str.invalid_background_gamma_type
mov ecx, ebx
call fcn.0040c5b0
int3