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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
mov ebx, ecx
mov ebp, edx
mov dword [esp + 0x24], ebp
push edi
mov edi, 0x10
test ebx, ebx
je 0x1006a83a
mov esi, dword [ebx]
mov eax, edi
lea edx, [esi + 0x130]
and edx, 0xf
sub eax, edx
neg edx
sbb edx, edx
and edx, eax
mov eax, dword [edx + esi + 0x13c]
mov dword [esp + 0x1c], eax
jmp 0x1006a842
mov dword [esp + 0x1c], 0
test ebp, ebp
je 0x1006a869
mov edx, dword [ebp]
mov eax, edi
lea ecx, [edx + 0x130]
and ecx, 0xf
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov ecx, dword [ecx + edx + 0x13c]
mov dword [esp + 0x14], ecx
jmp 0x1006a871
mov dword [esp + 0x14], 0
xor eax, eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x6c]
test eax, eax
cmovne ecx, eax
mov dword [esp + 0x2c], ecx
test ebx, ebx
je 0x1006a8d9
mov esi, dword [ebx]
mov eax, edi
add esi, 0x130
mov edx, esi
mov ecx, esi
and edx, 0xf
sub eax, edx
neg edx
sbb edx, edx
and ecx, 0xf
and edx, eax
mov eax, edi
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, esi
and eax, 0xf
sub edi, eax
movzx ecx, word [ecx + esi + 0x16]
imul ecx, dword [edx + esi + 0xc]
add ecx, 7
shr ecx, 3
neg eax
sbb eax, eax
and eax, edi
mov esi, dword [eax + esi + 0xc]
jmp 0x1006a8dd
xor ecx, ecx
xor esi, esi
xor edx, edx
mov eax, ecx
div esi
mov edi, eax
mov esi, edi
mov dword [esp + 0x34], edi
shr esi, 1
test ebx, ebx
je 0x1006a930
mov ebp, dword [ebx]
cmp dword [ebp + 0x120], 0
je 0x1006a930
cmp dword [ebp + 0x128], 0
je 0x1006a90d
mov ebp, dword [ebp + 0x12c]
jmp 0x1006a919
push ebx
call sym.FreeImage.dll__FreeImage_GetLine_4
lea ebp, [eax + 3]
and ebp, 0xfffffffc
push ebx
call sym.FreeImage.dll__FreeImage_GetBits_4
test eax, eax
je 0x1006a930
imul ebp, dword [esp + 0x5c]
add ebp, eax
mov dword [esp + 0x10], ebp
jmp 0x1006a936
xor eax, eax
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x1006a97a
mov eax, dword [ebp]
cmp dword [eax + 0x120], 0
je 0x1006a97a
cmp dword [eax + 0x128], 0
je 0x1006a95b
mov ebx, dword [eax + 0x12c]
jmp 0x1006a967
push ebp
call sym.FreeImage.dll__FreeImage_GetLine_4
lea ebx, [eax + 3]
and ebx, 0xfffffffc
push ebp
call sym.FreeImage.dll__FreeImage_GetBits_4
test eax, eax
je 0x1006a97a
imul ebx, dword [esp + 0x5c]
add ebx, eax
jmp 0x1006a97c
xor ebx, ebx
mov eax, dword [esp + 0x6c]
mov ebp, dword [esp + 0x60]
mov dword [esp + 0x18], ebx
test eax, eax
je 0x1006a9bb
test ebp, ebp
jle 0x1006a9aa
push edi
push eax
push ebx
call fcn.1026e3e0
mov eax, dword [esp + 0x78]
add esp, 0xc
add ebx, edi
sub ebp, 1
jne 0x1006a990
mov ebp, dword [esp + 0x60]
push edi
mov edx, eax
lea ecx, [esp + 0x44]
call fcn.1002f020
add esp, 4
jmp 0x1006a9e0
test ebp, ebp
jle 0x1006a9d0
mov eax, edi
imul eax, ebp
push eax
push 0
push ebx
call fcn.1026e960
add esp, 0xc
push edi
lea eax, [esp + 0x44]
push 0
push eax
call fcn.1026e960
add esp, 0xc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1006ab49
movsd xmm2, qword [esp + 0x64]
movsd xmm3, qword [0x103f9488]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], eax
push edi
mov edx, ebx
lea ecx, [esp + 0x3c]
call fcn.1002f020
add esp, 4
test esi, esi
je 0x1006aa71
mov ecx, dword [esp + 0x2c]
lea ebp, [esp + 0x38]
lea eax, [esp + 0x50]
sub ebp, ecx
sub eax, ecx
mov edx, ecx
mov ebx, esi
mov edi, eax
nop
movzx ecx, word [edx]
movzx eax, word [edx + ebp]
sub eax, ecx
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, xmm2
addsd xmm1, xmm0
addsd xmm1, xmm3
cvttsd2si eax, xmm1
mov word [edi + edx], ax
add edx, 2
sub ebx, 1
jne 0x1006aa30
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x20]
test ebp, ebp
js 0x1006ab1a
cmp ebp, dword [esp + 0x14]
jge 0x1006ab1a
xor ecx, ecx
test esi, esi
je 0x1006ab04
cmp esi, 0x10
jb 0x1006aadf
mov eax, esi
and eax, 0xfffffff0
nop dword [eax]
nop word [eax + eax]
movups xmm1, xmmword [esp + ecx*2 + 0x38]
movups xmm0, xmmword [esp + ecx*2 + 0x50]
psubw xmm1, xmm0
movups xmm0, xmmword [esp + ecx*2 + 0x40]
paddw xmm1, xmm0
movups xmm0, xmmword [esp + ecx*2 + 0x60]
movups xmmword [esp + ecx*2 + 0x38], xmm1
movups xmm1, xmmword [esp + ecx*2 + 0x48]
psubw xmm1, xmm0
movups xmm0, xmmword [esp + ecx*2 + 0x50]
paddw xmm1, xmm0
movups xmmword [esp + ecx*2 + 0x48], xmm1
add ecx, 0x10
cmp ecx, eax
jb 0x1006aaa0
cmp ecx, esi
jae 0x1006ab04
nop dword [eax]
nop word [eax + eax]
mov ax, word [esp + ecx*2 + 0x40]
sub ax, word [esp + ecx*2 + 0x50]
add word [esp + ecx*2 + 0x38], ax
inc ecx
cmp ecx, esi
jb 0x1006aaf0
mov ecx, ebp
lea edx, [esp + 0x38]
imul ecx, edi
push edi
add ecx, dword [esp + 0x1c]
call fcn.1002f020
add esp, 4
push edi
lea edx, [esp + 0x54]
lea ecx, [esp + 0x44]
call fcn.1002f020
add ebx, edi
inc ebp
add esp, 4
mov dword [esp + 0x10], ebx
sub dword [esp + 0x24], 1
mov dword [esp + 0x20], ebp
jne 0x1006aa06
mov ebp, dword [esp + 0x60]
mov eax, dword [esp + 0x1c]
add ebp, eax
js 0x1006ac04
cmp ebp, dword [esp + 0x14]
jge 0x1006ac04
mov esi, dword [esp + 0x28]
test esi, esi
je 0x1006ab9e
mov ebx, dword [esi]
cmp dword [ebx + 0x120], 0
je 0x1006ab9e
cmp dword [ebx + 0x128], 0
je 0x1006ab7f
mov ebx, dword [ebx + 0x12c]
jmp 0x1006ab8b
push esi
call sym.FreeImage.dll__FreeImage_GetLine_4
lea ebx, [eax + 3]
and ebx, 0xfffffffc
push esi
call sym.FreeImage.dll__FreeImage_GetBits_4
test eax, eax
je 0x1006ab9e
imul ebx, dword [esp + 0x5c]
add ebx, eax
jmp 0x1006aba0
xor ebx, ebx
mov esi, ebp
lea edx, [esp + 0x40]
imul esi, edi
push edi
add esi, ebx
mov ecx, esi
call fcn.1002f020
mov eax, dword [esp + 0x70]
add esp, 4
add esi, edi
test eax, eax
je 0x1006abee
mov ebx, dword [esp + 0x14]
sub ebx, ebp
sub ebx, 1
je 0x1006ac04
nop dword [eax + eax]
push edi
push eax
push esi
call fcn.1026e3e0
mov eax, dword [esp + 0x78]
add esp, 0xc
add esi, edi
sub ebx, 1
jne 0x1006abd0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
mov eax, dword [esp + 0x14]
sub eax, ebp
dec eax
imul eax, edi
push eax
push 0
push esi
call fcn.1026e960
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret