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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, ecx
mov ebx, edx
mov dword [esp + 0xc], ebx
mov ebp, 0x10
mov dword [esp + 0x28], esi
push edi
test esi, esi
je 0x1006b5d0
mov esi, dword [esi]
mov eax, ebp
lea edx, [esi + 0x130]
and edx, 0xf
sub eax, edx
neg edx
sbb edx, edx
and edx, eax
mov eax, dword [edx + esi + 0x140]
mov esi, ecx
mov dword [esp + 0x30], eax
jmp 0x1006b5d6
xor ecx, ecx
mov dword [esp + 0x30], ecx
test ebx, ebx
je 0x1006b5f8
mov edx, dword [ebx]
mov eax, ebp
lea ecx, [edx + 0x130]
and ecx, 0xf
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov edi, dword [ecx + edx + 0x140]
jmp 0x1006b5fa
xor edi, edi
xor eax, eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x48], eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x6c]
test eax, eax
cmovne ecx, eax
mov dword [esp + 0x34], ecx
test esi, esi
je 0x1006b66c
mov esi, dword [esi]
mov eax, ebp
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, ebp
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
mov eax, ebp
movzx ebx, word [ecx + esi + 0x16]
mov ecx, esi
imul ebx, dword [edx + esi + 0xc]
and ecx, 0xf
sub eax, ecx
add ebx, 7
shr ebx, 3
neg ecx
sbb ecx, ecx
and ecx, eax
mov ecx, dword [ecx + esi + 0xc]
mov esi, dword [esp + 0x2c]
jmp 0x1006b670
xor ebx, ebx
xor ecx, ecx
mov eax, ebx
xor edx, edx
div ecx
mov ebp, eax
mov ebx, ebp
mov dword [esp + 0x24], ebp
shr ebx, 1
mov dword [esp + 0x18], ebx
test esi, esi
je 0x1006b6b1
mov eax, dword [esi]
cmp dword [eax + 0x128], 0
je 0x1006b69f
mov eax, dword [eax + 0x12c]
mov dword [esp + 0x28], eax
jmp 0x1006b6b9
push esi
call sym.FreeImage.dll__FreeImage_GetLine_4
add eax, 3
and eax, 0xfffffffc
mov dword [esp + 0x28], eax
jmp 0x1006b6b9
mov dword [esp + 0x28], 0
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x1006b6ea
mov eax, dword [ecx]
cmp dword [eax + 0x128], 0
je 0x1006b6d8
mov eax, dword [eax + 0x12c]
mov dword [esp + 0x14], eax
jmp 0x1006b6f2
push ecx
call sym.FreeImage.dll__FreeImage_GetLine_4
add eax, 3
and eax, 0xfffffffc
mov dword [esp + 0x14], eax
jmp 0x1006b6f2
mov dword [esp + 0x14], 0
mov eax, ebp
imul eax, dword [esp + 0x5c]
push esi
mov dword [esp + 0x20], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
add eax, dword [esp + 0x1c]
push dword [esp + 0x10]
mov dword [esp + 0x30], eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov esi, eax
mov eax, dword [esp + 0x6c]
add esi, dword [esp + 0x1c]
test eax, eax
je 0x1006b75c
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x1006b74e
mov edi, dword [esp + 0x14]
mov ebx, ecx
push ebp
push eax
push esi
call fcn.1026e3e0
mov eax, dword [esp + 0x78]
add esp, 0xc
add esi, edi
sub ebx, 1
jne 0x1006b730
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
push ebp
push eax
lea eax, [esp + 0x48]
push eax
call fcn.1026e3e0
jmp 0x1006b798
mov eax, dword [esp + 0x60]
test eax, eax
jle 0x1006b78b
mov edi, dword [esp + 0x14]
mov ebx, eax
nop word [eax + eax]
push ebp
push 0
push esi
call fcn.1026e960
add esp, 0xc
add esi, edi
sub ebx, 1
jne 0x1006b770
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
push ebp
lea eax, [esp + 0x44]
push 0
push eax
call fcn.1026e960
mov eax, dword [esp + 0x3c]
add esp, 0xc
test eax, eax
je 0x1006b996
mov esi, dword [esp + 0x60]
movsd xmm2, qword [0x103f9488]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x5c], esi
nop
push ebp
mov edx, eax
lea ecx, [esp + 0x3c]
call fcn.1002f020
add esp, 4
test ebx, ebx
je 0x1006b82a
mov eax, dword [esp + 0x34]
lea ebp, [esp + 0x50]
mov esi, dword [esp + 0x18]
mov ebx, ecx
sub ebx, eax
mov edx, eax
sub ebp, eax
movzx ecx, word [edx]
movzx eax, word [ebx + edx]
sub eax, ecx
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [esp + 0x64]
addsd xmm1, xmm0
addsd xmm1, xmm2
cvttsd2si eax, xmm1
mov word [edx + ebp], ax
add edx, 2
sub esi, 1
jne 0x1006b7e7
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x5c]
test esi, esi
js 0x1006b969
cmp esi, edi
jge 0x1006b969
xor ecx, ecx
test ebx, ebx
je 0x1006b8b4
cmp ebx, 0x10
jb 0x1006b88f
mov eax, ebx
and eax, 0xfffffff0
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 0x1006b850
cmp ecx, ebx
jae 0x1006b8b4
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, ebx
jb 0x1006b8a0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1006b956
mov esi, dword [eax]
cmp dword [esi + 0x120], 0
je 0x1006b952
cmp dword [esi + 0x128], 0
je 0x1006b8e0
mov ebp, dword [esi + 0x12c]
jmp 0x1006b929
mov ebp, 0x10
lea edx, [esi + 0x130]
mov eax, ebp
lea ecx, [esi + 0x130]
and edx, 0xf
sub eax, edx
neg edx
sbb edx, edx
and ecx, 0xf
sub ebp, ecx
and edx, eax
mov eax, dword [esp + 0x10]
neg ecx
sbb ecx, ecx
and ecx, ebp
movzx ebp, word [ecx + esi + 0x146]
imul ebp, dword [edx + esi + 0x13c]
add ebp, 7
shr ebp, 3
add ebp, 3
and ebp, 0xfffffffc
push eax
call sym.FreeImage.dll__FreeImage_GetBits_4
mov esi, dword [esp + 0x5c]
movsd xmm2, qword [0x103f9488]
test eax, eax
je 0x1006b94c
mov ecx, esi
imul ecx, ebp
mov ebp, dword [esp + 0x24]
add ecx, eax
jmp 0x1006b958
mov ebp, dword [esp + 0x24]
jmp 0x1006b956
mov esi, dword [esp + 0x5c]
xor ecx, ecx
add ecx, dword [esp + 0x1c]
lea edx, [esp + 0x38]
push ebp
call fcn.1002f020
add esp, 4
push ebp
lea edx, [esp + 0x54]
lea ecx, [esp + 0x44]
call fcn.1002f020
mov eax, dword [esp + 0x30]
inc esi
add eax, dword [esp + 0x2c]
add esp, 4
sub dword [esp + 0x20], 1
mov dword [esp + 0x2c], eax
mov dword [esp + 0x5c], esi
jne 0x1006b7c0
mov ebx, dword [esp + 0x30]
add ebx, dword [esp + 0x60]
js 0x1006ba8d
cmp ebx, edi
jge 0x1006ba8d
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1006ba2a
mov edx, dword [eax]
cmp dword [edx + 0x120], 0
je 0x1006ba2a
cmp dword [edx + 0x128], 0
je 0x1006b9d0
mov esi, dword [edx + 0x12c]
jmp 0x1006ba19
mov esi, 0x10
lea ecx, [edx + 0x130]
mov eax, esi
and ecx, 0xf
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
lea eax, [edx + 0x130]
and eax, 0xf
sub esi, eax
neg eax
sbb eax, eax
and eax, esi
movzx esi, word [eax + edx + 0x146]
imul esi, dword [ecx + edx + 0x13c]
mov eax, dword [esp + 0x10]
add esi, 7
shr esi, 3
add esi, 3
and esi, 0xfffffffc
push eax
call sym.FreeImage.dll__FreeImage_GetBits_4
test eax, eax
je 0x1006ba2a
imul esi, ebx
add esi, eax
jmp 0x1006ba2c
xor esi, esi
add esi, dword [esp + 0x1c]
lea edx, [esp + 0x40]
push ebp
mov ecx, esi
call fcn.1002f020
mov eax, dword [esp + 0x70]
add esp, 4
inc ebx
test eax, eax
je 0x1006ba72
cmp ebx, edi
jge 0x1006ba8d
sub edi, ebx
nop
add esi, dword [esp + 0x14]
mov edx, eax
push ebp
mov ecx, esi
call fcn.1002f020
mov eax, dword [esp + 0x70]
add esp, 4
sub edi, 1
jne 0x1006ba50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
cmp ebx, edi
jge 0x1006ba8d
sub edi, ebx
add esi, dword [esp + 0x14]
push ebp
push 0
push esi
call fcn.1026e960
add esp, 0xc
sub edi, 1
jne 0x1006ba78
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret