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

Disassembly:
sub esp, 0x60
fldz
push ebx
fst dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x6c]
fst dword [esp + 0x10]
fld1
push esi
fst dword [esp + 0x18]
push edi
fst dword [esp + 0x20]
mov esi, eax
test ebp, ebp
je 0x10047bb2
mov ecx, dword [ebp]
cmp dword [ecx], 0xb
jne 0x10047bb2
test esi, esi
je 0x10047bb2
mov eax, dword [esi]
cmp dword [eax], 6
jne 0x10047bb2
fld dword [0x1023abc0]
fld dword [esp + 0x78]
fcom st(1)
fnstsw ax
test ah, 5
jp 0x10047563
fstp st(0)
fstp dword [esp + 0x78]
jmp 0x1004757e
fstp st(1)
fld dword [0x1023abbc]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x1004757c
fstp dword [esp + 0x78]
jmp 0x1004757e
fstp st(0)
fld dword [esp + 0x7c]
fcom st(2)
fnstsw ax
test ah, 5
jp 0x10047595
fstp st(0)
fxch st(1)
fst dword [esp + 0x7c]
jmp 0x100475a4
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x100475a2
fst dword [esp + 0x7c]
fxch st(1)
fld dword [esp + 0x80]
fcom st(1)
fnstsw ax
test ah, 5
jp 0x100475bf
fstp st(0)
fst dword [esp + 0x80]
jmp 0x100475d3
fcomp st(2)
fnstsw ax
test ah, 0x41
jne 0x100475d3
fxch st(1)
fst dword [esp + 0x80]
fxch st(1)
fld dword [esp + 0x84]
fcom st(1)
fnstsw ax
test ah, 5
jp 0x100475f0
fstp st(2)
fstp st(1)
fstp dword [esp + 0x84]
jmp 0x10047606
fstp st(1)
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x10047604
fstp dword [esp + 0x84]
jmp 0x10047606
fstp st(0)
lea eax, [ecx + 0x128]
mov edx, eax
and edx, 0xf
je 0x1004761c
mov ecx, 0x10
sub ecx, edx
jmp 0x1004761e
xor ecx, ecx
mov ecx, dword [ecx + eax + 0xc]
mov edx, eax
and edx, 0xf
mov dword [esp + 0x14], ecx
je 0x10047636
mov ecx, 0x10
sub ecx, edx
jmp 0x10047638
xor ecx, ecx
mov edx, dword [ecx + eax + 0x10]
push ebp
mov dword [esp + 0x14], edx
call sym.FreeImage.dll__FreeImage_GetLine_4
mov edi, eax
add edi, 3
and edi, 0xfffffffc
push esi
mov dword [esp + 0x28], edi
call sym.FreeImage.dll__FreeImage_GetLine_4
fld dword [esp + 0x78]
add eax, 3
fchs
and eax, 0xfffffffc
push ecx
fstp dword [esp]
mov dword [esp + 0x34], eax
call fcn.10045dc0
fstp dword [esp + 0x7c]
fldz
add esp, 4
fcom dword [esp + 0x7c]
fnstsw ax
test ah, 0x44
jnp 0x100476b1
fld1
fcom dword [esp + 0x80]
fnstsw ax
test ah, 0x44
jnp 0x1004785d
fld dword [esp + 0x84]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x10047866
fstp st(0)
lea eax, [esp + 0x18]
fstp st(0)
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x2c]
push eax
mov eax, esi
call fcn.10044630
fld dword [esp + 0x30]
add esp, 0xc
fstp dword [esp]
call fcn.10043ac0
fstp dword [esp + 0x2c]
fld dword [esp + 0x20]
fstp dword [esp]
call fcn.10043ac0
fstp dword [esp + 0x20]
add esp, 4
fld dword [esp + 0x28]
fld st(0)
fld dword [esp + 0x18]
fld st(0)
fsubp st(2)
fld st(2)
fsub dword [esp + 0x1c]
fdivp st(2)
fxch st(1)
fstp dword [esp + 0x20]
fldz
fcom dword [esp + 0x20]
fnstsw ax
test ah, 0x41
jne 0x1004785b
fstp st(0)
push ecx
fxch st(1)
fstp qword [esp + 0x3c]
fstp dword [esp]
call fcn.10043ac0
fsubr qword [esp + 0x3c]
add esp, 4
fld dword [esp + 0x28]
fsub dword [esp + 0x1c]
fdivp st(1)
fstp dword [esp + 0x20]
fldz
fcom dword [esp + 0x20]
fnstsw ax
test ah, 0x41
jne 0x1004785f
fld dword [0x10231a4c]
fstp dword [esp + 0x7c]
fld dword [esp + 0x84]
fxch st(1)
fld dword [0x1023abb8]
push ebp
fstp dword [esp + 0x20]
fld dword [0x1023abb4]
fstp dword [esp + 0x24]
call sym.FreeImage.dll__FreeImage_GetBits_4
push esi
mov ebx, eax
call sym.FreeImage.dll__FreeImage_GetBits_4
fld1
fld st(0)
mov dword [esp + 0x18], eax
fld dword [esp + 0x80]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jp 0x100478ec
fld st(2)
fucomp st(4)
fnstsw ax
test ah, 0x44
jp 0x100478ec
mov eax, dword [esp + 0x10]
fstp st(3)
fstp st(1)
fstp st(0)
fstp st(0)
test eax, eax
jbe 0x10047b1b
mov dword [esp + 0x28], eax
xor edi, edi
mov esi, ebx
cmp dword [esp + 0x14], edi
jbe 0x100478d0
mov ebp, dword [esp + 0x18]
fld dword [ebp + edi*4]
sub esp, 8
fstp dword [esp + 0x34]
fld dword [esp + 0x84]
fstp dword [esp + 4]
fld dword [esp + 0x34]
fmul dword [esp + 0x80]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp]
call fcn.100356c0
fstp dword [esp + 0x34]
add esp, 8
fld dword [esp + 0x2c]
mov ecx, 3
fld dword [esi]
fld st(1)
fadd st(1)
fdivp st(1)
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fst dword [esi]
fld dword [esp + 0x1c]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x10047848
fst dword [esp + 0x1c]
fld dword [esp + 0x20]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x100478b5
fstp dword [esp + 0x20]
jmp 0x100478b7
fstp st(2)
fstp st(0)
fld dword [esp + 0x84]
fxch st(1)
fcom dword [esp + 0x7c]
fnstsw ax
test ah, 5
jnp 0x1004776b
fstp st(1)
sub esp, 8
fstp st(0)
fld dword [0x1023abb0]
fstp dword [esp + 4]
fld dword [esp + 0x28]
fstp dword [esp]
call fcn.100356c0
fmul qword [0x1023aba8]
add esp, 8
fadd qword [str.333333]
fstp dword [esp + 0x7c]
fld dword [esp + 0x84]
fldz
jmp 0x1004776b
fstp st(0)
add esi, 4
sub ecx, 1
jne 0x10047825
inc edi
fstp st(0)
cmp edi, dword [esp + 0x14]
jb 0x100477e4
mov ecx, dword [esp + 0x30]
add ebx, dword [esp + 0x24]
add dword [esp + 0x18], ecx
sub dword [esp + 0x28], 1
jne 0x100477d2
jmp 0x10047b1b
fxch st(2)
fst dword [esp + 0x6c]
fst dword [esp + 0x68]
fst dword [esp + 0x64]
fxch st(1)
fucomp st(2)
fnstsw ax
test ah, 0x44
jnp 0x100479b6
fucomp st(2)
fnstsw ax
test ah, 0x44
jnp 0x100479b8
push ebp
call sym.FreeImage.dll__FreeImage_GetBits_4
cmp dword [esp + 0x10], 0
mov ebx, dword [esp + 0x14]
jbe 0x10047966
mov esi, dword [esp + 0x10]
lea edx, [eax + 8]
test ebx, ebx
jbe 0x1004795f
mov eax, edx
mov ecx, ebx
fld dword [eax - 8]
add eax, 0xc
sub ecx, 1
fadd dword [esp + 0x64]
fstp dword [esp + 0x64]
fld dword [eax - 0x10]
fadd dword [esp + 0x68]
fstp dword [esp + 0x68]
fld dword [esp + 0x6c]
fadd dword [eax - 0xc]
fstp dword [esp + 0x6c]
jne 0x10047936
add edx, edi
sub esi, 1
jne 0x1004792e
mov edx, dword [esp + 0x10]
fild dword [esp + 0x10]
test edx, edx
jge 0x10047978
fadd dword [0x1023ab98]
mov dword [esp + 0x38], ebx
fild dword [esp + 0x38]
test ebx, ebx
jge 0x1004798a
fadd dword [0x1023ab98]
fmulp st(1)
fstp dword [esp + 0x28]
fld dword [esp + 0x64]
fld dword [esp + 0x28]
fld st(0)
fdivp st(2)
fxch st(1)
fstp dword [esp + 0x64]
fld dword [esp + 0x68]
fdiv st(1)
fstp dword [esp + 0x68]
fdivr dword [esp + 0x6c]
fstp dword [esp + 0x6c]
jmp 0x100479b8
fstp st(0)
mov eax, ebp
push eax
call sym.FreeImage.dll__FreeImage_GetBits_4
cmp dword [esp + 0x10], 0
mov ebp, eax
jbe 0x10047b17
mov ecx, dword [esp + 0x10]
fld1
mov dword [esp + 0x28], ecx
jmp 0x100479e2
fld dword [esp + 0x80]
fxch st(1)
xor ebx, ebx
mov edi, ebp
cmp dword [esp + 0x14], ebx
jbe 0x10047afe
fld st(2)
fsubr st(1)
fst qword [esp + 0x40]
fld dword [esp + 0x2c]
fmul st(1)
fstp qword [esp + 0x48]
fxch st(1)
fsubrp st(2)
fxch st(1)
fstp qword [esp + 0x50]
jmp 0x10047a14
fld qword [esp + 0x40]
mov edx, dword [esp + 0x18]
fld dword [edx + ebx*4]
xor esi, esi
fstp dword [esp + 0x34]
fmul dword [esp + 0x34]
fstp qword [esp + 0x58]
lea esp, [esp]
fld dword [edi]
sub esp, 8
fstp qword [esp + 0x40]
fld dword [esp + 0x84]
fstp dword [esp + 4]
fld dword [esp + esi*4 + 0x6c]
fmul st(1)
fadd qword [esp + 0x50]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fmul qword [esp + 0x58]
fld dword [edi]
fmulp st(2)
fxch st(1)
fadd qword [esp + 0x60]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fmul dword [esp + 0x88]
faddp st(1)
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fmul dword [esp + 0x80]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fstp dword [esp]
call fcn.100356c0
fld qword [esp + 0x40]
add esp, 8
fadd st(1), st(0)
fdivrp st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fst dword [esp + 0x38]
fst dword [esp + 0x34]
fst dword [edi]
fld dword [esp + 0x1c]
fcompp
fnstsw ax
fld dword [esp + 0x34]
test ah, 5
jp 0x10047ac6
fst dword [esp + 0x1c]
fld dword [esp + 0x20]
fcompp
fnstsw ax
test ah, 0x41
jne 0x10047adb
fld dword [esp + 0x38]
fstp dword [esp + 0x20]
fld dword [esp + 0x84]
inc esi
add edi, 4
cmp esi, 3
jl 0x10047a30
inc ebx
cmp ebx, dword [esp + 0x14]
jb 0x10047a10
fld1
jmp 0x10047b00
fstp st(1)
mov eax, dword [esp + 0x30]
add ebp, dword [esp + 0x24]
add dword [esp + 0x18], eax
sub dword [esp + 0x28], 1
jne 0x100479d9
fstp st(1)
fstp st(0)
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fucomp st(2)
fnstsw ax
fstp st(1)
test ah, 0x44
jnp 0x10047ba1
mov ecx, dword [esp + 0x74]
push ecx
call sym.FreeImage.dll__FreeImage_GetBits_4
fld st(0)
mov esi, dword [esp + 0x10]
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x74]
test esi, esi
jbe 0x10047ba3
fld dword [esp + 0x74]
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
lea edx, [eax + 8]
test edi, edi
jbe 0x10047b8b
mov eax, edx
mov ecx, edi
fld dword [eax - 8]
add eax, 0xc
sub ecx, 1
fsub st(2)
fdiv st(1)
fstp dword [eax - 0x14]
fld dword [eax - 0x10]
fsub st(2)
fdiv st(1)
fstp dword [eax - 0x10]
fld dword [eax - 0xc]
fsub st(2)
fdiv st(1)
fstp dword [eax - 0xc]
jne 0x10047b65
add edx, ebx
sub esi, 1
jne 0x10047b5d
fstp st(0)
lea eax, [esi + 1]
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
fstp st(1)
mov eax, 1
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
pop edi
fstp st(1)
pop esi
fstp st(0)
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret