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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff8
sub esp, 0x34
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x10022ac9
mov eax, dword [edi]
cmp dword [edi + 4], 1
mov eax, dword [eax]
jne 0x1002277f
mov edx, dword [edi + 8]
mov edx, dword [edx + 8]
test edx, edx
jg 0x10022a10
mov dword [esp + 4], 0
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [esp], 0
call sym._AllocateToneCurveStruct
mov dword [esp + 0x28], eax
test eax, eax
je 0x10022a42
mov esi, dword [edi + 0x18]
movzx eax, word [esi]
mov word [esp + 0x24], ax
mov eax, dword [edi + 0x14]
movzx eax, word [esi + eax*2 - 2]
mov word [esp + 0x12], ax
mov eax, dword [ebp + 8]
test eax, eax
jle 0x10022a42
mov eax, dword [ebp + 8]
pxor xmm4, xmm4
mov dword [ebp + 0xc], edi
pxor xmm7, xmm7
mov dword [esp + 0x30], 0
movupd xmm5, xmm7
sub eax, 1
cvtsi2sd xmm4, eax
movsd qword [esp + 0x1c], xmm4
movsd xmm4, qword [0x100476b8]
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp + 0xc]
pxor xmm0, xmm0
cvtsi2sd xmm0, dword [esp + 0x30]
mov eax, dword [eax]
mov ebx, dword [eax + 0x4c]
mulsd xmm0, xmm4
divsd xmm0, qword [esp + 0x1c]
test ebx, ebx
je 0x10022929
movzx eax, word [esi + ebx*2]
cmp word [esi], ax
jb 0x100229a0
xor eax, eax
test ebx, ebx
jle 0x10022929
mov dword [esp + 0x2c], ebx
jmp 0x10022871
pxor xmm1, xmm1
cvtsi2sd xmm1, ecx
comisd xmm0, xmm1
jb 0x10022864
pxor xmm1, xmm1
cvtsi2sd xmm1, edx
comisd xmm1, xmm0
jae 0x1002289e
add eax, 1
cmp eax, dword [esp + 0x2c]
je 0x10022929
movzx ecx, word [esi + eax*2]
movzx edx, word [esi + eax*2 + 2]
mov ebx, ecx
mov edi, edx
cmp ecx, edx
jle 0x10022848
pxor xmm1, xmm1
cvtsi2sd xmm1, edx
comisd xmm0, xmm1
jb 0x10022864
pxor xmm1, xmm1
cvtsi2sd xmm1, ecx
comisd xmm1, xmm0
jb 0x10022864
pxor xmm3, xmm3
pxor xmm6, xmm6
pxor xmm1, xmm1
mov word [esp + 0x26], bx
cvtsi2sd xmm3, eax
add eax, 1
mov ebx, dword [ebp + 0xc]
pxor xmm2, xmm2
cvtsi2sd xmm6, ecx
cvtsi2sd xmm1, eax
mov esi, dword [ebx + 0x14]
mulsd xmm3, xmm4
mov dword [esp + 0x2c], esi
movsd qword [esp + 0x14], xmm6
pxor xmm6, xmm6
mulsd xmm1, xmm4
cvtsi2sd xmm6, edx
lea edx, [esi + 0x7fffffff]
cvtsi2sd xmm2, edx
addsd xmm2, qword [0x100476e8]
divsd xmm3, xmm2
divsd xmm1, xmm2
cmp word [esp + 0x26], di
je 0x10022a50
movupd xmm5, xmm1
movupd xmm2, xmm6
subsd xmm2, qword [esp + 0x14]
subsd xmm5, xmm3
movupd xmm7, xmm1
divsd xmm5, xmm2
mulsd xmm6, xmm5
subsd xmm7, xmm6
mulsd xmm0, xmm5
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
pxor xmm3, xmm3
mov eax, dword [eax + 0x18]
lea edx, [eax + edi*2]
xor eax, eax
addsd xmm0, xmm7
addsd xmm0, qword [0x100476a0]
comisd xmm3, xmm0
jae 0x10022979
comisd xmm0, xmm4
mov eax, 0xffffffff
jae 0x10022979
subsd xmm0, qword [0x100476c0]
addsd xmm0, qword [0x100476c8]
movd eax, xmm0
sar eax, 0x10
add ax, 0x7fff
mov word [edx], ax
add dword [esp + 0x30], 1
mov eax, dword [esp + 0x30]
cmp eax, dword [ebp + 8]
je 0x10022a42
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 0x18]
jmp 0x10022800
mov eax, ebx
sub eax, 1
jns 0x100229dc
jmp 0x10022929
pxor xmm1, xmm1
cvtsi2sd xmm1, ecx
comisd xmm0, xmm1
jb 0x100229d0
pxor xmm1, xmm1
cvtsi2sd xmm1, edx
comisd xmm1, xmm0
jae 0x1002289e
sub eax, 1
cmp eax, 0xffffffff
je 0x10022929
movzx ecx, word [esi + eax*2]
movzx edx, word [esi + eax*2 + 2]
mov ebx, ecx
mov edi, edx
cmp ecx, edx
jle 0x100229b0
pxor xmm1, xmm1
cvtsi2sd xmm1, edx
comisd xmm0, xmm1
jb 0x100229d0
pxor xmm1, xmm1
cvtsi2sd xmm1, ecx
comisd xmm1, xmm0
jb 0x100229d0
jmp 0x1002289e
xor ecx, ecx
call sym._GetParametricCurveByType
test eax, eax
je 0x10022ac0
mov eax, dword [edi + 8]
lea edx, [eax + 0x10]
mov dword [esp + 8], edx
mov eax, dword [eax + 8]
neg eax
mov dword [esp + 4], eax
mov eax, dword [edi]
mov eax, dword [eax]
mov dword [esp], eax
call sym._cmsBuildParametricToneCurve
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ebx, word [esp + 0x12]
cmp word [esp + 0x24], bx
ja 0x10022ab8
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
pxor xmm2, xmm2
addsd xmm1, qword [0x100476a0]
mov eax, dword [eax + 0x18]
lea edx, [eax + ebx*2]
xor eax, eax
comisd xmm2, xmm1
jae 0x10022979
comisd xmm1, xmm4
mov eax, 0xffffffff
jae 0x10022979
subsd xmm1, qword [0x100476c0]
addsd xmm1, qword [0x100476c8]
movd eax, xmm1
sar eax, 0x10
add ax, 0x7fff
jmp 0x10022979
movupd xmm1, xmm3
jmp 0x10022a5c
mov eax, dword [edi]
mov eax, dword [eax]
jmp 0x1002277f
mov dword [esp + 8], 0x42b
mov dword [esp + 4], str._home_runner_build_wine_wine_libs_lcms2_src_cmsgamma.c
mov dword [esp], str._InCurve_____void_0__
call dword [sym.imp.ucrtbase.dll__assert]
lea esi, [esi]
lea edi, [edi]