Function at 0x53b3a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x18
push ebx
push esi
push edi
cmp eax, 1
jne 0x53b4c9
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x53b4c2
mov esi, dword [eax + 0x3c]
xor ecx, ecx
mov edx, dword [eax + 0x24]
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], ecx
movzx ebx, byte [esi + 8]
mov dword [ebp + 0x10], ebx
mov dword [ebp - 8], edx
test edx, edx
je 0x53b47d
mov ecx, dword [edx + 4]
xor esi, esi
mov eax, dword [edx + 0xc]
xor edi, edi
mov dword [ebp - 0x10], ecx
mov ecx, dword [edx + 8]
cmp ecx, eax
jg 0x53b469
sub eax, ecx
inc eax
cmp eax, 2
jl 0x53b435
mov eax, dword [edx + 0xc]
mov ebx, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov ebx, dword [eax + ebx*4]
movzx eax, byte [ebx + ecx]
sub eax, dword [ebp + 0x10]
imul eax, eax
add esi, eax
movzx eax, byte [ebx + ecx + 1]
sub eax, dword [ebp + 0x10]
add ecx, 2
imul eax, eax
add edi, eax
cmp ecx, edx
jle 0x53b412
mov edx, dword [ebp - 8]
cmp ecx, dword [edx + 0xc]
jg 0x53b45c
mov eax, dword [edx + 4]
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + eax*4]
movzx eax, byte [eax + ecx]
sub eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
imul eax, eax
add ecx, eax
lea eax, [edi + esi]
add ecx, eax
mov dword [ebp - 4], ecx
jmp 0x53b46c
mov ecx, dword [ebp - 4]
lea eax, [edi + esi]
add ecx, eax
mov dword [ebp - 4], ecx
jmp 0x53b46c
mov ecx, dword [ebp - 4]
mov edx, dword [edx + 0x10]
mov dword [ebp - 8], edx
test edx, edx
jne 0x53b3e3
mov esi, dword [ebp - 0x18]
mov eax, dword [esi]
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x872950]
mov eax, dword [ebp - 0xc]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [esi + 0xc], xmm1
movss dword [esi + 0x10], xmm1
movss dword [esi + 0x14], xmm1
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x53b3c3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x53b5cf
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0xc], edx
test edx, edx
je 0x53b4c2
nop dword [eax]
mov ecx, dword [edx + 0x3c]
xor ebx, ebx
mov edx, dword [edx + 0x24]
xor esi, esi
mov dword [ebp - 8], ecx
mov dword [ebp + 0x10], esi
movzx eax, byte [ecx + 8]
mov dword [ebp - 0x18], eax
movzx eax, byte [ecx + 9]
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 0xa]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
test edx, edx
je 0x53b56c
nop dword [eax]
mov eax, dword [edx + 8]
lea ecx, [eax + eax*2]
mov eax, dword [edx + 0xc]
inc eax
lea edi, [eax + eax*2]
cmp ecx, edi
jge 0x53b55f
mov eax, dword [edx + 4]
mov esi, dword [ebp + 8]
mov esi, dword [esi + eax*4]
nop word [eax + eax]
movzx eax, byte [esi + ecx]
sub eax, dword [ebp - 0x18]
imul eax, eax
add dword [ebp - 4], eax
movzx eax, byte [esi + ecx + 1]
sub eax, dword [ebp - 0x14]
imul eax, eax
add dword [ebp + 0x10], eax
movzx eax, byte [esi + ecx + 2]
add ecx, 3
sub eax, dword [ebp - 0x10]
imul eax, eax
add ebx, eax
cmp ecx, edi
jl 0x53b530
mov edx, dword [edx + 0x10]
test edx, edx
jne 0x53b510
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
mov eax, dword [ecx]
mov edx, dword [ebp - 0xc]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x872950]
cvtpd2ps xmm1, xmm0
movd xmm0, dword [ebp - 4]
cvtdq2ps xmm0, xmm0
divss xmm0, xmm1
movss dword [ecx + 0xc], xmm0
movd xmm0, esi
cvtdq2ps xmm0, xmm0
divss xmm0, xmm1
movss dword [ecx + 0x10], xmm0
movd xmm0, ebx
cvtdq2ps xmm0, xmm0
divss xmm0, xmm1
movss dword [ecx + 0x14], xmm0
mov edx, dword [edx + 0x2c]
mov dword [ebp - 0xc], edx
test edx, edx
jne 0x53b4e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Error:_Image2D_CcAverageColor_unsupported__of_planes__n
push 2
call fcn.005ceceb
add esp, 4
push eax
call fcn.0046a51b
add esp, 8
push 0xffffffffffffffff
call fcn.005c45cb
int3