Function at 0x53b140
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x34
push ebx
push esi
push edi
cmp eax, 1
jne 0x53b278
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
test edi, edi
je 0x53b271
mov eax, dword [edi + 0x24]
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x53b24c
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
mov edx, dword [eax + 0xc]
xorps xmm0, xmm0
mov ecx, dword [eax + 8]
mov esi, dword [eax + 4]
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], esi
cmp ecx, edx
jg 0x53b238
mov ebx, dword [ebp - 0x28]
mov eax, edx
mov edi, dword [ebp - 0x34]
sub eax, ecx
inc eax
cmp eax, 2
jl 0x53b1f9
lea eax, [edx - 1]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + esi*4]
mov eax, dword [ebp - 0x2c]
inc edx
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x14], edx
mov dword [ebp + 0x10], eax
movzx eax, byte [edx + ecx - 1]
cdq
add dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x14]
adc ebx, edx
movzx eax, byte [eax + ecx]
cdq
add edi, eax
adc esi, edx
mov edx, dword [ebp - 0x14]
add ecx, 2
cmp ecx, dword [ebp - 0x18]
jle 0x53b1d2
mov edx, dword [ebp - 0x1c]
jmp 0x53b202
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
mov dword [ebp + 0x10], eax
cmp ecx, edx
jg 0x53b21e
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov eax, dword [edx + eax*4]
movzx eax, byte [eax + ecx]
mov ecx, dword [ebp - 8]
cdq
add dword [ebp - 4], eax
adc ecx, edx
jmp 0x53b221
mov ecx, dword [ebp - 8]
add edi, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
adc esi, ebx
mov ebx, dword [ebp - 4]
add ebx, edi
mov dword [ebp - 4], ebx
adc ecx, esi
mov dword [ebp - 8], ecx
jmp 0x53b23b
mov ecx, dword [ebp - 8]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x53b185
mov edi, dword [ebp - 0xc]
mov esi, dword [edi + 0x3c]
push 0
push dword [esi]
push ecx
push ebx
call fcn.0054f350
mov byte [esi + 8], al
mov byte [esi + 9], al
mov byte [esi + 0xa], al
mov edi, dword [edi + 0x2c]
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x53b163
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x53b37d
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x53b271
nop dword [eax + eax]
mov edi, dword [eax + 0x24]
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
mov eax, dword [ebp - 0x20]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x24]
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x28]
movlpd qword [ebp - 0x34], xmm0
mov ebx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0xc], eax
test edi, edi
je 0x53b32c
mov dword [ebp - 0x10], edx
nop dword [eax]
mov eax, dword [edi + 8]
lea ecx, [eax + eax*2]
mov eax, dword [edi + 0xc]
inc eax
lea eax, [eax + eax*2]
mov dword [ebp - 0x20], eax
cmp ecx, eax
jge 0x53b31f
mov eax, dword [edi + 4]
mov edx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov esi, dword [edx + eax*4]
movzx eax, byte [esi + ecx]
cdq
add dword [ebp - 0x10], eax
movzx eax, byte [esi + ecx + 1]
adc ebx, edx
cdq
add dword [ebp - 8], eax
movzx eax, byte [esi + ecx + 2]
adc edi, edx
cdq
add dword [ebp - 0xc], eax
adc dword [ebp - 4], edx
add ecx, 3
cmp ecx, dword [ebp - 0x20]
jl 0x53b2f0
mov dword [ebp + 0x10], edi
mov edi, dword [ebp - 0x18]
mov edi, dword [edi + 0x10]
mov dword [ebp - 0x18], edi
test edi, edi
jne 0x53b2d0
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
push 0
mov edi, dword [edi + 0x3c]
mov esi, dword [edi]
push esi
push ebx
push edx
call fcn.0054f350
push 0
push esi
mov byte [edi + 8], al
mov eax, dword [ebp + 0x10]
push eax
push dword [ebp - 8]
call fcn.0054f350
push 0
push esi
mov byte [edi + 9], al
mov eax, dword [ebp - 4]
push eax
push dword [ebp - 0xc]
call fcn.0054f350
mov byte [edi + 0xa], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x53b290
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