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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0xb4
mov eax, dword [ebp + 8]
push ebx
xor ecx, ecx
push esi
or edx, 0xffffffff
cmp eax, ecx
push edi
mov edi, dword [ebp + 0x10]
mov ebx, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], edx
je 0x100aec11
mov edx, dword [eax]
and edx, 0xffff0000
cmp edx, 0x42420000
jne 0x100aec11
cmp dword [eax + 0x10], ecx
jne 0x100aec4d
push ecx
push ecx
lea ecx, [esp + 0x90]
push ecx
push eax
call sym.cxcore099.dll_cvGetMat
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x5c], ebx
call sym.cxcore099.dll_cvGetErrStatus
test eax, eax
jge 0x100aec4b
push 0x42
push str..cxutils.cpp
push str.Inner_function_failed.
push str.cvKMeans2
push 0xffffffffffffffff
jmp 0x100af47b
xor ecx, ecx
cmp edi, ecx
je 0x100aec66
mov edx, dword [edi]
and edx, 0xffff0000
cmp edx, 0x42420000
jne 0x100aec66
cmp dword [edi + 0x10], ecx
jne 0x100aec8c
push ecx
push ecx
lea eax, [esp + 0xac]
push eax
push edi
call sym.cxcore099.dll_cvGetMat
mov edi, eax
add esp, 0x10
mov dword [esp + 0x4c], edi
call sym.cxcore099.dll_cvGetErrStatus
test eax, eax
jge 0x100aec8c
push 0x45
jmp 0x100aec35
mov esi, dword [ebp + 0xc]
cmp esi, 1
jge 0x100aecaf
push 0x48
push str..cxutils.cpp
push str.Number_of_clusters_should_be_positive
push str.cvKMeans2
push 0xffffff2d
jmp 0x100af47b
mov ecx, dword [ebx]
and ecx, 7
cmp cl, 5
jne 0x100af465
mov ecx, dword [edi]
mov edx, ecx
and edx, 0x1ff
cmp edx, 4
jne 0x100af465
mov eax, dword [edi + 0x14]
cmp eax, 1
je 0x100aece6
cmp dword [edi + 0x18], 1
jne 0x100aecf2
test ecx, 0x4000
je 0x100aecf2
mov ecx, dword [edi + 0x18]
lea edx, [ecx + eax - 1]
cmp edx, dword [ebx + 0x14]
je 0x100aed0d
push 0x51
push str..cxutils.cpp
push 0x100d0ec8
push str.cvKMeans2
push 0xffffff2f
jmp 0x100af47b
fld qword [0x100d0ec0]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
push 0x64
sub esp, 0x18
mov eax, esp
fstp qword [esp + 0x10]
mov dword [eax], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [eax + 4], edx
mov edx, dword [ebp + 0x20]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
lea eax, [esp + 0x94]
push eax
call sym.cxcore099.dll_cvCheckTermCriteria
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
mov ecx, dword [eax + 8]
mov dword [ebp + 0x18], edx
mov edx, dword [eax + 0xc]
add esp, 0x20
mov dword [ebp + 0x1c], ecx
mov dword [ebp + 0x20], edx
call sym.cxcore099.dll_cvGetErrStatus
test eax, eax
jge 0x100aed6c
push 0x53
jmp 0x100aec35
fld qword [ebp + 0x1c]
mov eax, dword [ebx + 0x14]
cmp esi, eax
fmul st(0), st(0)
mov dword [esp + 0x3c], eax
fstp qword [ebp + 0x1c]
jle 0x100aed82
mov dword [ebp + 0xc], eax
mov esi, dword [ebx]
mov eax, dword [edi + 4]
sar esi, 3
and esi, 0x3f
add esi, 1
imul esi, dword [ebx + 0x18]
test eax, eax
mov dword [esp + 0x30], esi
je 0x100aedab
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x70], eax
jmp 0x100aedb3
mov dword [esp + 0x70], 1
mov ebx, dword [ebp + 0xc]
push 6
push esi
push ebx
call sym.cxcore099.dll_cvCreateMat
add esp, 0xc
mov dword [esp + 0x38], eax
call sym.cxcore099.dll_cvGetErrStatus
test eax, eax
jge 0x100aedd6
push 0x5e
jmp 0x100aec35
push 6
push esi
push ebx
call sym.cxcore099.dll_cvCreateMat
add esp, 0xc
mov dword [esp + 0x50], eax
call sym.cxcore099.dll_cvGetErrStatus
test eax, eax
jge 0x100aedf6
push 0x5f
jmp 0x100aec35
push 4
push ebx
push 1
call sym.cxcore099.dll_cvCreateMat
add esp, 0xc
mov dword [esp + 0x34], eax
call sym.cxcore099.dll_cvGetErrStatus
test eax, eax
jge 0x100aee17
push 0x60
jmp 0x100aec35
xor esi, esi
cmp dword [esp + 0x3c], esi
jle 0x100aee41
nop
lea eax, [esp + 0x60]
push eax
call fcn.100aeba0
xor edx, edx
div ebx
mov ecx, dword [edi + 0x10]
add esi, 1
add esp, 4
cmp esi, dword [esp + 0x3c]
mov dword [ecx + esi*4 - 4], edx
jl 0x100aee20
cmp dword [ebp + 0x18], 0
fld qword [ebp + 0x1c]
mov edx, dword [esp + 0x34]
fadd st(0), st(0)
mov dword [edx + 0x18], ebx
mov dword [esp + 0x54], 0
fstp qword [esp + 0x78]
jle 0x100af3a4
mov ecx, dword [esp + 0x38]
push ecx
call sym.cxcore099.dll_cvSetZero
mov eax, dword [esp + 0x38]
push eax
call sym.cxcore099.dll_cvSetZero
add esp, 8
cmp dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
jle 0x100aefc5
mov dword [esp + 0x44], 0
jmp 0x100aeea0
mov eax, dword [esp + 0x5c]
mov ebx, dword [eax + 4]
imul ebx, dword [esp + 0x40]
add ebx, dword [eax + 0x10]
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx + 0x10]
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + edx]
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 4]
mov edi, dword [esp + 0x30]
imul edx, ecx
add edx, dword [eax + 0x10]
mov dword [esp + 0x2c], ecx
xor ecx, ecx
add edi, 0xfffffffc
js 0x100aef1f
add edi, 4
shr edi, 2
lea eax, [edx + 0x10]
lea esi, [ebx + 0xc]
lea ecx, [edi*4]
lea esp, [esp]
fld dword [esi - 8]
add esi, 0x10
fadd qword [eax - 8]
add eax, 0x20
sub edi, 1
fld dword [esi - 0x1c]
fadd qword [eax - 0x30]
fstp qword [eax - 0x30]
fstp qword [eax - 0x28]
fld dword [esi - 0x10]
fadd qword [eax - 0x18]
fld dword [esi - 0x14]
fadd qword [eax - 0x20]
fstp qword [eax - 0x20]
fstp qword [eax - 0x18]
jne 0x100aeef0
mov eax, dword [esp + 0x30]
sub eax, ecx
cmp eax, 4
jl 0x100aef73
mov esi, dword [esp + 0x30]
sub esi, ecx
sub esi, 4
shr esi, 2
add esi, 1
lea eax, [edx + ecx*8 + 0x10]
lea edi, [ebx + ecx*4 + 8]
lea ecx, [ecx + esi*4]
fld dword [edi - 8]
add edi, 0x10
fadd qword [eax - 0x10]
add eax, 0x20
sub esi, 1
fstp qword [eax - 0x30]
fld dword [edi - 0x14]
fadd qword [eax - 0x28]
fstp qword [eax - 0x28]
fld dword [edi - 0x10]
fadd qword [eax - 0x20]
fstp qword [eax - 0x20]
fld dword [edi - 0xc]
fadd qword [eax - 0x18]
fstp qword [eax - 0x18]
jne 0x100aef44
mov eax, dword [esp + 0x30]
cmp ecx, eax
jge 0x100aef92
jmp 0x100aef80
fld dword [ebx + ecx*4]
add ecx, 1
cmp ecx, eax
fadd qword [edx + ecx*8 - 8]
fstp qword [edx + ecx*8 - 8]
jl 0x100aef80
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x10]
mov eax, dword [esp + 0x2c]
add dword [edx + eax*4], 1
mov ecx, dword [esp + 0x70]
lea eax, [edx + eax*4]
mov eax, dword [esp + 0x40]
add ecx, ecx
add ecx, ecx
add dword [esp + 0x44], ecx
add eax, 1
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
jl 0x100aeea0
cmp dword [esp + 0x54], 0
fldz
jle 0x100aefd6
fld st(0)
fst qword [esp + 0x78]
jmp 0x100aefda
fld qword [esp + 0x78]
cmp dword [ebp + 0xc], 0
mov dword [esp + 0x2c], 0
jle 0x100af1d6
fld1
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
mov esi, dword [eax + 4]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
imul esi, ecx
add esi, dword [eax + 0x10]
mov eax, dword [edx + 0x10]
mov eax, dword [eax + ecx*4]
test eax, eax
mov dword [esp + 0x48], eax
je 0x100af12f
fild dword [esp + 0x48]
xor ecx, ecx
cmp edi, 4
fdivr st(1)
jl 0x100af061
lea edx, [edi - 4]
shr edx, 2
add edx, 1
lea eax, [esi + 0x10]
lea ecx, [edx*4]
fld qword [eax - 0x10]
add eax, 0x20
sub edx, 1
fmul st(1)
fstp qword [eax - 0x30]
fld st(0)
fmul qword [eax - 0x28]
fstp qword [eax - 0x28]
fld qword [eax - 0x20]
fmul st(1)
fstp qword [eax - 0x20]
fld qword [eax - 0x18]
fmul st(1)
fstp qword [eax - 0x18]
jne 0x100af039
cmp ecx, edi
jge 0x100af075
fld qword [esi + ecx*8]
add ecx, 1
cmp ecx, edi
fmul st(1)
fstp qword [esi + ecx*8 - 8]
jl 0x100af065
fstp st(0)
cmp dword [esp + 0x54], 0
jle 0x100af1bc
mov eax, dword [esp + 0x50]
fld st(2)
mov ecx, dword [eax + 4]
imul ecx, dword [esp + 0x2c]
add ecx, dword [eax + 0x10]
xor edx, edx
cmp edi, 4
jl 0x100af0fc
add edi, 0xfffffffc
mov ebx, esi
sub ebx, ecx
shr edi, 2
mov dword [esp + 0x48], ebx
add edi, 1
lea ebx, [edi*4]
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x48]
lea edx, [esi + 0x18]
lea eax, [ecx + 8]
fld qword [edx - 0x18]
add eax, 0x20
fsub qword [eax - 0x28]
add edx, 0x20
sub edi, 1
fmul st(0), st(0)
faddp st(1)
fld qword [ebx + eax - 0x20]
fsub qword [eax - 0x20]
fmul st(0), st(0)
faddp st(1)
fld qword [edx - 0x28]
fsub qword [eax - 0x18]
fmul st(0), st(0)
faddp st(1)
fld qword [edx - 0x20]
fsub qword [eax - 0x10]
fmul st(0), st(0)
faddp st(1)
jne 0x100af0c0
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x58]
cmp edx, edi
jge 0x100af11b
lea eax, [ecx + edx*8]
sub esi, ecx
mov ecx, edi
sub ecx, edx
fld qword [eax + esi]
add eax, 8
sub ecx, 1
fsub qword [eax - 8]
fmul st(0), st(0)
faddp st(1)
jne 0x100af109
fcom st(2)
fnstsw ax
test ah, 0x41
jne 0x100af1ba
fstp st(2)
jmp 0x100af1bc
mov eax, dword [esp + 0x60]
mov ecx, 0x5ca1ebe2
mul ecx
xor ecx, ecx
add eax, dword [esp + 0x64]
adc edx, ecx
mov dword [esp + 0x64], edx
xor edx, edx
mov dword [esp + 0x60], eax
div dword [esp + 0x3c]
mov eax, dword [esp + 0x5c]
xor ebx, ebx
imul edx, dword [eax + 4]
add edx, dword [eax + 0x10]
cmp edi, 4
jl 0x100af19f
add edi, 0xfffffffc
shr edi, 2
add edi, 1
lea ecx, [esi + 0x10]
lea eax, [edx + 8]
lea ebx, [edi*4]
fld dword [eax - 8]
add eax, 0x10
fstp qword [ecx - 0x10]
add ecx, 0x20
sub edi, 1
fld dword [eax - 0x14]
fstp qword [ecx - 0x28]
fld dword [eax - 0x10]
fstp qword [ecx - 0x20]
fld dword [eax - 0xc]
fstp qword [ecx - 0x18]
jne 0x100af178
mov edi, dword [esp + 0x30]
cmp ebx, edi
jge 0x100af077
fld dword [edx + ebx*4]
add ebx, 1
cmp ebx, edi
fstp qword [esi + ebx*8 - 8]
jl 0x100af1a7
jmp 0x100af077
fstp st(0)
mov eax, dword [esp + 0x2c]
add eax, 1
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x2c], eax
jl 0x100aeff2
fstp st(0)
fst qword [esp + 0x78]
cmp dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
jle 0x100af374
mov edx, dword [esp + 0x70]
fld qword [0x100b7f90]
lea eax, [edx*4]
mov dword [esp + 0x48], 0
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x5c]
fld st(0)
mov edi, dword [eax + 4]
imul edi, dword [esp + 0x40]
add edi, dword [eax + 0x10]
mov ecx, dword [esp + 0x38]
xor eax, eax
cmp dword [ebp + 0xc], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x2c], eax
jle 0x100af341
mov eax, dword [ecx + 0x10]
mov ecx, dword [ecx + 4]
mov ebx, eax
add eax, 0x10
mov dword [esp + 0x74], ecx
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x30]
fld st(3)
xor eax, eax
add ecx, 0xfffffffc
js 0x100af29a
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x44]
shr esi, 2
lea edx, [edi + 8]
lea eax, [esi*4]
fld dword [edx - 8]
add ecx, 0x20
fsubr qword [ecx - 0x30]
add edx, 0x10
sub esi, 1
fld dword [edx - 0x14]
fsubr qword [ecx - 0x28]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
faddp st(1)
fld dword [edx - 0x10]
fsubr qword [ecx - 0x20]
fld dword [edx - 0xc]
fsubr qword [ecx - 0x18]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
faddp st(1)
jne 0x100af263
mov edx, dword [esp + 0x30]
sub edx, eax
cmp edx, 4
jl 0x100af2f2
mov ecx, dword [esp + 0x30]
sub ecx, eax
sub ecx, 4
shr ecx, 2
add ecx, 1
lea esi, [edi + eax*4 + 8]
lea edx, [ebx + eax*8 + 0x10]
lea eax, [eax + ecx*4]
fld dword [esi - 8]
add edx, 0x20
fsubr qword [edx - 0x30]
add esi, 0x10
sub ecx, 1
fmul st(0), st(0)
faddp st(1)
fld dword [esi - 0x14]
fsubr qword [edx - 0x28]
fmul st(0), st(0)
faddp st(1)
fld dword [esi - 0x10]
fsubr qword [edx - 0x20]
fmul st(0), st(0)
faddp st(1)
fld dword [esi - 0xc]
fsubr qword [edx - 0x18]
fmul st(0), st(0)
faddp st(1)
jne 0x100af2bf
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jge 0x100af30c
fld dword [edi + eax*4]
add eax, 1
cmp eax, ecx
fsubr qword [ebx + eax*8 - 8]
fmul st(0), st(0)
faddp st(1)
jl 0x100af2fa
fcom st(1)
fnstsw ax
test ah, 5
jp 0x100af321
mov eax, dword [esp + 0x2c]
fstp st(1)
mov dword [esp + 0x58], eax
jmp 0x100af323
fstp st(0)
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x74]
add dword [esp + 0x44], eax
add ecx, 1
add ebx, eax
cmp ecx, dword [ebp + 0xc]
mov dword [esp + 0x2c], ecx
jl 0x100af241
mov ecx, dword [esp + 0x4c]
fstp st(0)
mov edx, dword [ecx + 0x10]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x58]
mov dword [eax + edx], ecx
mov ecx, dword [esp + 0x40]
add eax, dword [esp + 0x6c]
add ecx, 1
cmp ecx, dword [esp + 0x3c]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], eax
jl 0x100af206
fstp st(0)
fstp st(1)
fcomp qword [ebp + 0x1c]
fnstsw ax
test ah, 5
jnp 0x100af3a4
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x54]
add eax, 1
cmp eax, dword [ebp + 0x18]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x54], eax
jl 0x100aee67
mov edx, dword [esp + 0x34]
push edx
call sym.cxcore099.dll_cvSetZero
mov edx, dword [esp + 0x40]
add esp, 4
xor eax, eax
test edx, edx
jle 0x100af3df
jmp 0x100af3c0
mov ecx, dword [esp + 0x4c]
mov ecx, dword [ecx + 0x10]
mov esi, dword [esp + 0x34]
mov ecx, dword [ecx + eax*4]
mov esi, dword [esi + 0x10]
add dword [esi + ecx*4], 1
lea ecx, [esi + ecx*4]
add eax, 1
cmp eax, edx
jl 0x100af3c0
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
mov dword [esp + 0x2c], ebx
jle 0x100af483
mov ecx, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x10]
cmp dword [eax + ebx*4], 0
mov dword [esp + 0x6c], eax
jne 0x100af457
mov eax, dword [esp + 0x4c]
mov edi, dword [eax + 0x10]
mov eax, ecx
mov ecx, 0x5ca1ebe2
mul ecx
xor ecx, ecx
add eax, esi
adc edx, ecx
mov esi, edx
xor edx, edx
mov ecx, eax
div dword [esp + 0x3c]
mov ebx, dword [esp + 0x6c]
mov eax, dword [edi + edx*4]
cmp dword [ebx + eax*4], 1
jle 0x100af40e
mov ebx, dword [esp + 0x2c]
mov dword [edi + edx*4], ebx
mov edx, dword [esp + 0x34]
mov edx, dword [edx + 0x10]
add dword [edx + eax*4], 0xffffffff
lea eax, [edx + eax*4]
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 0x10]
add dword [edx + ebx*4], 1
lea eax, [edx + ebx*4]
add ebx, 1
cmp ebx, dword [ebp + 0xc]
mov dword [esp + 0x2c], ebx
jl 0x100af3f6
jmp 0x100af483
push 0x4c
push str..cxutils.cpp
push str.samples_should_be_floating_point_matrix__cluster_idx___integer_vector
push str.cvKMeans2
push 0xffffff2e
call sym.cxcore099.dll_cvError
add esp, 0x14
lea eax, [esp + 0x38]
push eax
call sym.cxcore099.dll_cvReleaseMat
lea ecx, [esp + 0x54]
push ecx
call sym.cxcore099.dll_cvReleaseMat
lea edx, [esp + 0x3c]
push edx
call sym.cxcore099.dll_cvReleaseMat
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret